Example #1
0
 public NodeTest(Node node, Vector2 pos)
 {
     this.node = node;
     this.pos = pos;
     this.hex = new Hexagon(Convert.ToInt32(pos.X), Convert.ToInt32(pos.Y), 200, 200, this);
     Connections = new bool[] { false, false, false, false, false, false };
 }
Example #2
0
 public void Update()
 {
     this.hex = new Hexagon(Convert.ToInt32(pos.X), Convert.ToInt32(pos.Y), 200, 200, this);
     //if (this.pos.X > .9 * Game1.graphics.GraphicsDevice.Viewport.Width)
     //{
     //    pos.X = Convert.ToInt32(.1 * Game1.graphics.GraphicsDevice.Viewport.Width) + 1;
     //}
     //else if (pos.X < .1 * Game1.graphics.GraphicsDevice.Viewport.Width)
     //{
     //    pos.X = Convert.ToInt32(.9 * Game1.graphics.GraphicsDevice.Viewport.Width) - 1;
     //}
 }
 public bool Test(PlayerTest player, int num, Hexagon hex)
 {
     bool temp = true;
     if (hex.room.Connections[num])
     {
         foreach (Vector2 v in ints)
         {
             if (new Rectangle(player.bounding.X, player.bounding.Y, 1, 1).Contains(new Rectangle(Convert.ToInt32(v.X), Convert.ToInt32(v.Y), 1, 1)))
             {
                 temp = false;
             }
         }
     }
     return temp;
 }