Exemple #1
0
    void Died()
    {
        status.died = true;
        gameMaster.killEnemy(transform.tag);
        Destroy(gameObject, 0.4f);

        //オーディオ
        AudioSource.PlayClipAtPoint(deathSeClip, transform.position);
    }
Exemple #2
0
    public void DamageEnemy(int damage)
    {
        enemyStats.currentHealth -= damage;
        if (enemyStats.currentHealth <= 0)
        {
            GameMasterScript.killEnemy(this);
        }

        if (statusIndicator != null)
        {
            statusIndicator.SetHealth(enemyStats.maxHealth, enemyStats.currentHealth);
        }
    }