少年修仙传客户端代码仓库
client_Wu Xijin
2019-02-18 0e401e6b5f672e17d08559c36adc6094e55d315e
Core/ResModule/GameObjectPoolManager.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using UnityEngine;
using System;
using TableConfig;
[XLua.LuaCallCSharp]
public class GameObjectPoolManager : SingletonMonobehaviour<GameObjectPoolManager>
@@ -102,7 +102,7 @@
        string _assetName;
        string _assetBundleName;
        NPCConfig _m = Config.Instance.Get<NPCConfig>(npcID);
        NPCConfig _m = NPCConfig.Get(npcID);
        if (_m == null || _m.MODE.Equals("0"))
        {
@@ -144,6 +144,37 @@
        }
        return RequestPool(prefab).Request();
    }
    public GameObject RequestEmptyJY()
    {
        var _prefab = InstanceResourcesLoader.LoadEmptyJY();
        if (!_prefab)
        {
            return null;
        }
        var _pool = RequestPool(_prefab);
        _pool.assetName = InstanceResourcesLoader.emptyJyName;
        _pool.assetBundleName = "mob/prefab_race_jy";
        return _pool.Request();
    }
    public void ReleaseEmptyJY(GameObject go)
    {
        var _prefab = InstanceResourcesLoader.LoadEmptyJY();
        if (!_prefab)
        {
            return;
        }
        GameObjectPool _pool = RequestPool(_prefab);
        if (_pool != null)
        {
            _pool.Release(go);
        }
    }
    public GameObject RequestDefaultPet()
@@ -275,7 +306,7 @@
        string _assetName;
        string _assetBundleName;
        NPCConfig _m = Config.Instance.Get<NPCConfig>(npcID);
        NPCConfig _m = NPCConfig.Get(npcID);
        if (_m == null || _m.MODE.Equals("0"))
        {