// TODO: Passer la méthode en asynchrone pour avoir une barre de chargement public void OnClickNewGame() { // Initialize the stats of the player InitPlayerStats.NewGameInitStats(100); // Starts the game by loading the game UnityEngine.SceneManagement.SceneManager.LoadScene(1); }
void Awake() { // DEBUG: Initialize stats #if UNITY_EDITOR Lang.DefineLanguage(System.IO.Directory.GetFiles(".", "lang.fr.xml", System.IO.SearchOption.AllDirectories)[0], "French"); InitPlayerStats.NewGameInitStats(100); #endif Hunger = 100; Thirst = 100; _pnlCurrentBuffs = GameObject.Find("pnlCurrentBuffs"); _txtHungerValue = GameObject.Find("txtHungerValue").GetComponent <Text>(); _txtThirstValue = GameObject.Find("txtThirstValue").GetComponent <Text>(); GameObject.Find("txtHealthValue").GetComponent <Text>().text = CurrentHP + "/" + MaxHP + " " + Lang.GetString("ui.currenthp"); InvokeRepeating("LoweringHunger", 0, 2); InvokeRepeating("LoweringThirst", 0, 1); }