Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 2
0
 public override void BeginState()
 {
     base.BeginState();
     GameLib.RotateFromTo(this.transform, m_manager.PlayerTransform);
 }
Exemplo n.º 3
0
 public override void BeginState()
 {
     base.BeginState();
     GameLib.RotateFromTo(this.transform, _manager.Target);
 }