| | |
| | | using UnityEngine;
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class OSTimeLimitGiftModel : Model, IPlayerLoginOk, IBeforePlayerDataInitialize
|
| | | public class OSTimeLimitGiftModel : Model, IPlayerLoginOk, IBeforePlayerDataInitialize, IOpenServerActivity
|
| | | {
|
| | | Dictionary<int, List<StoreConfig>> m_OSTimeLimitGifts = new Dictionary<int, List<StoreConfig>>();
|
| | |
|
| | |
| | | public Redpoint redpoint { get; private set; }
|
| | |
|
| | | StoreModel m_StoreModel;
|
| | |
|
| | | public event Action<int> onStateUpate;
|
| | |
|
| | | StoreModel storeModel
|
| | | {
|
| | | get
|
| | | {
|
| | | return m_StoreModel ?? (m_StoreModel = ModelCenter.Instance.GetModel<StoreModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | public bool IsOpen
|
| | | {
|
| | | get
|
| | | {
|
| | | return TimeUtility.CreateDays <= openDays && FuncOpen.Instance.IsFuncOpen(132);
|
| | | }
|
| | | }
|
| | |
|
| | | public bool priorityOpen
|
| | | {
|
| | | get
|
| | | {
|
| | | return redpoint.state == RedPointState.Simple;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | TimeUtility.OnCreateRoleTimeRefresh += OnCreateRoleTimeRefresh;
|
| | | storeModel.RefreshBuyShopLimitEvent += UpdateRedpoint;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
|
| | | OpenServerActivityCenter.Instance.Register(3, this);
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | |
| | | if (_id == 132)
|
| | | {
|
| | | UpdateRedpoint();
|
| | | if (onStateUpate != null)
|
| | | {
|
| | | onStateUpate(3);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|