Example #1
0
    void Death()
    {
        Respawn respawnScript = GetComponent <Respawn>();

        if (respawnScript != null)
        {
            health = startHealth;
            respawnScript.RespawnAfterDelay();
        }
        else
        {
            Destroy(gameObject);
        }
    }