Exemplo n.º 1
0
 private Vector3 getObstacleCompensationVector(MoveDirection dir)
 {
     if (dir.IsLeft()) {
         return new Vector3(1.5f, -0.5f, -0.5f);
     } else if (dir.IsRight()) {
         return new Vector3(-0.5f, -0.5f, -0.5f);
     } else if (dir.IsUp()) {
         return new Vector3(0.5f, -0.5f, -1.5f);
     } else {
         return new Vector3(0.5f, -0.5f, 0.5f);
     }
 }
Exemplo n.º 2
0
 private Vector3 getObstacleCompensationVector(MoveDirection dir)
 {
     if (dir.IsLeft())
     {
         return(new Vector3(1.5f, -0.5f, -0.5f));
     }
     else if (dir.IsRight())
     {
         return(new Vector3(-0.5f, -0.5f, -0.5f));
     }
     else if (dir.IsUp())
     {
         return(new Vector3(0.5f, -0.5f, -1.5f));
     }
     else
     {
         return(new Vector3(0.5f, -0.5f, 0.5f));
     }
 }
Exemplo n.º 3
0
 public static bool IsHorzOrient(this MoveDirection direction)
 {
     return(direction.IsLeft() || direction.IsRight());
 }