Exemple #1
0
        private void CreateOneRoomNodes(IMap map, HashSet <string> edgeHash, Room room)
        {
            for (var x = 0; x < room.Width; x++)
            {
                for (var y = 0; y < room.Height; y++)
                {
                    var nodeX = x + (room.PositionX * 20);
                    var nodeY = y + (room.PositionY * 20);
                    var node  = new HexNode(nodeX, nodeY);
                    room.Nodes.Add(node);
                    map.AddNode(node);

                    RoomHelper.AddAllNeighborToMap(map, edgeHash, room, node);
                }
            }
        }