public override void OnDestroy() { FsmList.Clear(); Instance = null; EB.Debug.Log("GameFlowHotfixController.OnDestroy!"); base.OnDestroy(); }
public override void Awake() { EB.Debug.Log("GameFlowHotfixController.Awake!"); base.Awake(); FsmList = new List <FsmStateUnit>(); FsmList.Add(new IdleFlowAction()); FsmList.Add(new MainLandViewAction()); FsmList.Add(new InstanceViewAction()); FsmList.Add(new CombatViewAction()); for (int i = 0; i < FsmList.Count; ++i) { FsmList[i].OnAwake(); } if (Instance != null) { EB.Debug.LogError("GameFlowHotfixController.Instance != null!Has Init!"); if (Instance.mDMono != null) { EB.Debug.LogError("Destroy GameFlowHotfixController.Instance.mDMono!"); GameObject.Destroy(Instance.mDMono); Instance = null; } } Instance = this; RegisterMonoUpdater(); }