public void Enregitrement(bool partieFinie) { if (niv1 == false) { if (rej == true) { if ((int)timer != 0) { UnityEngine.Debug.Log("game over"); } else { UnityEngine.Debug.Log("BRAVO !!"); FinDePartie.gagner = true; //RegisterModif(username, scorePredit.ToString(), total.ToString(), table); UnityEngine.Debug.Log("hayaaaaaaa"); } } else { if (minutes == "00" || seconds == "00") { UnityEngine.Debug.Log("game over"); //Register(username, FirstTiming.ToString(), table, "F"); } else { UnityEngine.Debug.Log("BRAVO !!"); FinDePartie.gagner = true; //Register(username, FirstTiming.ToString(), table, "T"); } } } /* * else * { * if(partieFinie) * RegisterNiv1(username, FirstTiming.ToString(), table); * else * Register(username, FirstTiming.ToString(), table, "F"); * } */ if (partieFinie) { FinDePartie.gagner = true; } else { FinDePartie.gagner = false; } FinDePartie.score = (int)FirstTiming; load.PlayGame(6); }
public void TryToLogin() { status.text = ""; currentID = -1; if (inputUser.text == "" || inputPass.text == "") { status.text = "Veuillez Entrer Votre Pseudo Et Mot De Passe"; } else { for (int i = 0; i < registeredUsers.Length; i++) { if (inputUser.text == usernames[i]) { currentID = i; } } if (currentID == -1) { status.text = "Utilisateur Inexistant"; } else { if (inputPass.text == passwords[currentID]) { username = inputUser.text; load.PlayGame(2); } else { status.text = "Mot De Passe Erroné"; } } } }
// Start is called before the first frame update IEnumerator Start() { load = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <LoadScenes>(); scoreText.SetText("<sup> <#50aaff>Durée " + score + "</color></sup>"); if (!gagner) { BravoText.text = "<size=100%>V</size >ous <size=100%>A</size>vez <size=100%>E</size>choué !"; } yield return(new WaitForSeconds(10.0f)); load.PlayGame(2); }