예제 #1
0
파일: EnemyPool.cs 프로젝트: nolimet/Liaka
    public static void RemoveObject(EnemyBase e)
    {
        if (instance)
        {
            if (instance.ActivePool.Contains(e))
                instance.ActivePool.Remove(e);
            if (!instance.InActivePool.Contains(e))
                instance.InActivePool.Add(e);
            if (e)
            {
                e.transform.position = new Vector3(0, 500, -50);
                e.RemoveFromView(false);
            }

            if (instance.onRemove != null)
                instance.onRemove(e);
        }
    }