private void CheckMovement() { if (!lastTargetVisited) { if (trigger) { GoTo(currentTarget); trigger = false; if (targetQueue.Count > 0) { currentTarget = targetQueue.Dequeue(); } } } if (navMeshAgent.remainingDistance < navMeshAgent.stoppingDistance) { isMoving = false; } else { isMoving = true; } if (isMoving) { animator.SetBool("NPC Walking", true); if (_soundManager.EffectSounds.ContainsKey(EffectSound.Walking)) { _soundManager.StartSound(_soundManager.EffectSounds[EffectSound.Walking]); } } else { animator.SetBool("NPC Walking", false); if (_soundManager.EffectSounds.ContainsKey(EffectSound.Walking)) { _soundManager.StopSound(_soundManager.EffectSounds[EffectSound.Walking]); } } }
public void FirstPhaseEffect() { SoundManager.StartSound(SoundManager.EffectSounds[EffectSound.Temple_Water]); StartCoroutine(RiseAndLowerSea(RisingTime, RisingLevel)); StopCoroutine("RiseAndLowerSea"); }