Exemplo n.º 1
0
 public void MoveLeft(UDirection direction)
 {
     if(MovementCheckX(x - 1))
     {
         lx = x;
         ly = y;
         x = x - 1;
     }
 }
Exemplo n.º 2
0
 public void MoveDown(UDirection direction)
 {
     if(MovementCheckY(y + 1))
     {
         lx = x;
         ly = y;
         y = y + 1;
     }
 }
Exemplo n.º 3
0
 public void Move(UDirection direction)
 {
     switch (direction)
     {
         case UDirection.Up:
             mUp(direction);
             break;
         case UDirection.Down:
             mDown(direction);
             break;
         case UDirection.Left:
             mLeft(direction);
             break;
         case UDirection.Right:
             mRight(direction);
             break;
     }
 }
Exemplo n.º 4
0
 public void MoveRight(UDirection direction)
 {
     if(MovementCheckX(x + 1))
     {
         lx = x;
         ly = y;
         x = x + 1;
     }
 }
Exemplo n.º 5
0
 public void MoveUp(UDirection direction)
 {
     if(MovementCheckY(y - 1))
     {
         lx = x;
         ly = y;
         y = y - 1;
     }
 }
Exemplo n.º 6
0
 public override void Reset()
 {
     base.Reset();
     this.Direction      = UIAnimator.DefaultDirection;
     this.CustomPosition = Vector3.zero;
 }