public void SetVisualState(TalentVisualState visualState)
        {
            this.m_visualState = visualState;
            switch (visualState)
            {
            case TalentVisualState.canResearch:
            {
                this.m_greenFrameGlow.gameObject.SetActive(true);
                this.m_yellowFrameGlow.gameObject.SetActive(false);
                this.m_researchProgressBG.gameObject.SetActive(false);
                this.m_abilityIcon.color = Color.white;
                this.m_abilityIcon.material.SetFloat("_GrayscaleAmount", 0f);
                break;
            }

            case TalentVisualState.canRespec:
            {
                this.m_greenFrameGlow.gameObject.SetActive(false);
                this.m_yellowFrameGlow.gameObject.SetActive(false);
                this.m_researchProgressBG.gameObject.SetActive(false);
                this.m_abilityIcon.color = this.m_inactiveColor;
                this.m_abilityIcon.material.SetFloat("_GrayscaleAmount", 0f);
                break;
            }

            case TalentVisualState.cannotResearch:
            {
                this.m_greenFrameGlow.gameObject.SetActive(false);
                this.m_yellowFrameGlow.gameObject.SetActive(false);
                this.m_researchProgressBG.gameObject.SetActive(false);
                this.m_abilityIcon.color = Color.white;
                this.m_abilityIcon.material.SetFloat("_GrayscaleAmount", 1f);
                break;
            }

            case TalentVisualState.researching:
            {
                this.m_greenFrameGlow.gameObject.SetActive(false);
                this.m_yellowFrameGlow.gameObject.SetActive(true);
                this.m_researchProgressBG.gameObject.SetActive(true);
                this.m_abilityIcon.color = this.m_inactiveColor;
                this.m_abilityIcon.material.SetFloat("_GrayscaleAmount", 1f);
                break;
            }

            case TalentVisualState.owned:
            {
                this.m_greenFrameGlow.gameObject.SetActive(false);
                this.m_yellowFrameGlow.gameObject.SetActive(true);
                this.m_researchProgressBG.gameObject.SetActive(false);
                this.m_abilityIcon.color = Color.white;
                this.m_abilityIcon.material.SetFloat("_GrayscaleAmount", 0f);
                break;
            }
            }
        }
 private void Awake()
 {
     this.m_playedTalentToast   = false;
     this.m_shouldShowCheckAnim = false;
     this.m_playedShowCheckAnim = false;
     this.m_inactiveColor       = new Color(0.3f, 0.3f, 0.3f, 1f);
     this.m_canResearch         = false;
     this.m_greenFrameGlow.gameObject.SetActive(false);
     this.m_yellowFrameGlow.gameObject.SetActive(false);
     this.m_researchProgressBG.gameObject.SetActive(false);
     this.m_visualState = TalentVisualState.cannotResearch;
 }
コード例 #3
0
    public void SetVisualState(TalentVisualState visualState)
    {
        this.m_visualState = visualState;
        switch (visualState)
        {
        case TalentVisualState.canResearch:
            this.m_greenFrameGlow.get_gameObject().SetActive(true);
            this.m_yellowFrameGlow.get_gameObject().SetActive(false);
            this.m_researchProgressBG.get_gameObject().SetActive(false);
            this.m_abilityIcon.set_color(Color.get_white());
            this.m_abilityIcon.get_material().SetFloat("_GrayscaleAmount", 0f);
            break;

        case TalentVisualState.canRespec:
            this.m_greenFrameGlow.get_gameObject().SetActive(false);
            this.m_yellowFrameGlow.get_gameObject().SetActive(false);
            this.m_researchProgressBG.get_gameObject().SetActive(false);
            this.m_abilityIcon.set_color(this.m_inactiveColor);
            this.m_abilityIcon.get_material().SetFloat("_GrayscaleAmount", 0f);
            break;

        case TalentVisualState.cannotResearch:
            this.m_greenFrameGlow.get_gameObject().SetActive(false);
            this.m_yellowFrameGlow.get_gameObject().SetActive(false);
            this.m_researchProgressBG.get_gameObject().SetActive(false);
            this.m_abilityIcon.set_color(Color.get_white());
            this.m_abilityIcon.get_material().SetFloat("_GrayscaleAmount", 1f);
            break;

        case TalentVisualState.researching:
            this.m_greenFrameGlow.get_gameObject().SetActive(false);
            this.m_yellowFrameGlow.get_gameObject().SetActive(true);
            this.m_researchProgressBG.get_gameObject().SetActive(true);
            this.m_abilityIcon.set_color(this.m_inactiveColor);
            this.m_abilityIcon.get_material().SetFloat("_GrayscaleAmount", 1f);
            break;

        case TalentVisualState.owned:
            this.m_greenFrameGlow.get_gameObject().SetActive(false);
            this.m_yellowFrameGlow.get_gameObject().SetActive(true);
            this.m_researchProgressBG.get_gameObject().SetActive(false);
            this.m_abilityIcon.set_color(Color.get_white());
            this.m_abilityIcon.get_material().SetFloat("_GrayscaleAmount", 0f);
            break;
        }
    }