protected override void Update() { if (_manager.Target) { GameLib.RotateFromTo(transform, _manager.Target.transform); if (Vector3.Distance(transform.position, _manager.Target.transform.position) > _manager.Stat.AttackRange) { _manager.SetState(AIState.Chase); return; } } else if (_manager.SoundPos != _manager.nullSoundPos) { GameLib.RotateFromTo(transform, _manager.SoundPos); } else { _manager.SetState(AIState.Rage); } }
public override void BeginState() { base.BeginState(); GameLib.RotateFromTo(this.transform, m_manager.PlayerTransform); }
public override void BeginState() { base.BeginState(); GameLib.RotateFromTo(this.transform, _manager.Target); }