/// <summary> /// Constructor for Including Score /// /// </summary> public Menu(ICanyonShooterGame game, string name, bool score) : base(game as Game) { assetName = "Config\\" + name + ".xml"; this.game = game; this.currentMenu = name; menuXml = game.Content.Load <MenuDescription>("Content\\Menu\\" + name); this.visible = true; this.isActive = true; steuerung = new MenuControl(this, game); //Erstellung des Hauptmenüs MainList Menu = new MainList(game, name, menuXml, true); CurrentList = Menu; shifts = Menu; this.scoring = score; if (score) { this.startscoring = true; this.score = game.GameStates.Score; } this.DrawOrder = (int)DrawOrderType.Menu; }
// Konstuktor // Dieser Konstruktor kann von außen nicht erreicht werden. public HighscoreMenu(ICanyonShooterGame game, string MenuName, int difficulty) : base(game as Game) { this.game = game; this.visible = true; this.Active = true; this.xml = game.Content.Load <MenuDescription>("Content\\Menu\\Hauptmenu"); this.currentmenu = MenuName; foreach (MenupartDescription i in xml.MenuParts) { if (i.Name == MenuName) { this.Scorelist = new Listbox(game, new Vector2(i.MenuPosition.X, i.MenuPosition.Y), true, xml, difficulty); } } steuerung = new MenuControl((Menu)game.GameStates.Menu, game); }
//Constructor public Menu(ICanyonShooterGame game, string name) : base(game as Game) { assetName = "Config\\" + name + ".xml"; this.game = game; this.currentMenu = name; menuXml = game.Content.Load <MenuDescription>("Content\\Menu\\" + name); this.visible = true; this.isActive = true; steuerung = new MenuControl(this, game); //Prompts = PromptCollection.getInstance(); //Erstellung des Hauptmenüs MainList Menu = new MainList(game, name, menuXml, true); CurrentList = Menu; shifts = Menu; //this.OptionMenu = new Option(game,this.menuXml); this.DrawOrder = (int)DrawOrderType.Menu; }