public bool ShotBullet(Vector3 position, Quaternion rotation, Vector3 move) { if (inActiveStack.Count == 0) { Debug.Log("empty bullet"); return(false); } BulletController bullet = inActiveStack.Pop(); Debug.Assert(bullet != null); bullet.Shot(position, rotation, move); return(true); }
internal void PushBullet(BulletController bullet) { bullet.gameObject.SetActive(false); inActiveStack.Push(bullet); }