예제 #1
0
    private void Death()
    {
        FindObjectOfType <AudioManager>().Play(this.ToString());
        OnZeroHealth?.Invoke(this, EventArgs.Empty);
        Count();

        if (objectPool != null)
        {
            ReturnToPool();
        }
        else
        {
            Destroy(gameObject, 0.5f);
        }
    }