internal void Update(GameTime gameTime) { if (cs != null) { if (Input.MouseClicked) { if (toBuild == BuildingType.Holzfäller) { Holzfäller b = new Holzfäller(); b.PlaceOnMap(map, cs.GetCells()); cs = null; } } } if (Keyboard.GetState().IsKeyDown(Keys.D1)) { cs = new CellSelection(map, 2, 2); toBuild = BuildingType.Holzfäller; } if (cs != null) { cs.Update(gameTime); } }
public static void LoadContent(ContentManager content) { Gras.LoadContent(content, @"terrain\0"); Holzfäller.LoadContent(content, @"buildings\holzfäller"); MouseCursor.LoadContent(content, @"gui\cursor"); FreeSpace.LoadContent(content, @"gui\freespace"); BlockedSpace.LoadContent(content, @"gui\blockedspace"); Bar.LoadContent(content, @"gui\bar"); Holz.LoadContent(content, @"gui\holz"); Stein.LoadContent(content, @"gui\stein"); Werkzeug.LoadContent(content, @"gui\werkzeug"); Pixel.LoadContent(content, @"gui\pixel"); }