IEnumerator TryRegister() { registerPanel.Disable(); var user = new Player() { Username = Username.Text, Password = Password.Text, Email = Email.Text, Level = 1, Health = 100 }; Task signUpTask = user.SignUpAsync(); while (!signUpTask.IsCompleted) { yield return(null); } if (signUpTask.IsFaulted || signUpTask.IsCanceled) { DialogPanel.Show("Think differently", "The username or email adress is already in use. Please choose something even more original."); DialogPanel.Dismissed += new global::DialogPanel.DismissedEventHandler(DialogPanel_Dismissed); } else { LoginPanel.GetComponent <LoginPanel>().Username.Text = user.Username; LoginPanel.GetComponent <LoginPanel>().Password.Text = Password.Text; registerPanel.Hide(); LoginPanel.Show(); } }
public void CloseDialog() { if (guiCamera != null) { Destroy(guiCamera); guiCamera = null; } if (guiCameraLight != null) { Destroy(guiCameraLight); guiCameraLight = null; } if (renderObject != null) { Destroy(renderObject); renderObject = null; } dialogPanel.Hide(); exitButton.Hide(); restartButton.Hide(); Time.timeScale = 1; if (endGame) { ShowStatsDialog(); } }
public static void Hide() { // Hide the panel and make sure the collider is // behind everything else _panel.Hide(); _panel.SendToBack(); }
void RegisterButton_Click(dfControl control, dfMouseEventArgs mouseEvent) { loginPanel.Hide(); RegisterPanel.Show(); RegisterPanel.GetComponent <RegisterPanel>().Username.Text = Username.Text; RegisterPanel.GetComponent <RegisterPanel>().Password.Text = Password.Text; }
// Use this for initialization void Start() { _label = transform.Find("Label").GetComponent <dfLabel>(); _button = transform.Find("Button").GetComponent <dfButton>(); _panel = GetComponent <dfPanel>(); _panel.Hide(); _button.Click += button_Click; }
public virtual void Hide() { if (hideTweensOwner != null) { hideTweensOwner.Play(); } else { owner.Hide(); } }
void CloseButton_Click(dfControl control, dfMouseEventArgs mouseEvent) { RobotFlash.Stop(); MissionFlash.Stop(); BrainsFlash.Stop(); RobotFlash.Reset(); MissionFlash.Reset(); BrainsFlash.Reset(); panel.Hide(); PlayerPrefs.SetInt(TUTORIAL_SEEN, 1); }
// Use this for initialization void Start() { panel = GetComponent <dfPanel>(); CloseButton.Click += new MouseEventHandler(CloseButton_Click); NextButton.Click += new MouseEventHandler(NextButton_Click); PrevButton.Click += new MouseEventHandler(PrevButton_Click); UpdatePage(); if (PlayerPrefs.GetInt(TUTORIAL_SEEN, 0) == 1) { panel.Hide(); } }
// Called by Unity just before any of the Update methods is called the first time. public void Start() { // Store the singleton instance for reference in static functions _instance = this; // Obtain a reference to the control instances attached to this object _panel = GetComponent <dfPanel>(); _name = _panel.Find <dfLabel>("lblName"); _info = _panel.Find <dfLabel>("lblInfo"); // We don't want the tooltip visible unless it is being used _panel.Hide(); // We don't want the tooltip to intercept mouse messages _panel.IsInteractive = false; _panel.IsEnabled = false; }
// Use this for initialization void Start() { Panel = this.GetComponent <dfPanel>(); int mission = PlayerPrefs.GetInt(MissionPanel.CURRENT_MISSION, 1); CloseButton.Click += new MouseEventHandler(CloseButton_Click); bool seen = PlayerPrefs.GetInt(string.Format("Mission{0}Seen", mission), 0) == 1; if (seen) { Panel.Hide(); } else { AssignText(); } }
// Called by Unity just before any of the Update methods is called the first time. public void Start() { // Store the singleton instance for reference in static functions _instance = this; // Obtain a reference to the control instances attached to this object _panel = GetComponent<dfPanel>(); _name = _panel.Find<dfLabel>( "lblName" ); _info = _panel.Find<dfLabel>( "lblInfo" ); // We don't want the tooltip visible unless it is being used _panel.Hide(); // We don't want the tooltip to intercept mouse messages _panel.IsInteractive = false; _panel.IsEnabled = false; }
public void SetVisible(bool visible) { this.entryLabel.Text = (!this.changingEntry ? "Password:"******"New Password:"); dfPanel component = base.GetComponent <dfPanel>(); if (!visible) { component.Hide(); this.passwordInput.Unfocus(); } else { component.Show(); component.BringToFront(); this.passwordInput.Text = string.Empty; this.passwordInput.Focus(); } base.gameObject.SetActive(visible); }
// Use this for initialization void Start() { loginPanel = GetComponent <dfPanel>(); if (ParseUser.CurrentUser != null) { // User is logged in - proceed loginPanel.Hide(); DoLogin(); return; } // Show login screen LoginButton.Click += new MouseEventHandler(LoginButton_Click); RegisterButton.Click += new MouseEventHandler(RegisterButton_Click); ForgotButton.Click += new MouseEventHandler(ForgotButton_Click); loginPanel.KeyDown += new KeyPressHandler(loginPanel_KeyDown); DialogPanel.Dismissed += new global::DialogPanel.DismissedEventHandler(DialogPanel_Dismissed); }
void CancelButton_Click(dfControl control, dfMouseEventArgs mouseEvent) { playerToInvite = null; InvitePanel.Hide(); }
void weaponButton_Click(dfControl control, dfMouseEventArgs mouseEvent) { panel.Hide(); }
public void Hide() { _panel.Hide(); }
void ResumeButton_Click(dfControl control, dfMouseEventArgs mouseEvent) { panel.Hide(); Time.timeScale = 1; }
void button_Click(dfControl control, dfMouseEventArgs mouseEvent) { _panel.Hide(); }
void BackButton_Click(dfControl control, dfMouseEventArgs mouseEvent) { WaitPanel.Hide(); panel.Enable(); }
void CloseButton_Click(dfControl control, dfMouseEventArgs mouseEvent) { Panel.Hide(); }
private void DoStarting() { panelQuit.Hide(); showTutorial = true; status = ControllerStatus.started; }
void StartButton_Click(dfControl control, dfMouseEventArgs mouseEvent) { Time.timeScale = 1; panel.Hide(); }