/// <summary> /// 清空缓冲坦克 /// </summary> void OnDestroy() { this._BulletPool.Clear(); this._Tank_Pool.Clear(); this._Prop_Pool.Clear(); Breed.Instance().RemoveAll(); }
/// <summary> /// 为坦克准备缓冲池 /// </summary> void PrepareTank() { //Breed.Instance().Create("tank", _Prefab_Tank[GlobalManager.GetInstants()._PlayerEntity._Tank_Id - 1]); Breed.Instance().Create("tank", _Prefab_Tank[GlobalManager.GetInstants()._PlayerEntity._Tank_Id - 1]); this._Tank_Pool = Breed.Instance().Get("tank"); this._Tank_Pool.Preload(20); }
/// <summary> /// 为子弹准备缓冲池 /// </summary> void PrepareBullet(GameObject bullet) { Breed.Instance().Create("bullet", bullet); this._BulletPool = Breed.Instance().Get("bullet"); this._BulletPool.Preload(10); }
/// <summary> /// 为炸弹准备缓冲池 /// </summary> void PrepareProp() { Breed.Instance().Create("prop", _Prefab_Props[GlobalManager.GetInstants()._PlayerEntity._Bombing_Weapons - 1]); this._Prop_Pool = Breed.Instance().Get("prop"); this._Prop_Pool.Preload(5); }