void Start() { save = FindObjectOfType <Sauvegarde>(); if (Application.platform == RuntimePlatform.Android) { path = Path.Combine(Application.persistentDataPath, fileName); } else { path = Path.Combine(Application.streamingAssetsPath, fileName); } if (File.Exists(path) == false) { Save_Highest(); } else { ChargefromFile(); } NbGamePlayed++; float now = save.Get_assos() + 2 * save.Get_etude() + save.Get_sociabilite(); if (save.Get_langue() == 0) { text.text = " Statistics : \n\n\n "; } else { text.text = " Statistiques : \n\n\n "; } if (now > HighestScore) { HighestScore = now; if (save.Get_langue() == 0) { text.text = text.text + " Félicitations ! Tu as battu ton meilleur score\n"; } else { text.text = text.text + " Congratulations ! You've beated your Highest Score :D \n"; } } Display_text(); Save_Highest(); }
void Start() { save = FindObjectOfType <Sauvegarde>(); MaxEtude = 200f; CurrentEtude = save.Get_etude(); etude = GameObject.Find("Etude").GetComponent <Slider>(); textEtude = GameObject.Find("TextEtude").GetComponent <Text>(); UpdateEtude(); MaxAssos = 200f; CurrentAssos = save.Get_assos(); assos = GameObject.Find("Assos").GetComponent <Slider>(); textAssos = GameObject.Find("TextAssos").GetComponent <Text>(); UpdateAssos(); MaxSocial = 200f; CurrentSocial = save.Get_sociabilite(); social = GameObject.Find("Sociability").GetComponent <Slider>(); textSocial = GameObject.Find("TextSocial").GetComponent <Text>(); UpdateSocial(); }
private float Get_points() { return(save.Get_assos() + 2 * save.Get_etude() + save.Get_sociabilite()); }