Ejemplo n.º 1
0
 public GravPad(int id, Rectangle rect, GravDirection dir, int opp, List<Point> path, bool loop, int pathNode, bool health)
 {
     Id = id;
     Location = rect;
     Direction = dir;
     Opposite = opp;
     UpAngle = GravPadController.DirToUp(dir);
     Path = path;
     pathLoops = loop;
     PathNode = pathNode;
     isHealthPad = health;
 }
Ejemplo n.º 2
0
 public static float DirToUp(GravDirection dir)
 {
     switch (dir)
     {
         case GravDirection.Left:
             return MathHelper.Pi;
         case GravDirection.Right:
             return 0f;
         case GravDirection.Up:
              return -MathHelper.PiOver2;
         case GravDirection.Down:
             return MathHelper.PiOver2;
         default:
             return 0f;
     }
 }