public MapEditor(ContentManager content, int mapWidth, int mapHeight, int vNodeCount, int hNodeCount) { Dictionary<NodeType, Texture2D> textures = new Dictionary<NodeType,Texture2D>(); verticalNodeCount = vNodeCount; horizontalNodeCount = hNodeCount; nodeWidth = mapWidth / horizontalNodeCount; nodeHeight = mapHeight / verticalNodeCount; // Load the textures for the different node types textures.Add(NodeType.Buildable, content.Load<Texture2D>("images/bgBuildable")); textures.Add(NodeType.NonBuildable, content.Load<Texture2D>("images/bgNonBuildable")); textures.Add(NodeType.Path, content.Load<Texture2D>("images/bgPath")); textures.Add(NodeType.PathEnd, content.Load<Texture2D>("images/bgPathEnd")); textures.Add(NodeType.PathStart, content.Load<Texture2D>("images/bgPathStart")); int[,] layout = CreateLayout(vNodeCount, hNodeCount); map = new Map(layout, textures, null); }
private void InitLevel() { nightmares = new List<Nightmare>(); towers = new List<Tower>(); projectiles = new List<Projectile>(); map = new Map(config.Layout, LoadTextures(), config.Waypoints); // TODO: Enter code to create waypoints }