Пример #1
0
    // Update is called once per frame
    void Update()
    {
        if (!isInFight && StoryEvent.getIntroEvent() >= 2)
        {
            if (PlayerPrefs.GetInt("CreativeMode") == 0 && StoryEvent.getIntroEvent() >= 6)
            {
                ChangeArmed();
            }
            Unsheatled();
        }
        else
        {
            armed = true;
            Unsheatled();
        }
        Attack();
        if (armed)
        {
            Protection();
        }
        Inactif();
        Animation();

        if ((transform.position - labyrinthPlace).magnitude <= 3 && StoryEvent.getIntroEvent() == 2)
        {
            StoryEvent.IncrementIntroEvent();
        }
    }
Пример #2
0
 // Update is called once per frame
 void Update()
 {
     transform.LookAt(playerPosition);
     if (!audioSource.isPlaying && (StoryEvent.getIntroEvent() == 1 || StoryEvent.getIntroEvent() == 5))
     {
         StoryEvent.IncrementIntroEvent();
     }
     if ((playerPosition.position - transform.position).magnitude <= playerDistance && StoryEvent.getIntroEvent() == 0)
     {
         audioSource.Play();
         StoryEvent.IncrementIntroEvent();
     }
     if (StoryEvent.getIntroEvent() == 4)
     {
         Wolfdead();
         StoryEvent.IncrementIntroEvent();
     }
 }
Пример #3
0
    void Death()
    {
        // The enemy is dead.
        isDead = true;

        // Tell the animator that the enemy is dead.
        anim.SetTrigger("Dead");

        if (StoryEvent.getIntroEvent() == 3)
        {
            StoryEvent.IncrementIntroEvent();
        }

        enemyAttack.enabled = false;
        wolf.enabled        = false;

        // Change the audio clip of the audio source to the death clip and play it (this will stop the hurt clip playing).
        enemyAudio.clip = deathClip;
        enemyAudio.Play();
    }