public void Input(InputState input) { if (bool_1) { _statut = Statut_Popup.Option_1; bool_1 = false; bouton_1._bouton_tapped = false; } else if (bool_2) { _statut = Statut_Popup.Option_2; bool_2 = false; bouton_2._bouton_tapped = false; } foreach (GestureSample gesture in input.Gestures) { if (gesture.GestureType == GestureType.Tap) { if (bouton_1.Input(gesture.Position)) { bool_1 = true; } if (bouton_2.Input(gesture.Position)) { bool_2 = true; } } } }
public void Input(InputState input) { if (bool_draw) { if (bool_1) { _statut = Statut_Fin.Rejouer; bool_1 = false; } else if (bool_2) { _statut = Statut_Fin.Menu; bool_2 = false; } bool_draw = false; } foreach (GestureSample gesture in input.Gestures) { if (gesture.GestureType == GestureType.Tap) { if (bouton_1.Input(gesture.Position)) { bool_1 = true; } if (bouton_2.Input(gesture.Position)) { bool_2 = true; } } } }
public override void HandleInput(InputState input) { foreach (GestureSample gesture in input.Gestures) { if (gesture.GestureType == GestureType.Tap) { if (bouton_1.Input(gesture.Position)) { Sortie_ecran = TypeEcranAnnimation.Jouer; _need_draw_check = true; } if (bouton_2.Input(gesture.Position)) { Sortie_ecran = TypeEcranAnnimation.Option; _need_draw_check = true; } if (bouton_3.Input(gesture.Position)) { Sortie_ecran = TypeEcranAnnimation.Quitter; _need_draw_check = true; } } } base.HandleInput(input); }
public override void HandleInput(InputState input) { if (_no_co._statut != No_Connection_POPUP.Statut_Popup.Wait) { _no_co.Input(input); if (_no_co._statut == No_Connection_POPUP.Statut_Popup.Option_1) { _no_co._statut = No_Connection_POPUP.Statut_Popup.Wait; Statut_Normal(); _name = ""; keyboard.Changer_en_MAJ(); server = new Echange_Server_Class(); } else if (_no_co._statut == No_Connection_POPUP.Statut_Popup.Option_2) { No_Name(); } } else { keyboard.Input_Keyboard(input); foreach (GestureSample gesture in input.Gestures) { if (gesture.GestureType == GestureType.Tap) { if (_statut_bouton == Statut_Bouton.Normal && bouton_1.Input(gesture.Position)) { Check(); } else if (_statut_bouton == Statut_Bouton.Attente_Confirmation && bouton_1.Input(gesture.Position)) { Statut_Envoie(); } else if (gesture.Position.X > _quit_position.X && gesture.Position.X < _quit_position.X + (_quit_texture.Width * font_manage._scale) && gesture.Position.Y > _quit_position.Y && gesture.Position.Y < _quit_position.Y + (_quit_texture.Height * font_manage._scale)) { No_Name(); } } } } base.HandleInput(input); }
public override void HandleInput(InputState input) { if (_no_co._statut != No_Connection_POPUP.Statut_Popup.Wait) { _no_co.Input(input); if (_no_co._statut == No_Connection_POPUP.Statut_Popup.Option_1) { _no_co._statut = No_Connection_POPUP.Statut_Popup.Wait; server.CloseConnection(); server = new Echange_Server_Class(); server.Ajout_Joueur_Liste_Attente(_id, _code); } else if (_no_co._statut == No_Connection_POPUP.Statut_Popup.Option_2) { server.CloseConnection(); this.ExitScreen(); ScreenManager.AddScreen(new MainMenuScreen()); } } else if (popup.is_active) { popup.Input(input); } else { foreach (GestureSample gesture in input.Gestures) { if (gesture.GestureType == GestureType.Tap) { if (_bouton_1.Input(gesture.Position)) { this.ExitScreen(); ScreenManager.AddScreen(new PlayClass(server, is_dans_salle_attente)); } if (_bouton_2.Input(gesture.Position)) { server.CloseConnection(); this.ExitScreen(); ScreenManager.AddScreen(new MainMenuScreen()); } } } } base.HandleInput(input); }
public override void HandleInput(InputState input) { if (_tapped_bot) { Partie_Vs_Bot(); } else if (_tapped_multi) { Partie_Multi(); } foreach (GestureSample gesture in input.Gestures) { if (gesture.GestureType == GestureType.Tap) { if (gesture.Position.X > position_back.X && gesture.Position.X < position_back.X + (back.Width * _scale) && gesture.Position.Y > position_back.Y && gesture.Position.Y < position_back.Y + (back.Height * _scale)) { Quitter(); } } if (gesture.GestureType == GestureType.Tap) { if (bouton_1.Input(gesture.Position)) { _tapped_bot = true; } } if (gesture.GestureType == GestureType.Tap) { if (bouton_2.Input(gesture.Position)) { _tapped_multi = true; } } } base.HandleInput(input); }
public override void HandleInput(InputState input) { foreach (GestureSample gesture in input.Gestures) { if (gesture.GestureType == GestureType.Tap) { if (gesture.Position.X > position_back.X && gesture.Position.X < position_back.X + (back.Width * _scale) && gesture.Position.Y > position_back.Y && gesture.Position.Y < position_back.Y + (back.Height * _scale)) { Quitter(); } } if (gesture.GestureType == GestureType.Tap) { if (bouton_1.Input(gesture.Position)) { Change_Side(); } } if (gesture.GestureType == GestureType.Tap) { if (bouton_2.Input(gesture.Position)) { Change_Name(); } } if (gesture.GestureType == GestureType.Tap) { if (bouton_3.Input(gesture.Position)) { Show_Help(); } } } base.HandleInput(input); }
public void Input(InputState input) { if (option_1) { _server.Client_Valid_Or_Refuse_Game(_id, _id_partie_found, _code, "1"); option_1 = false; bouton_1._bouton_tapped = false; statut = Statut_Pop_Up.Accept; } else if (option_2) { _server.Client_Valid_Or_Refuse_Game(_id, _id_partie_found, _code, "0"); option_2 = false; bouton_2._bouton_tapped = false; statut = Statut_Pop_Up.Refuse; Reset_Bouton_Phase_2(); } else if (option_3) { statut = Statut_Pop_Up.Retour_liste_attente; option_3 = false; _ping_partie = false; bouton_1._bouton_tapped = false; } else if (option_4) { statut = Statut_Pop_Up.Retour_Menu; option_4 = false; bouton_2._bouton_tapped = false; } if (!_server.Echange_en_cours) { if (!_out_of_time && !_adversaire_refuse) { foreach (GestureSample gesture in input.Gestures) { if (gesture.GestureType == GestureType.Tap) { if (bouton_1.Input(gesture.Position)) { option_1 = true; } if (bouton_2.Input(gesture.Position)) { option_2 = true; } } } } else { foreach (GestureSample gesture in input.Gestures) { if (gesture.GestureType == GestureType.Tap) { if (bouton_1.Input(gesture.Position)) { option_3 = true; } if (bouton_2.Input(gesture.Position)) { option_4 = true; } } } } } }