예제 #1
0
 private void UpdateEquipmentDataText()
 {
     this.m_equipmentTitleText.Text = EquipmentAbilityType.ToString(this.m_currentEquipmentIndex) + " Rune\n(" + EquipmentCategoryType.ToString2(this.m_currentCategoryIndex - 6) + ")";
     this.m_descriptionText.Text    = EquipmentAbilityType.Description(this.m_currentEquipmentIndex);
     this.m_descriptionText.WordWrap(195);
     this.m_descriptionText.Y = this.m_equipmentTitleText.Y + 60f;
     this.m_instructionsTitleText.Position = new Vector2(this.m_enchantressUI.X + 140f, this.m_descriptionText.Bounds.Bottom + 20);
     this.m_instructionsText.Text          = EquipmentAbilityType.Instructions(this.m_currentEquipmentIndex);
     this.m_instructionsText.WordWrap(200);
     this.m_instructionsText.Position = new Vector2(this.m_instructionsTitleText.X, this.m_instructionsTitleText.Bounds.Bottom);
 }
예제 #2
0
        private void LoadBackCardStats(PlayerObj player)
        {
            TextObj obj1, obj2;

            int ix = 0, count = m_dataList1.Count;

            while (ix < count)
            {
                obj1 = m_dataList1[ix];
                obj2 = m_dataList2[ix];

                switch (ix)
                {
                case 0:
                    obj1.Text = player.MaxHealth.ToString();
                    obj2.Text = player.Damage.ToString();
                    break;

                case 1:
                    obj1.Text = player.MaxMana.ToString();
                    obj2.Text = player.TotalMagicDamage.ToString();
                    break;

                case 2:
                    obj1.Text = player.TotalArmor + "(" + (int)(player.TotalDamageReduc * 100f) + "%)";
                    obj2.Text = (int)Math.Round(player.TotalCritChance * 100f, MidpointRounding.AwayFromZero) + "%";
                    break;

                case 3:
                    obj1.Text = player.CurrentWeight + "/" + player.MaxWeight;
                    obj2.Text = (int)(player.TotalCriticalDamage * 100f) + "%";
                    break;
                }

                ix++;
            }

            var getEquippedArray = Game.PlayerStats.GetEquippedArray;

            ix    = 0;
            count = getEquippedArray.Length;
            int posY             = (int)m_equipmentTitle.Y + 40;

            while (ix < count)
            {
                int id = getEquippedArray[ix];
                obj1 = m_equipmentList[ix];

                if (id >= 0)
                {
                    obj1.Y       = posY;
                    obj1.Visible = true;
                    obj1.Text    = Game.EquipmentSystem.EquipmentDataArray[ix][id].DisplayName;
                    posY        += 20;
                }
                else
                {
                    obj1.Visible = false;
                }

                ix++;
            }

            ix    = 0;
            count = m_runeBackTitleList.Count;
            posY  = (int)m_runesTitle.Y + 40;
            while (ix < count)
            {
                obj1 = m_runeBackTitleList[ix];
                obj2 = m_runeBackDescriptionList[ix];

                float value = 0f;
                switch (ix)
                {
                case 0: value = player.TotalDoubleJumps; break;

                case 1: value = player.TotalAirDashes; break;

                case 2: value = player.TotalVampBonus; break;

                case 3: value = player.TotalFlightTime; break;

                case 4: value = player.ManaGain; break;

                case 5: value = player.TotalDamageReturn * 100f; break;

                case 6: value = player.TotalGoldBonus * 100f; break;

                case 7: value = player.TotalMovementSpeedPercent * 100f - 100f; break;

                case 8: value = Game.PlayerStats.GetNumberOfEquippedRunes(8) * 8; break;

                case 9: value = Game.PlayerStats.GetNumberOfEquippedRunes(9) * 0.75f; break;

                case 10: value = Game.PlayerStats.HasArchitectFee ? 1f : 0f; break;

                case 11: value = Game.PlayerStats.TimesCastleBeaten * 50; break;
                }

                if (value > 0f)
                {
                    obj2.Text    = "(" + EquipmentAbilityType.ShortDescription(ix + (ix > 9 ? 10 : 0), value) + ")";
                    obj1.Visible = true;
                    obj2.Visible = true;
                    obj1.Y       = posY;
                    obj2.Y       = posY;
                    posY        += 20;
                }
                else
                {
                    obj1.Visible = false;
                    obj2.Visible = false;
                }

                ix++;
            }

            (m_backCard.GetChildAt(3) as TextObj).Text = Game.PlayerStats.PlayerName;
        }
예제 #3
0
        public virtual void OnEnter()
        {
            this.m_tripStat1.Visible = false;
            this.m_tripStat2.Visible = false;
            this.m_tripStat1.Scale   = Vector2.One;
            this.m_tripStat2.Scale   = Vector2.One;
            if (this.m_itemType != 7)
            {
                (base.ScreenManager.Game as Game).SaveManager.SaveFiles(new SaveType[] { SaveType.PlayerData, SaveType.UpgradeData });
            }

            this.m_itemSprite.Rotation         = 0f;
            this.m_itemSprite.Scale            = Vector2.One;
            this.m_itemStartPos.X              = this.m_itemStartPos.X - base.Camera.TopLeftCorner.X;
            this.m_itemStartPos.Y              = this.m_itemStartPos.Y - base.Camera.TopLeftCorner.Y;
            this.m_storedMusicVolume           = SoundManager.GlobalMusicVolume;
            this.m_songName                    = SoundManager.GetCurrentMusicName();
            this.m_lockControls                = true;
            this.m_continueText.Opacity        = 0f;
            this.m_continueText.Text           = "[Input:0]  to continue";
            this.m_itemFoundText.Position      = this.m_itemEndPos;
            this.m_itemFoundText.Y            += 70f;
            this.m_itemFoundText.Scale         = Vector2.Zero;
            this.m_tripStat1FoundText.Position = this.m_itemFoundText.Position;
            this.m_tripStat2FoundText.Position = this.m_itemFoundText.Position;
            this.m_tripStat1FoundText.Scale    = Vector2.Zero;
            this.m_tripStat2FoundText.Scale    = Vector2.Zero;
            this.m_tripStat1FoundText.Visible  = false;
            this.m_tripStat2FoundText.Visible  = false;
            switch (this.m_itemType)
            {
            case 1:
                this.m_itemSpinning = true;
                this.m_itemSprite.ChangeSprite("BlueprintIcon_Sprite");
                this.m_itemFoundSprite.ChangeSprite("BlueprintFoundText_Sprite");
                this.m_itemFoundText.Text = Game.EquipmentSystem.GetEquipmentData((int)this.m_itemInfo.X, (int)this.m_itemInfo.Y).DisplayName;    // string.Concat(EquipmentBaseType.ToString((int)this.m_itemInfo.Y), " ", EquipmentCategoryType.ToString2((int)this.m_itemInfo.X));
                break;

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

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

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

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

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

                break;
            }
            this.m_itemSprite.PlayAnimation(true);
            this.ItemSpinAnimation();
            base.OnEnter();
        }