Ejemplo n.º 1
0
    public void DetectSet()
    {
        wantToHear      = false;
        agent.isStopped = true;

        walk = false;
        run  = false;

        stealth.detected             = true;
        sight.watchingPlayer         = false;
        playerDetector.hearingPlayer = false;
        states = State.detect;

        stealth.enemies.Remove(itsef);

        if (stealth.playingDetectingSound && Detected)
        {
            stealth.playingDetectingSound = false;
            stealth.stealthAudioSource.Stop();

            anim.SetAnimDetection();

            player.baseSource.PlayOneShot(stealth.detectedSound);
        }
    }