| | |
| | | using TableConfig;
|
| | | using UnityEngine;
|
| | |
|
| | | public class LimitedTimePackageItemClassModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
|
| | | public class LimitedTimePackageItemClassModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk, IOpenServerActivity
|
| | | {
|
| | | public Dictionary<int, int> DicBuyPackage = new Dictionary<int, int>();
|
| | | public event Action UpdateLimitedTimePackageItem;
|
| | | public event Action<int> onStateUpate;
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | |
|
| | | OpenServerActivityCenter.Instance.Register(7, this);
|
| | | OperationTimeHepler.Instance.operationEndEvent += OperationEndEvent;
|
| | | }
|
| | |
|
| | | |
| | |
|
| | | public bool IsShowPanel = false;
|
| | |
|
| | | public bool IsOpen
|
| | | {
|
| | | get
|
| | | {
|
| | | return IsExpired();
|
| | | }
|
| | | }
|
| | |
|
| | | public bool priorityOpen
|
| | | {
|
| | | get
|
| | | {
|
| | | return false;
|
| | | }
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | IsShowPanel = false;
|
| | |
| | | if (arg1 == Operation.GiftPackage)
|
| | | {
|
| | | IsShowTip();
|
| | | if (arg2 == 0 && onStateUpate != null)
|
| | | {
|
| | | onStateUpate(7);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void OperationEndEvent(Operation arg1, int arg2)
|
| | | {
|
| | | if (arg1 == Operation.GiftPackage && arg2 == 0)
|
| | | {
|
| | | if (onStateUpate != null)
|
| | | {
|
| | | onStateUpate(7);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | UpdateLimitedTimePackageItem();
|
| | | }
|
| | | if (onStateUpate != null)
|
| | | {
|
| | | onStateUpate(7);
|
| | | }
|
| | | }
|
| | | public void OpenFreePlat(string Title, float RMBNum, string OrderInfo)
|
| | | {
|