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; }
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; }
void IMonsterState.Start() { monsterEyes.ChangeEyeColor(MonsterEyes.EyeColors.green); }
void IMonsterState.Start() { monsterEyes.ChangeEyeColor(MonsterEyes.EyeColors.yellow); }
void IMonsterState.Start() { monsterEyes.ChangeEyeColor(MonsterEyes.EyeColors.green); monsterController.StartCoroutine(SwitchSceneAfterSeconds(3)); }