public PlayerTest(NodeTest room, Rectangle bounding, Player player) { this.room = room; this.bounding = bounding; items = new List <Item>(); visitedRooms = new List <NodeTest>(); this.player = player; }
public Hexagon(int x, int y, int width, int height, NodeTest room) { this.x = x; this.y = y; this.width = width; this.height = height; a = new Point(x + 151, y); b = new Point(x + 200, y + 100); c = new Point(x + 151, y + 200); d = new Point(x + 48, y + 200); e = new Point(x, y + 100); f = new Point(x + 48, y); this.twelve = new Line(f.X, f.Y, a.X, a.Y); this.two = new Line(a.X, a.Y, b.X, b.Y); this.four = new Line(c.X, c.Y - 1, b.X, b.Y); this.six = new Line(d.X, d.Y, c.X, c.Y); this.eight = new Line(e.X - 1, e.Y + 1, d.X, d.Y); this.ten = new Line(e.X, e.Y - 1, f.X, f.Y - 1); this.room = room; this.Update(); }
public void Update(List <NodeTest> nodes) { foreach (NodeTest node in Game1.nodes) { NodeTest temp = room; if (node != temp) { node.hex.checkArea(new Point(375, 125), this); } foreach (Node n in node.node.connections) { if (Engine.valueList[node.node.nodeNumber - 1][0] == n.nodeNumber) { node.Connections[0] = true; } if (Engine.valueList[node.node.nodeNumber - 1][1] == n.nodeNumber) { node.Connections[1] = true; } if (Engine.valueList[node.node.nodeNumber - 1][2] == n.nodeNumber) { node.Connections[2] = true; } if (Engine.valueList[node.node.nodeNumber - 1][3] == n.nodeNumber) { node.Connections[3] = true; } if (Engine.valueList[node.node.nodeNumber - 1][4] == n.nodeNumber) { node.Connections[4] = true; } if (Engine.valueList[node.node.nodeNumber - 1][5] == n.nodeNumber) { node.Connections[5] = true; } } //if (Math.Abs(node.pos.X - room.pos.X) < 5 && Math.Abs(node.pos.Y - room.pos.Y - 200) < 5) //{ // if (room.node.connections.Contains(node.node)) // { // room.Connections[0] = true; // } // else // { // room.Connections[0] = false; // } //} //else if (Math.Abs(node.pos.X - room.pos.X - 150) < 5 && Math.Abs(node.pos.Y - room.pos.Y - 100) < 5) //{ // if (room.node.connections.Contains(node.node)) // { // room.Connections[1] = true; // } // else // { // room.Connections[1] = false; // } //} //else if (Math.Abs(node.pos.X - room.pos.X - 150) < 5 && Math.Abs(node.pos.Y - room.pos.Y + 100) < 5) //{ // if (room.node.connections.Contains(node.node)) // { // room.Connections[2] = true; // } // else // { // room.Connections[2] = false; // } //} //else if (Math.Abs(node.pos.X - room.pos.X) < 5 && Math.Abs(node.pos.Y - room.pos.Y + 200) < 5) //{ // if (room.node.connections.Contains(node.node)) // { // room.Connections[3] = true; // } // else // { // room.Connections[3] = false; // } //} //else if (Math.Abs(node.pos.X - room.pos.X + 150) < 5 && Math.Abs(node.pos.Y - room.pos.Y + 100) < 5) //{ // if (room.node.connections.Contains(node.node)) // { // room.Connections[4] = true; // } // else // { // room.Connections[4] = false; // } //} //else if (Math.Abs(node.pos.X - room.pos.X + 150) < 5 && Math.Abs(node.pos.Y - room.pos.Y - 100) < 5) //{ // if (room.node.connections.Contains(node.node)) // { // room.Connections[5] = true; // } // else // { // room.Connections[5] = false; // } //} } room.Update(); }
public PlayerTest(NodeTest room, Rectangle bounding, Player player) { this.room = room; this.bounding = bounding; items = new List<Item>(); visitedRooms = new List<NodeTest>(); this.player = player; }
public void Update(PlayerTest test) { Location = test.room; }
public Player(PlayerTest test, int arrows, int gold) { Location = test.room; Arrows = arrows; Gold = gold; }