示例#1
0
    public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();
        m_UI_Bar = (target as UI_Bar);
        float old = m_progress;

        EditorGUILayout.MinMaxSlider(ref m_progress, ref m_progress, 0, 1);
        if (old != m_progress)
        {
            m_UI_Bar.SetProgress(m_progress);
        }
    }
示例#2
0
文件: UI_Level.cs 项目: phiLyken/RC_1
    void UpdateProgress(float new_progress)
    {
        if (this == null)
        {
            return;
        }

        Bar.gameObject.SetActive(true);
        CurrentLevelTF.gameObject.SetActive(true);
        CurrentProgressTF.gameObject.SetActive(true);

        Bar.SetProgress(m_levels.GetProgressInLevel());
        CurrentProgressTF.text = m_levels.GetProgressInLevelAbsolute().ToString() + "/" + m_levels.GetRequiredforNextLevel();
        CurrentLevelTF.text    = "Level " + m_levels.GetCurrentLevel().ToString();
    }
示例#3
0
    public void SetView(MissionOutcome outcome)
    {
        player_level.gameObject.SetActive(true);
        player_level.Init(PlayerLevel.Instance);
        old_bar.gameObject.SetActive(true);

        player_level.CurrentLevelTF.GetComponent <UI_Anim_BlinkOnEnable>().enabled = outcome.NewLevel;

        if (outcome.NewLevel)
        {
            player_level.CurrentLevelTF.text += " [level up]";
        }

        player_level.CurrentProgressTF.text = "+" + outcome.SuppliesGainedFinal;

        old_bar.enabled = !outcome.NewLevel;
        old_bar.SetProgress(outcome.ProgressBefore);
    }