void IMonsterState.Start()
 {
     if (willMoveForward)
     {
         monsterEyes.ChangeEyeColor(MonsterEyes.EyeColors.green);
         currentDestination = MonsterHidingPointStorage.GetNextPointTowardsCenter(monsterController.transform.position);
         monsterController.monsterNavAgent.destination = currentDestination.transform.position;
     }
     else
     {
         monsterEyes.ChangeEyeColor(MonsterEyes.EyeColors.red);
         currentDestination = MonsterHidingPointStorage.GetNextPointTowardsCenter(monsterController.transform.position);
         monsterController.monsterNavAgent.destination = currentDestination.transform.position;
     }
     monsterController.monsterNavAgent.isStopped = false;
 }
Exemple #2
0
    void IMonsterState.Start()
    {
        monsterEyes.ChangeEyeColor(MonsterEyes.EyeColors.red);
        Vector3 heading  = player.transform.position - monsterController.transform.position;
        float   distance = heading.magnitude;

        directionToPlayer = heading / distance;
    }
    void IMonsterState.Start()
    {
        ace        = monsterController.GetComponent <AudioSource>();
        ace.volume = 8;
        ace.clip   = monsterController.parrotAudio[UnityEngine.Random.Range(0, monsterController.currentIndex)];
        ace.Play();

        if (willMoveForward)
        {
            monsterEyes.ChangeEyeColor(MonsterEyes.EyeColors.green);
            currentDestination = MonsterHidingPointStorage.GetNextPointTowardsCenter(monsterController.transform.position);
            monsterController.monsterNavAgent.destination = currentDestination.transform.position;
        }
        else
        {
            monsterEyes.ChangeEyeColor(MonsterEyes.EyeColors.red);
            currentDestination = MonsterHidingPointStorage.GetNextPointTowardsCenter(monsterController.transform.position);
            monsterController.monsterNavAgent.destination = currentDestination.transform.position;
        }
        monsterController.monsterNavAgent.isStopped = false;
    }
Exemple #4
0
 void IMonsterState.Start()
 {
     monsterEyes.ChangeEyeColor(MonsterEyes.EyeColors.green);
 }
Exemple #5
0
 void IMonsterState.Start()
 {
     monsterEyes.ChangeEyeColor(MonsterEyes.EyeColors.yellow);
 }
Exemple #6
0
 void IMonsterState.Start()
 {
     monsterEyes.ChangeEyeColor(MonsterEyes.EyeColors.green);
     monsterController.StartCoroutine(SwitchSceneAfterSeconds(3));
 }