Exemple #1
0
    public void DieSet()
    {
        wantToHear = false;

        executionCollider.enabled = false;

        agent.isStopped = true;

        walk = false;

        run = false;

        anim.SetAnimDead();
        //attackArea.enabled = false;

        Detected        = false;
        playerInArea    = false;
        canDetectPlayer = false;

        sight.watchingPlayer         = false;
        playerDetector.hearingPlayer = false;

        combatArea.enemiesNumber--;
        dead = true;

        if (!gm.improved)
        {
            Destroy(gameObject, timeToDie);
        }

        if (addedToList)
        {
            stealth.enemies.Remove(itsef);
            addedToList = false;
        }

        states = State.die;
    }