예제 #1
0
 private void OnEventGameData(EventGameData evt)
 {
     if (evt.action == EventGameData.Action.DataChange)
     {
         Refresh();
     }
 }
예제 #2
0
 public static EventGameData Get(Action action, string errorMsg = "")
 {
     if (sIns == null)
     {
         sIns = new EventGameData();
     }
     sIns.action   = action;
     sIns.errorMsg = errorMsg;
     return(sIns);
 }
예제 #3
0
 private void OnEventGameData(EventGameData evt)
 {
     if (evt.action == EventGameData.Action.DataChange)
     {
         RefreshUI();
     }
     if (evt.action == EventGameData.Action.ChangeWeapon)
     {
         Aircraft.ins.weapon.Reset();
     }
 }
예제 #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);
     }
 }
예제 #5
0
        private void OnEventGameData(EventGameData evt)
        {
            if (!isActiveAndEnabled)
            {
                return;
            }

            if (evt.action == EventGameData.Action.DataChange)
            {
                RefreshUI();
            }
        }
예제 #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)));
                    }
                }
            }
        }
예제 #7
0
 private void SaveAndDispatch()
 {
     GameLocalData.Instance.Save();
     Unibus.Dispatch(EventGameData.Get(EventGameData.Action.DataChange));
 }
예제 #8
0
 private void DispatchEvent(EventGameData.Action action, string errorMsg = "")
 {
     UnibusEvent.Unibus.Dispatch(EventGameData.Get(action, errorMsg));
 }