少年修仙传客户端代码仓库
client_linchunjie
2018-08-28 7844d0086dbc5f954fd790f072a4f60b07316809
Merge branch '2960仙盟抢Boss活动' of http://192.168.0.87:10010/r/snxxz_scripts into 2960仙盟抢Boss活动
1个文件已修改
18 ■■■■■ 已修改文件
Fight/GameActor/GAMgr.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GAMgr.cs
@@ -15,6 +15,9 @@
    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>();
@@ -422,6 +425,11 @@
            RuntimeLogUtility.AddLog_Green(_content, serverInstID);
#endif
            if (OnFightNpcRequest != null)
            {
                OnFightNpcRequest(npcID);
            }
        }
        return _actor as T;
@@ -566,6 +574,16 @@
    /// <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);