コード例 #1
0
    void CommonDie()
    {
        isDead = true;
        if (miniMapMark != null)
        {
            miniMapMark.gameObject.SetActive(false);
        }

        if (dieSound != null)
        {
            SoundManager.Instance.PlayClip2D(dieSound);
        }

        if (OnDeath != null)
        {
            OnDeath();
        }

        if (enemyAI != null)
        {
            enemyAI.DeactiveSelf();
        }
    }