//////////////////////////////////////////////////////////////////////// /// /// @fn private void EtablirTouchesEtAI(int playerType) /// @brief Etablit les touches de jeu et active ou non l'AI selon le mode choisi. /// @param[in] playerType : Type de joueur (Solo, 2P, AI). /// @return Aucune. /// //////////////////////////////////////////////////////////////////////// private void EtablirTouchesEtAI(int playerType) { if (playerType == 1) { touches = new Touches(FonctionsNatives.obtenirTouchePGJ1(), FonctionsNatives.obtenirTouchePGJ1(), FonctionsNatives.obtenirTouchePDJ1(), FonctionsNatives.obtenirTouchePDJ1(), FonctionsNatives.obtenirToucheRessort()); FonctionsNatives.activerAI(false); } else if (playerType == 2) { touches = new Touches(FonctionsNatives.obtenirTouchePGJ1(), FonctionsNatives.obtenirTouchePGJ2(), FonctionsNatives.obtenirTouchePDJ1(), FonctionsNatives.obtenirTouchePDJ2(), FonctionsNatives.obtenirToucheRessort()); FonctionsNatives.activerAI(false); } else if (playerType == 3) { // Le 1337 est la pour rendre l'acces aux touches de joueur 2 invalide touches = new Touches(FonctionsNatives.obtenirTouchePGJ1(), 1337, FonctionsNatives.obtenirTouchePDJ1(), 1337, FonctionsNatives.obtenirToucheRessort()); FonctionsNatives.activerAI(true); } }