コード例 #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();
        }
    }
コード例 #3
0
 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
ファイル: ihntPanelBase.cs プロジェクト: k-payl/Runner
 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();
        }
    }
コード例 #9
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;
    }
コード例 #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
ファイル: LockEntry1.cs プロジェクト: sknchan/LegacyRust
    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
ファイル: MainMenu.cs プロジェクト: richardlalancette/Thesis
 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();
 }