示例#1
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);
        }
示例#2
0
        public override void OnEnter()
        {
            m_tripStat1.Visible = false;
            m_tripStat2.Visible = false;
            m_tripStat1.Scale   = Vector2.One;
            m_tripStat2.Scale   = Vector2.One;
            if (m_itemType != 7)
            {
                (ScreenManager.Game as Game).SaveManager.SaveFiles(SaveType.PlayerData, SaveType.UpgradeData);
            }
            m_itemSprite.Rotation         = 0f;
            m_itemSprite.Scale            = Vector2.One;
            m_itemStartPos.X              = m_itemStartPos.X - Camera.TopLeftCorner.X;
            m_itemStartPos.Y              = m_itemStartPos.Y - Camera.TopLeftCorner.Y;
            m_storedMusicVolume           = SoundManager.GlobalMusicVolume;
            m_songName                    = SoundManager.GetCurrentMusicName();
            m_lockControls                = true;
            m_continueText.Opacity        = 0f;
            m_continueText.Text           = "[Input:" + 0 + "]  to continue";
            m_itemFoundText.Position      = m_itemEndPos;
            m_itemFoundText.Y            += 70f;
            m_itemFoundText.Scale         = Vector2.Zero;
            m_tripStat1FoundText.Position = m_itemFoundText.Position;
            m_tripStat2FoundText.Position = m_itemFoundText.Position;
            m_tripStat1FoundText.Scale    = Vector2.Zero;
            m_tripStat2FoundText.Scale    = Vector2.Zero;
            m_tripStat1FoundText.Visible  = false;
            m_tripStat2FoundText.Visible  = false;
            switch (m_itemType)
            {
            case 1:
                m_itemSpinning = true;
                m_itemSprite.ChangeSprite("BlueprintIcon_Sprite");
                m_itemFoundSprite.ChangeSprite("BlueprintFoundText_Sprite");
                m_itemFoundText.Text = EquipmentBaseType.ToString((int)m_itemInfo.Y) + " " +
                                       EquipmentCategoryType.ToString2((int)m_itemInfo.X);
                break;

            case 2:
                m_itemSpinning = true;
                m_itemSprite.ChangeSprite("RuneIcon_Sprite");
                m_itemFoundSprite.ChangeSprite("RuneFoundText_Sprite");
                m_itemFoundText.Text = EquipmentAbilityType.ToString((int)m_itemInfo.Y) + " Rune (" +
                                       EquipmentCategoryType.ToString2((int)m_itemInfo.X) + ")";
                m_itemSprite.AnimationDelay = 0.05f;
                GameUtil.UnlockAchievement("LOVE_OF_MAGIC");
                break;

            case 3:
            case 6:
                m_itemSprite.ChangeSprite(GetStatSpriteName((int)m_itemInfo.X));
                m_itemFoundText.Text        = GetStatText((int)m_itemInfo.X);
                m_itemSprite.AnimationDelay = 0.05f;
                m_itemFoundSprite.ChangeSprite("StatFoundText_Sprite");
                if (m_itemType == 6)
                {
                    m_tripStat1FoundText.Visible = true;
                    m_tripStat2FoundText.Visible = true;
                    m_tripStat1.ChangeSprite(GetStatSpriteName((int)m_tripStatData.X));
                    m_tripStat2.ChangeSprite(GetStatSpriteName((int)m_tripStatData.Y));
                    m_tripStat1.Visible        = true;
                    m_tripStat2.Visible        = true;
                    m_tripStat1.AnimationDelay = 0.05f;
                    m_tripStat2.AnimationDelay = 0.05f;
                    Tween.RunFunction(0.1f, m_tripStat1, "PlayAnimation", true);
                    Tween.RunFunction(0.2f, m_tripStat2, "PlayAnimation", true);
                    m_tripStat1FoundText.Text = GetStatText((int)m_tripStatData.X);
                    m_tripStat2FoundText.Text = GetStatText((int)m_tripStatData.Y);
                    m_itemFoundText.Y        += 50f;
                    m_tripStat1FoundText.Y    = m_itemFoundText.Y + 50f;
                }
                break;

            case 4:
                m_itemSprite.ChangeSprite(SpellType.Icon((byte)m_itemInfo.X));
                m_itemFoundSprite.ChangeSprite("SpellFoundText_Sprite");
                m_itemFoundText.Text = SpellType.ToString((byte)m_itemInfo.X);
                break;

            case 5:
                m_itemSprite.ChangeSprite(SpecialItemType.SpriteName((byte)m_itemInfo.X));
                m_itemFoundSprite.ChangeSprite("ItemFoundText_Sprite");
                m_itemFoundText.Text = SpecialItemType.ToString((byte)m_itemInfo.X);
                break;

            case 7:
                m_itemSprite.ChangeSprite(GetMedallionImage((int)m_itemInfo.X));
                m_itemFoundSprite.ChangeSprite("ItemFoundText_Sprite");
                if (m_itemInfo.X == 19f)
                {
                    m_itemFoundText.Text = "Medallion completed!";
                }
                else
                {
                    m_itemFoundText.Text = "You've collected a medallion piece!";
                }
                break;
            }
            m_itemSprite.PlayAnimation();
            ItemSpinAnimation();
            base.OnEnter();
        }