Exemplo n.º 1
0
 private void OnEventGameData(EventGameData evt)
 {
     if (evt.action == EventGameData.Action.DataChange)
     {
         Refresh();
     }
 }
Exemplo n.º 2
0
 public static EventGameData Get(Action action, string errorMsg = "")
 {
     if (sIns == null)
     {
         sIns = new EventGameData();
     }
     sIns.action   = action;
     sIns.errorMsg = errorMsg;
     return(sIns);
 }
Exemplo n.º 3
0
 private void OnEventGameData(EventGameData evt)
 {
     if (evt.action == EventGameData.Action.DataChange)
     {
         RefreshUI();
     }
     if (evt.action == EventGameData.Action.ChangeWeapon)
     {
         Aircraft.ins.weapon.Reset();
     }
 }
Exemplo n.º 4
0
 private void OnEventGameData(EventGameData evt)
 {
     if (evt.action == EventGameData.Action.DataChange)
     {
         RefreshUI();
     }
     else if (evt.action == EventGameData.Action.Error)
     {
         // Debug.Log(evt.errorMsg);
         Toast.Show(evt.errorMsg);
     }
 }
Exemplo n.º 5
0
        private void OnEventGameData(EventGameData evt)
        {
            if (!isActiveAndEnabled)
            {
                return;
            }

            if (evt.action == EventGameData.Action.DataChange)
            {
                RefreshUI();
            }
        }
Exemplo n.º 6
0
        private void OnEventGameDataWhenever(EventGameData evt)
        {
            if (evt.action == EventGameData.Action.UnlockNewLevel)
            {
                if (D.I.unlockedGameLevel == 2)
                {
                    needOpenTutorial = true;
                }
                else if (!GameLocalData.Instance.isRateOver)
                {
                    foreach (var lv in CT.table.rateUsHintLevel)
                    {
                        if (lv == D.I.unlockedGameLevel - 1)
                        {
                            needOpenRate = true;
                            break;
                        }
                    }
                }

                if (D.I.unlockedGameLevel == CT.table.dailySignUnlockLevel)
                {
                    mOpenHints.Add(LTKey.UNLOCK_SYSTEM_X.LT(LTKey.DAILY_SIGN.LT()));
                }
                if (D.I.unlockedGameLevel == CT.table.bookUnlockLevel)
                {
                    mOpenHints.Add(LTKey.UNLOCK_SYSTEM_X.LT(LTKey.VIRUS_BOOK.LT()));
                }
                if (D.I.unlockedGameLevel == CT.table.weaponUnlockLevel)
                {
                    mOpenHints.Add(LTKey.UNLOCK_SYSTEM_X.LT(LTKey.WEAPON_SYSTEM.LT()));
                }
                foreach (var t in TableWeapon.GetAll())
                {
                    if (D.I.unlockedGameLevel == t.unlockLevel)
                    {
                        mOpenHints.Add(LTKey.UNLOCK_WEAPON_X.LT(LT.Get(t.nameID)));
                    }
                }
            }
        }
Exemplo n.º 7
0
 private void SaveAndDispatch()
 {
     GameLocalData.Instance.Save();
     Unibus.Dispatch(EventGameData.Get(EventGameData.Action.DataChange));
 }
Exemplo n.º 8
0
 private void DispatchEvent(EventGameData.Action action, string errorMsg = "")
 {
     UnibusEvent.Unibus.Dispatch(EventGameData.Get(action, errorMsg));
 }