Пример #1
0
    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();
        }
    }
Пример #2
0
    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();
 }
Пример #4
0
 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;
 }
Пример #5
0
    // 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;
    }
Пример #6
0
 public virtual void Hide()
 {
     if (hideTweensOwner != null)
     {
         hideTweensOwner.Play();
     }
     else
     {
         owner.Hide();
     }
 }
Пример #7
0
    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);
    }
Пример #8
0
    // 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;
    }
Пример #10
0
    // 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();
        }
    }
Пример #11
0
    // 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;
    }
Пример #12
0
    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);
    }
Пример #13
0
    // 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);
    }
Пример #14
0
 void CancelButton_Click(dfControl control, dfMouseEventArgs mouseEvent)
 {
     playerToInvite = null;
     InvitePanel.Hide();
 }
Пример #15
0
 void weaponButton_Click(dfControl control, dfMouseEventArgs mouseEvent)
 {
     panel.Hide();
 }
Пример #16
0
 public void Hide()
 {
     _panel.Hide();
 }
Пример #17
0
 void ResumeButton_Click(dfControl control, dfMouseEventArgs mouseEvent)
 {
     panel.Hide();
     Time.timeScale = 1;
 }
Пример #18
0
 void button_Click(dfControl control, dfMouseEventArgs mouseEvent)
 {
     _panel.Hide();
 }
Пример #19
0
 void BackButton_Click(dfControl control, dfMouseEventArgs mouseEvent)
 {
     WaitPanel.Hide();
     panel.Enable();
 }
Пример #20
0
 void CloseButton_Click(dfControl control, dfMouseEventArgs mouseEvent)
 {
     Panel.Hide();
 }
Пример #21
0
 private void DoStarting()
 {
     panelQuit.Hide();
     showTutorial = true;
     status       = ControllerStatus.started;
 }
Пример #22
0
 void StartButton_Click(dfControl control, dfMouseEventArgs mouseEvent)
 {
     Time.timeScale = 1;
     panel.Hide();
 }