//main public menudepause(Game game, SpriteBatch spritebatch, SpriteFont spritefont, Texture2D image) : base(game,spritebatch) { string[] menuItems = { "inventaire", "caracteristique", "sauvegarde/charger", "retour au menu principale"}; this.image = image; menugenerale = new menugenerale(game, spriteBatch, spritefont, menuItems); compenents.Add(menugenerale); rec = new Rectangle(0, 0, game.Window.ClientBounds.Width, game.Window.ClientBounds.Height); }
//main public GameOverScreen(Game game, SpriteBatch spritebatch, SpriteFont spritefont, Texture2D image) : base(game,spritebatch) { string[] menuItems = { "recommencer ?", "retour au menu principal", "quitter"}; this.image = image; menugenerale = new menugenerale(game, spriteBatch, spritefont, menuItems); compenents.Add(menugenerale); rec = new Rectangle(0, 0, game.Window.ClientBounds.Width, game.Window.ClientBounds.Height); }
public menudujeu(Game game, SpriteBatch spriteBatch, SpriteFont spriteFont, Texture2D image) : base(game, spriteBatch) { string[] menuItems = { "nouveau jeu", "continue", "retour au menu principal" }; //les selcetions possible this.texture = image; //le fond d'ecrand menugeneral = new menugenerale(game, spriteBatch, spriteFont, menuItems); //rappel de la classe principale compenents.Add(menugeneral); //ajoute les selection possible pour l'affichage rectangle = new Rectangle(0, 0, game.Window.ClientBounds.Width, game.Window.ClientBounds.Height); //taille de l'ecran //note : pensez a faire des variable pour modifier taille d'ecran }
public menudujeu(Game game, SpriteBatch spriteBatch, SpriteFont spriteFont, Texture2D image, bool language) : base(game, spriteBatch) { XmlReader reader; reader = XmlReader.Create("Francais.xml"); if (!language) { reader = XmlReader.Create("English.xml"); } string op1 = "", op2 = "", op3 = ""; while (reader.Read()) while (reader.NodeType != XmlNodeType.EndElement) { reader.Read(); if (reader.Name == "nouv") { while (reader.NodeType != XmlNodeType.EndElement) { reader.Read(); if (reader.NodeType == XmlNodeType.Text) op1 = reader.Value.ToString(); } reader.Read(); } if (reader.Name == "continuer") { while (reader.NodeType != XmlNodeType.EndElement) { reader.Read(); if (reader.NodeType == XmlNodeType.Text) op2 = reader.Value.ToString(); } reader.Read(); } if (reader.Name == "retour") { while (reader.NodeType != XmlNodeType.EndElement) { reader.Read(); if (reader.NodeType == XmlNodeType.Text) op3 = reader.Value.ToString(); } reader.Read(); } } string[] menuItems = { op1, op2, op3 }; //les selcetions possible this.texture = image; //le fond d'ecrand menugeneral = new menugenerale(game, spriteBatch, spriteFont, menuItems); //rappel de la classe principale compenents.Add(menugeneral); //ajoute les selection possible pour l'affichage rectangle = new Rectangle(0, 0, game.Window.ClientBounds.Width, game.Window.ClientBounds.Height); //taille de l'ecran //note : pensez a faire des variable pour modifier taille d'ecran }
public menu(Game game, SpriteBatch spriteBatch, SpriteFont spriteFont, Texture2D image) : base(game, spriteBatch) { //les sous menu disponible string[] menuItems = { "1 joueur", "2 joueur", "editeur de map", "option", "quitter" }; menugeneral = new menugenerale(game, spriteBatch, spriteFont, menuItems); compenents.Add(menugeneral); this.image = image; imageRectangle = new Rectangle(0, 0, Game.Window.ClientBounds.Width, Game.Window.ClientBounds.Height); MediaPlayer.IsMuted = false; }
//main public GameOverScreen(Game game, gamemain main, SpriteBatch spritebatch, SpriteFont spritefont, Texture2D image, bool language) : base(game, spritebatch) { XmlReader reader; reader = XmlReader.Create("Francais.xml"); if (!language) { reader = XmlReader.Create("English.xml"); } string op1 = "", op2 = "", op3 = ""; while (reader.Read()) while (reader.NodeType != XmlNodeType.EndElement) { reader.Read(); if (reader.Name == "recommencer") { while (reader.NodeType != XmlNodeType.EndElement) { reader.Read(); if (reader.NodeType == XmlNodeType.Text) op1 = reader.Value.ToString(); } reader.Read(); } if (reader.Name == "retour") { while (reader.NodeType != XmlNodeType.EndElement) { reader.Read(); if (reader.NodeType == XmlNodeType.Text) op2 = reader.Value.ToString(); } reader.Read(); } if (reader.Name == "fin") { while (reader.NodeType != XmlNodeType.EndElement) { reader.Read(); if (reader.NodeType == XmlNodeType.Text) op3 = reader.Value.ToString(); } reader.Read(); } } string[] menuItems = { op1, op2, op3 }; this.image = image; menugenerale = new menugenerale(game, spriteBatch, spritefont, menuItems); compenents.Add(menugenerale); rec = new Rectangle(0, 0, game.Window.ClientBounds.Width, game.Window.ClientBounds.Height); }
public option(Game game, SpriteBatch spriteBatch, SpriteFont spriteFont, Texture2D _texture) : base(game, spriteBatch) { string[] menuItems = { "plein ecran", "fenetre", "activer son", "desactiver son", "retour au menu principale" }; plus = new BUTTON(ressource.plus, new Rectangle(game.Window.ClientBounds.Height / 2, game.Window.ClientBounds.Width / 2, 10, 10)); moin = new BUTTON(ressource.moin, new Rectangle(game.Window.ClientBounds.Height / 2, game.Window.ClientBounds.Width / 2 + 15, 10, 10)); mouse = new MouseEvent(); this.texture = _texture; menugenrale = new menugenerale(game, spriteBatch, spriteFont, menuItems); compenents.Add(menugenrale); rectangle = new Rectangle(0, 0, game.Window.ClientBounds.Width, game.Window.ClientBounds.Height); }
public option(Game game, SpriteBatch spriteBatch, SpriteFont spriteFont, Texture2D _texture, bool language) : base(game, spriteBatch) { langue = language; XmlReader reader; reader = XmlReader.Create("Francais.xml"); if (!language) { reader = XmlReader.Create("English.xml"); } string op1 = "", op2 = "", op3 = "", op4 = "", op5 = "", op6 = ""; while (reader.Read()) while (reader.NodeType != XmlNodeType.EndElement) { reader.Read(); if (reader.Name == "pleinecran") { while (reader.NodeType != XmlNodeType.EndElement) { reader.Read(); if (reader.NodeType == XmlNodeType.Text) op1 = reader.Value.ToString(); } reader.Read(); } if (reader.Name == "fenetre") { while (reader.NodeType != XmlNodeType.EndElement) { reader.Read(); if (reader.NodeType == XmlNodeType.Text) op2 = reader.Value.ToString(); } reader.Read(); } if (reader.Name == "activer") { while (reader.NodeType != XmlNodeType.EndElement) { reader.Read(); if (reader.NodeType == XmlNodeType.Text) op3 = reader.Value.ToString(); } reader.Read(); } if (reader.Name == "desactiver") { while (reader.NodeType != XmlNodeType.EndElement) { reader.Read(); if (reader.NodeType == XmlNodeType.Text) op4 = reader.Value.ToString(); } reader.Read(); } if (reader.Name == "langue") { while (reader.NodeType != XmlNodeType.EndElement) { reader.Read(); if (reader.NodeType == XmlNodeType.Text) op5 = reader.Value.ToString(); } reader.Read(); } if (reader.Name == "retour") { while (reader.NodeType != XmlNodeType.EndElement) { reader.Read(); if (reader.NodeType == XmlNodeType.Text) op6 = reader.Value.ToString(); } reader.Read(); } } string[] menuItems = { op1, op2, op3, op4, op5, op6 }; plus = new BUTTON(ressource.plus, new Rectangle(game.Window.ClientBounds.Height / 2, game.Window.ClientBounds.Width / 2, 10, 10)); moin = new BUTTON(ressource.moin, new Rectangle(game.Window.ClientBounds.Height / 2, game.Window.ClientBounds.Width / 2 + 15, 10, 10)); mouse = new MouseEvent(); this.texture = _texture; menugenrale = new menugenerale(game, spriteBatch, spriteFont, menuItems); compenents.Add(menugenrale); rectangle = new Rectangle(0, 0, game.Window.ClientBounds.Width, game.Window.ClientBounds.Height); }
public menu(Game game, SpriteBatch spriteBatch, SpriteFont spriteFont, Texture2D image, bool language) : base(game, spriteBatch) { //les sous menu disponible XmlReader reader; reader = XmlReader.Create("Francais.xml"); if (!language) { reader = XmlReader.Create("English.xml"); } string op1 = "", op2 = "", op3 = "", op4 = "", op5 = ""; while (reader.Read()) while (reader.NodeType != XmlNodeType.EndElement) { reader.Read(); if (reader.Name == "unj") { while (reader.NodeType != XmlNodeType.EndElement) { reader.Read(); if (reader.NodeType == XmlNodeType.Text) op1 = reader.Value.ToString(); } reader.Read(); } if (reader.Name == "deuxj") { while (reader.NodeType != XmlNodeType.EndElement) { reader.Read(); if (reader.NodeType == XmlNodeType.Text) op2 = reader.Value.ToString(); } reader.Read(); } if (reader.Name == "edm") { while (reader.NodeType != XmlNodeType.EndElement) { reader.Read(); if (reader.NodeType == XmlNodeType.Text) op3 = reader.Value.ToString(); } reader.Read(); } if (reader.Name == "options") { while (reader.NodeType != XmlNodeType.EndElement) { reader.Read(); if (reader.NodeType == XmlNodeType.Text) op4 = reader.Value.ToString(); } reader.Read(); } if (reader.Name == "fin") { while (reader.NodeType != XmlNodeType.EndElement) { reader.Read(); if (reader.NodeType == XmlNodeType.Text) op5 = reader.Value.ToString(); } reader.Read(); } } string[] menuItems = { op1, op2, op3, op4, op5 }; menugeneral = new menugenerale(game, spriteBatch, spriteFont, menuItems); compenents.Add(menugeneral); this.image = image; imageRectangle = new Rectangle(0, 0, Game.Window.ClientBounds.Width, Game.Window.ClientBounds.Height); MediaPlayer.IsMuted = false; }
//main public menudepause(Game game, SpriteBatch spritebatch, SpriteFont spritefont, Texture2D image, bool language) : base(game, spritebatch) { XmlReader reader; reader = XmlReader.Create("Francais.xml"); if (!language) { reader = XmlReader.Create("English.xml"); } string op1 = "", op2 = "", op3 = "", op4 = "", op5 = ""; while (reader.Read()) while (reader.NodeType != XmlNodeType.EndElement) { reader.Read(); if (reader.Name == "inventaire") { while (reader.NodeType != XmlNodeType.EndElement) { reader.Read(); if (reader.NodeType == XmlNodeType.Text) op1 = reader.Value.ToString(); } reader.Read(); } if (reader.Name == "caract") { while (reader.NodeType != XmlNodeType.EndElement) { reader.Read(); if (reader.NodeType == XmlNodeType.Text) op2 = reader.Value.ToString(); } reader.Read(); } if (reader.Name == "sauv") { while (reader.NodeType != XmlNodeType.EndElement) { reader.Read(); if (reader.NodeType == XmlNodeType.Text) op3 = reader.Value.ToString(); } reader.Read(); } if (reader.Name == "charger") { while (reader.NodeType != XmlNodeType.EndElement) { reader.Read(); if (reader.NodeType == XmlNodeType.Text) op4 = reader.Value.ToString(); } reader.Read(); } if (reader.Name == "retour") { while (reader.NodeType != XmlNodeType.EndElement) { reader.Read(); if (reader.NodeType == XmlNodeType.Text) op5 = reader.Value.ToString(); } reader.Read(); } } string[] menuItems = { op1, op2, op3, op4, op5 }; this.image = image; menugenerale = new menugenerale(game, spriteBatch, spritefont, menuItems); compenents.Add(menugenerale); rec = new Rectangle(0, 0, game.Window.ClientBounds.Width, game.Window.ClientBounds.Height); }