コード例 #1
0
ファイル: SC_Submission.cs プロジェクト: JaeKalTaek/CFW
        public override void UpdateValuesUI(bool first = false, Transform[][] lines = null)
        {
            base.UpdateValuesUI(first, new Transform[][] { UICard.submissionValues.lines, UICard.submissionBigValues.lines });

            UICard.SetAttackValue("staminaReduction", GetEffect.stamina, false);
            UICard.SetAttackValue("breakCost", GetEffect.breakCost, false);
        }
コード例 #2
0
        public override void UpdateValuesUI (bool first = false, Transform[][] lines = null) {

            base.UpdateValuesUI (first, new Transform[][] { UICard.offensiveMoveValues.lines, UICard.offensiveMoveBigValues.lines });

            UICard.SetAttackValue ("healthCost", GetCost.health, true);            

            UICard.SetAttackValue ("staminaDamage", GetEffect.stamina, false);
            UICard.SetAttackValue ("healthDamage", GetEffect.health, true);

        }        
コード例 #3
0
        public override void UpdateValuesUI(bool first = false, Transform[][] lines = null)
        {
            if (first)
            {
                BodyPart bp = ((this as SC_OffensiveMove)?.effect.bodyPartDamage ?? (this as SC_Submission).effect.bodyPartDamage).bodyPart;

                foreach (Transform[] t in lines)
                {
                    for (int i = 0; i < t.Length; i++)
                    {
                        foreach (Transform bg in t[i])
                        {
                            if (i == t.Length - 1 && GetCost.bodyPartDamage.bodyPart == BodyPart.None && bp == BodyPart.None)
                            {
                                bg.gameObject.SetActive(false);

                                UICard.HideBodyPartsTexts();
                            }
                            else
                            {
                                bg.GetComponent <Image> ().color = (i % 2 != (t.Length % 2)) == (GetCost.bodyPartDamage.bodyPart != BodyPart.None || bp != BodyPart.None) ? UI.darkGrey : UI.lightGrey;
                            }
                        }
                    }
                }
            }

            UICard.SetAttackValue("staminaCost", GetCost.stamina, false);

            UICard.SetAttackValue("bodyPartsCost", GetCost.bodyPartDamage.bodyPart == BodyPart.None ? "0" : GetCost.bodyPartDamage.bodyPart + " - " + GetCost.bodyPartDamage.damage, true);

            OffensiveBodyPartDamage b = (this as SC_OffensiveMove)?.GetEffect.bodyPartDamage ?? (this as SC_Submission).GetEffect.bodyPartDamage;

            string s = "";

            if (b.bodyPart != BodyPart.None)
            {
                s += b.bodyPart;

                if (b.otherBodyPart != BodyPart.None)
                {
                    s += " " + (b.both ? "&" : "or") + " " + b.otherBodyPart;
                }

                s += " - " + b.damage;
            }

            UICard.SetAttackValue("bodyPartsDamage", s == "" ? "0" : s, true);
        }