private void OnEventGameData(EventGameData evt) { if (evt.action == EventGameData.Action.DataChange) { Refresh(); } }
public static EventGameData Get(Action action, string errorMsg = "") { if (sIns == null) { sIns = new EventGameData(); } sIns.action = action; sIns.errorMsg = errorMsg; return(sIns); }
private void OnEventGameData(EventGameData evt) { if (evt.action == EventGameData.Action.DataChange) { RefreshUI(); } if (evt.action == EventGameData.Action.ChangeWeapon) { Aircraft.ins.weapon.Reset(); } }
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); } }
private void OnEventGameData(EventGameData evt) { if (!isActiveAndEnabled) { return; } if (evt.action == EventGameData.Action.DataChange) { RefreshUI(); } }
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))); } } } }
private void SaveAndDispatch() { GameLocalData.Instance.Save(); Unibus.Dispatch(EventGameData.Get(EventGameData.Action.DataChange)); }
private void DispatchEvent(EventGameData.Action action, string errorMsg = "") { UnibusEvent.Unibus.Dispatch(EventGameData.Get(action, errorMsg)); }