Exemplo n.º 1
0
 public void EnterExcute()
 {
     curPos    = soliderInfo.GetPosition();
     targetPos = soliderInfo.GetAttackMovePos();
     speed     = soliderInfo.GetSpeed();
     if (targetPos.y > curPos.y && Math.Abs(targetPos.y - curPos.y) > Math.Abs(targetPos.x - curPos.x))
     {
         soliderInfo.RunUp();
     }
     else if (targetPos.x >= curPos.x)
     {
         soliderInfo.RunRight();
     }
     else
     {
         soliderInfo.RunLeft();
     }
 }