protected override void OnAwake() { Instance = this; PdkGameManager.AddOnGameInfoEvt(OnGameInfo); PdkGameManager.AddOnGetRejoinDataEvt(OnRejoinGame); Ddz2RemoteServer.AddOnGameOverEvt(OnGameOverEvt); PdkGameManager.AddOnServResponseEvtDic(GlobalConstKey.TypeAllocate, OnAlloCateCds); }
/// <summary> /// 场景销毁后,重置静态变量 /// </summary> private void OnDestroy() { Instance = null; }