| | |
| | | public event UnityAction<uint> OnGActorRequest;
|
| | | public event UnityAction<uint> OnGActorServerDie;
|
| | |
|
| | | public event UnityAction<uint> OnFightNpcRequest;
|
| | | public event UnityAction<uint> OnFightNpcRelease;
|
| | |
|
| | | // 由角色池生成的prefab列表. 用来卸载用的.
|
| | | public List<GameObject> needDestroyPrefabList = new List<GameObject>();
|
| | | public List<GActorFight> needDieList = new List<GActorFight>();
|
| | |
| | | RuntimeLogUtility.AddLog_Green(_content, serverInstID);
|
| | | #endif
|
| | |
|
| | | if (OnFightNpcRequest != null)
|
| | | {
|
| | | OnFightNpcRequest(npcID);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | return _actor as T;
|
| | |
| | | /// <param name="actor"></param>
|
| | | public void Release(GActor actor)
|
| | | {
|
| | | var _npcfight = actor as GActorNpcFight;
|
| | |
|
| | | if (_npcfight != null)
|
| | | {
|
| | | if (OnFightNpcRequest != null)
|
| | | {
|
| | | OnFightNpcRequest((uint)_npcfight.NpcConfig.NPCID);
|
| | | }
|
| | | }
|
| | |
|
| | | #if UNITY_EDITOR
|
| | | string _content = string.Format("GAMgr => 对角色 SID: {0}, CID: {1} 进行了回收", actor.ServerInstID, actor.ClientInstID);
|
| | | RuntimeLogUtility.AddLog_Green(_content, actor.ServerInstID);
|