Esempio n. 1
0
    public override void Die()
    {
        base.Die();

        // give the player XP points on death
        if (isAlive)
        {
            // give player xp for the kill
            PlayerStats playerStats = PlayerManager.instance.player.GetComponent <PlayerStats>();
            playerStats.IncreaseXp(5);

            //increase killounter
            Sub_Spawner.killCount++;

            // play the death animation
            animationStateController.HenchmanDeathAnim();

            // instantiate the healer (on condition)
            if (random == 1)
            {
                InstantiateHealer();
            }

            // update variable
            isAlive = false;
        }

        Destroy(gameObject, 3f);
    }
 void henchmanDead() //calls death animation
 {
     animationStateController.HenchmanDeathAnim();
 }