void Awake() { _montage = GameObject.Find("MainScene").GetComponent<Montage>(); _guistart = GameObject.Find("MainScene").GetComponent<GUIStart>(); _cb = GetComponent<GUIDialogBox>(); _plugPhoto = GameObject.Find("MainScene").GetComponent<PluginPhotoManagerGUI>(); #if UNITY_ANDROID //s'il y à un fichier autosave.cub enregistré, affichage boîte de dialogue proposant de charger cette scène if (PlayerPrefs.GetInt("autosave") == 1) { Debug.Log(" autosave à 1"); string path = usefullData.SavePath + "autosave" + usefullData.SaveNewFileExtention; if (File.Exists(path)) { _guistart.enabled = false; _askAutosave = true; _cb.showMe(true, GUI.depth); _cb.setBtns(TextManager.GetText("GUIMenuRight.Yes"), TextManager.GetText("GUIMenuRight.No")); _cb.setText(TextManager.GetText("GUIMenuRight.AskAutoSave1") + "\n" + TextManager.GetText("GUIMenuRight.AskAutoSave2")); } PlayerPrefs.SetInt("autosave", 0); } #endif }
public void TestButtonIsDisabled() { GUIStart gui = new GUIStart(); gui.NameTextBox = ""; gui.DescTextBox = "typist"; //expected to be false since name is empty; Assert.IsFalse(gui.ButtonStartEnabled); }
public void TestButtonIsEnabled() { GUIStart gui = new GUIStart(); gui.NameTextBox = "name"; gui.DescTextBox = "typist"; //expected to be true; Assert.IsTrue(gui.ButtonStartEnabled); }