public ActionList(Game game, String interactor) : base(game) { game.Components.Add(this); listPosition = new Vector2(posOutsideScreenX, 0); //set start position outside screen posX = posOutsideScreenX; //creates background of action list background = new ScreenElement(game, @"img\GameObjects\ActionList\background", listPosition, 0.8f); // create list of specific interactor if (interactor == "Cheese") { //creates JumpButton JumpButton = new ScreenElement(game, @"img\GameObjects\ActionList\jumpButton", new Vector2(posOutsideScreenX, listPosition.Y), 0.9f); BridgeButton = new ScreenElement(game, @"img\GameObjects\ActionList\bridgeButton", new Vector2(posOutsideScreenX, listPosition.Y), 0.9f); AttackButton = new ScreenElement(game, @"img\GameObjects\ActionList\attackButton", new Vector2(posOutsideScreenX, listPosition.Y), 0.9f); } if (interactor == "Bob") { //creates TalkButton TalkButton = new ScreenElement(game, @"img\GameObjects\ActionList\talkButton.png", new Vector2(posOutsideScreenX, listPosition.Y), 0.9f); } }
public TitleScreen(Game game) { //creates background //Background = new ScreenElement(game, @"img\ScreenElements\background", new Vector2(0, 0), 0); Background = new ScreenElement(game, @"img\ScreenElements\whitepaper_and_logo", new Vector2(0, 0), 0); //creates Startbutton StartButton = new ScreenElement(game, @"img\ScreenElements\start", new Vector2(game.GraphicsDevice.Viewport.Width / 2 + 180, 280), 0.2f); //creates ExitButton ExitButton = new ScreenElement(game, @"img\ScreenElements\stop", new Vector2(game.GraphicsDevice.Viewport.Width / 2 + 180, 380), 0.2f); }
public ConsoleInterface(Game game) : base(game) { game.Components.Add(this); //set start position outside screen posX = posOutsideScreenX; //creates background console = new ScreenElement(game, @"img\GameObjects\Console\console", new Vector2(posX, 30), 0.8f); //creates Startbutton RunButton = new ScreenElement(game, @"img\GameObjects\Console\runbutton", new Vector2(posX, 330), 0.5f); }