void Awake() { _Instance = this; //init var dcTimer = DCTimer.Instance; UnityMsgDispatcher = gameObject.AddComponent <UnityMsgDispatcher>(); mSysManager = SystemManager.Instance; foreach (var gobj in NotDestroy) { DontDestroyOnLoad(gobj); } mSysManager.Awake(); }
public void SetUnityMsgDispatcher(UnityMsgDispatcher dispatcher) { mUnityMsgDispatcher = dispatcher; mUnityMsgDispatcher.AddListener(OnReceive); }