示例#1
0
        /// <summary>
        /// Displays the active partyMember with the proper visual colouring
        /// </summary>
        /// <param name="pmd"></param>
        public void DisplayActivePartyMemberCombat(PartyMemberDisplay pmd)
        {
            for (int i = 0; i < PartyManager.instance.GetNumPartyMembers(); i++)
            {
                if (pmd != pmDisplays[i])
                {
                    pmDisplays[i].ShowNormal();
                }
            }

            pmd.ShowActiveCombat();
            if (statsPanel.isOpen == true)
            {
                statsPanel.OnEnable();
            }
        }
示例#2
0
        /// <summary>
        /// Initialize a skillDisplay, displaying the skill's icon and preparing the possible colourings
        /// for if the skill is enabled or not.
        /// </summary>
        /// <param name="skillIndex"></param>
        /// <param name="displayedSkill"></param>
        /// <param name="skillSprite"></param>
        /// <param name="skillColour"></param>
        /// <param name="pmd"></param>
        public void Init(int skillIndex, Skill displayedSkill, Sprite skillSprite, Color skillColour, PartyMemberDisplay pmd)
        {
            skillSpriteRenderer.sprite = skillSprite;
            this.skillColour           = skillColour;
            this.skillIndex            = skillIndex;
            this.skillDisplayEnabled   = displayedSkill.skillEnabled;
            this.displayedSkill        = displayedSkill;
            this.pmd = pmd;
            SetTooltip();

            ColorBlock normalBlock = b.colors;

            if (skillDisplayEnabled == true)
            {
                normalBlock.normalColor      = new Color(skillColour.r, skillColour.g, skillColour.b, 0.75f);
                normalBlock.highlightedColor = skillColour;
                normalBlock.pressedColor     = skillColour;
                normalBlock.disabledColor    = new Color(skillColour.r, skillColour.g, skillColour.b, 0.33f);
                skillSpriteRenderer.color    = skillColour;
                bts.SetColorBlock("normal", normalBlock);
                bts.SetColor("normal");
            }
            else
            {
                normalBlock.normalColor      = new Color32(99, 99, 99, 255);
                normalBlock.highlightedColor = new Color32(141, 141, 141, 255);
                normalBlock.pressedColor     = new Color32(255, 255, 255, 255);
                normalBlock.disabledColor    = new Color32(61, 61, 61, 255);
                skillSpriteRenderer.color    = new Color32(133, 133, 133, 255);
                bts.SetColorBlock("normal", normalBlock);
                bts.SetColor("normal");
            }
        }