// Update is called once per frame (slower) void FixedUpdate() { // exit if there is no change if (last_screen == screen) { return; } this.last_screen = screen; mainmenu_panel.SetActive(false); tutorials_panel.SetActive(false); back_button_panel.SetActive(false); confirm_button_panel.SetActive(false); switch (this.screen) { case MainMenuScreen.MAIN_MENU: this.mainmenu_panel.SetActive(true); break; case MainMenuScreen.TUTORIALS: this.tutorials_panel.SetActive(true); this.back_button_panel.SetActive(true); this.back = BackCall.MAIN_MENU; break; case MainMenuScreen.UNKNOWN: default: break; } }
public Login() { InitializeComponent(); bc += Check; _c.UserLogin += ServerCall; #region setSettings this.textBox1.Text = _cs.LoginSettings.Name; this.textBox2.Text = _cs.LoginSettings.Pass; this.checkBox1.Checked = _cs.LoginSettings.AutoLogin; #endregion if(_cs.LoginSettings.AutoLogin) Button1Click(null,null); }
// Use this for initialization void Start() { this.confirm = ConfirmCall.UNKNOWN; this.back = BackCall.UNKNOWN; this.screen = MainMenuScreen.MAIN_MENU; // convert text file to texts (string array) tutorial_menu_texts = tutorial_text_file.text.Split( new string[] { "--END--\r\n" }, System.StringSplitOptions.None); // Get text and title from tutorial panel this.tutorial_text_title = Utilities.GetChildrenByName(this.tutorial_panel, "Title"); this.tutorial_text = Utilities.GetChildrenByName(this.tutorial_panel, "Text"); }