public void SetType(BattleMonsterButton.Type type)
        {
            this.selectFrame.gameObject.SetActive(type == BattleMonsterButton.Type.Select);
            int num = (type != BattleMonsterButton.Type.Dead) ? 0 : 1;

            this.baseFrame.atlas  = this.uiAtlases[num];
            this.bgFrame.atlas    = this.uiAtlases[num];
            this.flashFrame.atlas = this.uiAtlases[num];
            if (this.charaTexture.material == null)
            {
                this.charaTexture.shader = this.materials[num].shader;
            }
            else if ((type == BattleMonsterButton.Type.Dead && this.iconType != BattleMonsterButton.Type.Dead) || (type != BattleMonsterButton.Type.Dead && this.iconType == BattleMonsterButton.Type.Dead))
            {
                this.iconType = type;
                Texture texture  = this.charaTexture.material.GetTexture("_MaskTex");
                Texture texture2 = this.charaTexture.material.GetTexture("_MainTex");
                if (type == BattleMonsterButton.Type.Dead)
                {
                    Shader iconShaderGray = GUIMonsterIcon.GetIconShaderGray();
                    this.charaTexture.material = new Material(iconShaderGray);
                    this.charaTexture.material.SetTexture("_MaskTex", texture);
                    this.charaTexture.material.SetTexture("_MainTex", texture2);
                }
                else
                {
                    Shader iconShader = GUIMonsterIcon.GetIconShader();
                    this.charaTexture.material = new Material(iconShader);
                    this.charaTexture.material.SetTexture("_MaskTex", texture);
                    this.charaTexture.material.SetTexture("_MainTex", texture2);
                }
            }
        }