示例#1
0
    void Update()
    {
        if (!researchButton.IsVisible && Time.time > 1)
        {
            researchButton.Show();
        }

        if (muted && !AudioListener.pause)
        {
            AudioListener.pause = true;
        }
        else if (!muted && AudioListener.pause)
        {
            AudioListener.pause = false;
        }
    }
示例#2
0
        public static void OpenLoadErrorScreen(List <ModError> errors)
        {
            GameUIRoot.Instance.Manager.RenderCamera.depth          += 10f;
            GameUIRoot.Instance.Manager.RenderCamera.enabled         = true;
            GameUIRoot.Instance.Manager.overrideClearFlags           = CameraClearFlags.Color;
            GameUIRoot.Instance.Manager.RenderCamera.backgroundColor = Color.black;

            LoadErrorModLabels = new List <dfLabel>();
            for (int i = 0; i < errors.Count; i++)
            {
                var mod_name = GameUIRoot.Instance.Manager.AddControl <dfLabel>();
                mod_name.zindex          = 3;
                mod_name.AutoSize        = true;
                mod_name.Text            = errors[i].DisplayName;
                mod_name.BackgroundColor = Color.black;
                mod_name.Color           = Color.white;
                mod_name.Font            = GungeonFont;
                mod_name.TextScale       = 3;
                mod_name.IsVisible       = false;

                var mod_err = GameUIRoot.Instance.Manager.AddControl <dfLabel>();
                mod_err.zindex          = 3;
                mod_err.AutoSize        = true;
                mod_err.Text            = LocalizeException(errors[i].Exception);
                mod_err.BackgroundColor = Color.black;
                mod_err.Color           = Color.gray;
                mod_err.Font            = UI.GungeonFont;
                mod_err.TextScale       = 3;
                mod_err.IsVisible       = false;
                mod_err.WordWrap        = true;
                mod_err.MaximumSize     = new Vector3(Screen.width * 0.95f, Screen.height);

                LoadErrorModLabels.Add(mod_name);
                LoadErrorModLabels.Add(mod_err);
            }

            UpdateLoadErrorScreen();
            LoadErrorTitle.Show();
            LoadErrorSubtitle.Show();
            for (int i = 0; i < LoadErrorModLabels.Count; i++)
            {
                LoadErrorModLabels[i].Show();
            }
            LoadErrorOKButton.Show();
            LoadErrorOKButton.Focus();
        }
示例#3
0
    void Activate()
    {
        panel.Click += new MouseEventHandler(panel_Click);

        if (Weapon == null)
        {
            UnlockLabel.Hide();
            WeaponButton.Hide();
            ReadyLabel.Show();
            colorTween.Play();
        }
        else
        {
            UnlockLabel.Hide();
            WeaponButton.Show();
            ReadyLabel.Hide();
        }
    }
示例#4
0
    public void ShowMatchResult(int ownWins, int oppWins)
    {
        TipLabel.Hide();
        CountdownPanel.Show();

        if (ownWins > oppWins)
        {
            StatusLabel.Text  = string.Format("You win {0} - {1}", ownWins, oppWins);
            StatusLabel.Color = new Color32(0, 255, 0, 255);
        }
        else
        {
            StatusLabel.Text  = string.Format("You lose {0} - {1}", ownWins, oppWins);
            StatusLabel.Color = new Color32(255, 0, 0, 255);
        }
        countdownTitle.Text = "";
        countdownFraction.Hide();
        countdownLabel.Hide();

        BackButton.Click += new MouseEventHandler(BackButton_Click);
        BackButton.Show();
    }
示例#5
0
 public void PauseMenu(string title, string text, string buttonText, bool pause, bool endGame, GameObject prefab = null)
 {
     exitButton.Show();
     restartButton.Show();
     SetDialog(title, text, buttonText, pause, endGame, prefab);
 }