Beispiel #1
0
 public void EnterExcute()
 {
     curPos    = soliderInfo.GetPosition();
     targetPos = soliderInfo.GetBarrackPos();
     speed     = soliderInfo.GetSpeed();
     //Debug.Log(curPos);
     //Debug.Log(targetPos);
     soliderInfo.Run(targetPos);
 }
Beispiel #2
0
    private Vector3 GetAtkPos(Vector3 _targetPos)
    {
        Vector3 soliderPos = soliderInfo.GetPosition();

        if (soliderPos.x < _targetPos.x)
        {
            _targetPos.x = _targetPos.x - 30;
        }
        else
        {
            _targetPos.x = _targetPos.x + 30;
        }
        return(_targetPos);
    }
Beispiel #3
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();
     }
 }