#if UNITY_EDITOR using System; using System.Collections.Generic; using XUtliPoolLib; namespace XEditor { internal class XBulletMgr : XSingleton { private List _bullets = new List(); public void ShootBullet(XBullet bullet) { _bullets.Add(bullet); } public void Update(float fDeltaT) { int len = _bullets.Count; for (int i = len - 1; i >= 0; i--) { if(_bullets[i].IsExpired()) { _bullets[i].Destroy(); _bullets.RemoveAt(i); } else _bullets[i].Update(fDeltaT); } } } } #endif