| | |
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using System;
|
| | | using TableConfig;
|
| | |
|
| | |
|
| | | [XLua.LuaCallCSharp]
|
| | | public class GameObjectPoolManager : SingletonMonobehaviour<GameObjectPoolManager>
|
| | |
| | | string _assetName;
|
| | | string _assetBundleName;
|
| | |
|
| | | NPCConfig _m = Config.Instance.Get<NPCConfig>(npcID);
|
| | | NPCConfig _m = NPCConfig.Get(npcID);
|
| | |
|
| | | if (_m == null || _m.MODE.Equals("0"))
|
| | | {
|
| | |
| | | }
|
| | |
|
| | | 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()
|
| | |
| | | string _assetName;
|
| | | string _assetBundleName;
|
| | |
|
| | | NPCConfig _m = Config.Instance.Get<NPCConfig>(npcID);
|
| | | NPCConfig _m = NPCConfig.Get(npcID);
|
| | |
|
| | | if (_m == null || _m.MODE.Equals("0"))
|
| | | {
|