少年修仙传客户端代码仓库
Client_PangDeRong
2018-08-23 85448a839d432aab4220e6b23e55a0270e007b6f
System/OpenServerActivity/OSGiftModel.cs
@@ -27,22 +27,12 @@
            {
                onStateUpate(6);
            }
            UpdateRedpoint();
        }
        public event Action<int> onStateUpate;
        public bool activate { get; private set; }
        private bool m_GiftGetNotify = false;
        public bool giftGetNotify
        {
            get { return m_GiftGetNotify; }
            set
            {
                m_GiftGetNotify = value;
                OSGiftRedpoint.state = value ? RedPointState.Simple : RedPointState.None;
            }
        }
        StoreModel storeModel
        {
@@ -80,6 +70,7 @@
                {
                    onStateUpate(6);
                }
                UpdateRedpoint();
            }
        }
@@ -94,6 +85,7 @@
                    onStateUpate(6);
                }
            }
            UpdateRedpoint();
        }
        public bool CheckActivate()
@@ -131,7 +123,24 @@
        public void OnBeforePlayerDataInitialize()
        {
            giftGetNotify = false;
        }
        public void SetDayRemind()
        {
            if (OSGiftRedpoint.state == RedPointState.Simple)
            {
                DayRemind.Instance.SetDayRemind(DayRemind.OSGIFT_REDPOINT, true);
                UpdateRedpoint();
            }
        }
        void UpdateRedpoint()
        {
            OSGiftRedpoint.state = RedPointState.None;
            if (CheckActivate() && !DayRemind.Instance.GetDayRemind(DayRemind.OSGIFT_REDPOINT))
            {
                OSGiftRedpoint.state = RedPointState.Simple;
            }
        }
        public Redpoint OSGiftRedpoint = new Redpoint(MainRedDot.REDPOINT_OPENSERVER, 20906);