private void LoadOverlay() { RootList.Add(new EditorMouse()); OverlayStatus overlay = new OverlayStatus(this); RootList.Add(overlay); overlay.AddStatus("Floor", new TileOverlay(this, "Content/Editor/Tiles/Floor.txt")); overlay.AddStatus("Wall", new TileOverlay(this, "Content/Editor/Tiles/Wall.txt")); //overlay.AddStatus("Cave", new TileOverlay(this, "Content/Editor/Tiles/Cave.txt")); overlay.AddStatus("Tree", new TileOverlay(this, "Content/Editor/Tiles/Tree.txt")); overlay.AddStatus("Items", new EntityOverlay(this, "Content/Editor/Entities/Item.txt")); overlay.AddStatus("Objects-1", new EntityOverlay(this, "Content/Editor/Entities/Object.txt")); overlay.AddStatus("Objects-2", new EntityOverlay(this, "Content/Editor/Entities/Objects2.txt")); //overlay.AddStatus("Cave_Objects", new EntityOverlay(this, "Content/Editor/Entities/Cave_Object.txt")); overlay.AddStatus("Enemies", new EntityOverlay(this, "Content/Editor/Entities/Enemy.txt")); overlay.AddStatus("Spawn", new EntityOverlay(this, "Content/Editor/Entities/Spawn.txt")); LevelGrid levelGrid = GetObject("levelgrid") as LevelGrid; Camera camera = new Camera(); camera.SetupCamera = levelGrid.AnchorPosition(5, 5) - GameEnvironment.Screen.ToVector2() / 2; RootList.Add(camera); }
public override void HandleInput(InputHelper inputHelper) { base.HandleInput(inputHelper); if (pressed) { OverlayStatus overlay = GameWorld.GetObject("overlay") as OverlayStatus; if (overlay != null) { overlay.ActiveStatus(text); } } }