Ejemplo n.º 1
0
        private void LoadFrontCardStats(PlayerObj player)
        {
            m_frontTrait1.Visible = false;
            m_frontTrait2.Visible = false;
            var b = (byte)Game.PlayerStats.Traits.X;

            if (b != 0)
            {
                m_frontTrait1.Text    = TraitType.ToString(b) + ": " + TraitType.ProfileCardDescription(b);
                m_frontTrait1.Visible = true;
            }
            var b2 = (byte)Game.PlayerStats.Traits.Y;

            if (b2 != 0)
            {
                m_frontTrait2.Y = m_frontTrait1.Y;
                if (b != 0)
                {
                    m_frontTrait2.Y -= 20f;
                }
                m_frontTrait2.Text    = TraitType.ToString(b2) + ": " + TraitType.ProfileCardDescription(b2);
                m_frontTrait2.Visible = true;
            }
            m_playerName.Text  = Game.PlayerStats.PlayerName;
            m_playerStats.Text = (int)(player.Damage / 20f) + "/" + (int)(player.MaxHealth / 50f);
            m_levelClass.Text  = string.Concat("Lv. ", Game.PlayerStats.CurrentLevel, " - ",
                                               ClassType.ToString(Game.PlayerStats.Class, Game.PlayerStats.IsFemale));
            m_money.Text            = Game.PlayerStats.Gold.ToString();
            m_classDescription.Text = ClassType.ProfileCardDescription(Game.PlayerStats.Class);
        }
Ejemplo n.º 2
0
        public void SetTraits(Vector2 traits)
        {
            Traits = traits;
            var text = "";

            if (Traits.X != 0f)
            {
                text += TraitType.ToString((byte)Traits.X);
            }
            else
            {
                m_trait1Title.Text = "";
            }
            if (Traits.Y != 0f)
            {
                text = text + ", " + TraitType.ToString((byte)Traits.Y);
            }
            m_trait1Title.Text = text;
        }
Ejemplo n.º 3
0
        private void UpdateDescriptionPlate()
        {
            var lineageObj = m_currentBranchArray[m_selectedLineageIndex];
            var textObj    = m_descriptionPlate.GetChildAt(1) as TextObj;

            textObj.Text = lineageObj.PlayerName;
            var textObj2 = m_descriptionPlate.GetChildAt(2) as TextObj;

            textObj2.Text = "Class - " + ClassType.ToString(lineageObj.Class, lineageObj.IsFemale);
            var keyIconTextObj = m_descriptionPlate.GetChildAt(3) as KeyIconTextObj;

            keyIconTextObj.Text = ClassType.Description(lineageObj.Class);
            keyIconTextObj.WordWrap(340);
            var textObj3 = m_descriptionPlate.GetChildAt(4) as TextObj;

            textObj3.Y = keyIconTextObj.Y + keyIconTextObj.Height + 5f;
            var textObj4 = m_descriptionPlate.GetChildAt(5) as TextObj;

            textObj4.Y = textObj3.Y + 30f;
            var num = (int)textObj3.Y;

            if (lineageObj.Traits.X > 0f)
            {
                textObj3.Text = "Trait - " + TraitType.ToString((byte)lineageObj.Traits.X);
                textObj4.Text = TraitType.Description((byte)lineageObj.Traits.X, lineageObj.IsFemale);
                textObj4.WordWrap(340);
                num = (int)textObj4.Y + textObj4.Height + 5;
            }
            else
            {
                num           = (int)textObj3.Y + textObj3.Height + 5;
                textObj3.Text = "Traits - None";
                textObj4.Text = "";
            }
            var textObj5 = m_descriptionPlate.GetChildAt(6) as TextObj;

            textObj5.Y = textObj4.Y + textObj4.Height + 5f;
            var textObj6 = m_descriptionPlate.GetChildAt(7) as TextObj;

            textObj6.Y = textObj5.Y + 30f;
            if (lineageObj.Traits.Y > 0f)
            {
                textObj5.Text = "Trait - " + TraitType.ToString((byte)lineageObj.Traits.Y);
                textObj6.Text = TraitType.Description((byte)lineageObj.Traits.Y, lineageObj.IsFemale);
                textObj6.WordWrap(340);
                num = (int)textObj6.Y + textObj6.Height + 5;
            }
            else
            {
                textObj5.Text = "";
                textObj6.Text = "";
            }
            var textObj7 = m_descriptionPlate.GetChildAt(8) as TextObj;

            textObj7.Text = "Spell - " + SpellType.ToString(lineageObj.Spell);
            textObj7.Y    = num;
            var keyIconTextObj2 = m_descriptionPlate.GetChildAt(9) as KeyIconTextObj;

            keyIconTextObj2.Text = SpellType.Description(lineageObj.Spell);
            keyIconTextObj2.Y    = textObj7.Y + 30f;
            keyIconTextObj2.WordWrap(340);
        }