Exemplo n.º 1
0
 /// <summary>
 /// Créer les menus
 /// </summary>
 private void SetMenus()
 {
     if (IsKinectMode)
     {
         IsOnePlayer = true;
         PlayingMenu = new MenuKinect(this, kinectInput);
         DifficultyMenu = new MenuKinect(this, kinectInput);
         PauseMenu = new MenuKinect(this, kinectInput);
         EndMenu = new MenuKinect(this, kinectInput);
     }
     else
     {
         PlayingMenu = new MenuKeyboard(this, keyboardInput);
         DifficultyMenu = new MenuKeyboard(this, keyboardInput);
         PauseMenu = new MenuKeyboard(this, keyboardInput);
         EndMenu = new MenuKeyboard(this, keyboardInput);
     }
     SetMenu(PlayingMenu, "Jouer", "Choisis le nombre de joueurs", new List<string>() { "1 joueur", "2 joueurs" });
     SetMenu(DifficultyMenu, "Difficultés", "Choisis la difficultées", new List<string>() { "Facile", "Moyen", "Difficile" });
     SetMenu(PauseMenu, "Pause", "Que veux-tu faire ?", new List<string>() { "Reprendre", "Menu"});
     SetMenu(EndMenu, "Fin du jeu", "", new List<string>() { "Menu",  });
 }
Exemplo n.º 2
0
 /// <summary>
 /// Creer les menus
 /// </summary>
 private void SetMenus()
 {
     if (IsKinectMode)
     {
         kinectInput = new KinectInput(this);
         IsOnePlayer = true;
         PlayingMenu = new MenuKinect(this, "KiPong", new List<string>() { "1 joueur", "2 joueurs" }, kinectInput);
         DifficultyMenu = new MenuKinect(this, "Difficultes", new List<string>() { "Facile", "Medium", "Difficile" }, kinectInput);
         PauseMenu = new MenuKinect(this, "Pause", new List<string>() { "Reprendre", "Menu", "Quitter" }, kinectInput);
         EndMenu = new MenuKinect(this, "", new List<string>() { "Menu", "Quitter" }, kinectInput);
     }
     else
     {
         PlayingMenu = new MenuKeyboard(this, "KiPong", new List<string>() { "1 joueur", "2 joueurs" }, keyboardInput);
         DifficultyMenu = new MenuKeyboard(this, "Difficultes", new List<string>() { "Facile", "Medium", "Difficile" }, keyboardInput);
         PauseMenu = new MenuKeyboard(this, "Pause", new List<string>() { "Reprendre", "Menu", "Quitter" }, keyboardInput);
         EndMenu = new MenuKeyboard(this, "", new List<string>() { "Menu", "Quitter" }, keyboardInput);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Itialize un menu
 /// </summary>
 /// <param name="menu">Le menu à initializer</param>
 /// <param name="title">Le title du menu</param>
 /// <param name="desc">La description qui sera dite par la synthèse vocale</param>
 /// <param name="items">Les différent boutons</param>
 private void SetMenu(Menu menu, string title, string desc, List<string> items)
 {
     menu.Title = title;
     menu.Description = desc;
     menu.MenuItems = items;
 }