private void UpdateEquipmentDataText() { m_equipmentTitleText.Text = EquipmentAbilityType.ToString(m_currentEquipmentIndex) + " Rune\n(" + EquipmentCategoryType.ToString2(m_currentCategoryIndex - 6) + ")"; m_descriptionText.Text = EquipmentAbilityType.Description(m_currentEquipmentIndex); m_descriptionText.WordWrap(195); m_descriptionText.Y = m_equipmentTitleText.Y + 60f; m_instructionsTitleText.Position = new Vector2(m_enchantressUI.X + 140f, m_descriptionText.Bounds.Bottom + 20); m_instructionsText.Text = EquipmentAbilityType.Instructions(m_currentEquipmentIndex); m_instructionsText.WordWrap(200); m_instructionsText.Position = new Vector2(m_instructionsTitleText.X, m_instructionsTitleText.Bounds.Bottom); }
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(); }
private void LoadBackCard() { var textObj = new TextObj(Game.JunicodeFont); textObj.Text = ""; textObj.FontSize = 9f; textObj.ForceDraw = true; textObj.TextureColor = Color.Black; m_dataList1 = new List <TextObj>(); m_dataList2 = new List <TextObj>(); string[] array = { "Health", "Mana", "Armor", "Weight" }; string[] array2 = { "Strength", "Intelligence", "Crit. Chance", "Crit. Damage" }; var num = 90; for (var i = 0; i < array.Length; i++) { var textObj2 = textObj.Clone() as TextObj; textObj2.Align = Types.TextAlign.Right; textObj2.Text = array[i]; textObj2.Position = new Vector2(120f, num); m_backCard.AddChild(textObj2); var textObj3 = textObj.Clone() as TextObj; textObj3.Text = "0"; textObj3.Position = new Vector2(textObj2.X + 20f, num); m_dataList1.Add(textObj3); m_backCard.AddChild(textObj3); var textObj4 = textObj.Clone() as TextObj; textObj4.Align = Types.TextAlign.Right; textObj4.Text = array2[i]; textObj4.Position = new Vector2(330f, num); m_backCard.AddChild(textObj4); var textObj5 = textObj.Clone() as TextObj; textObj5.Text = "0"; textObj5.Position = new Vector2(textObj4.X + 20f, num); m_dataList2.Add(textObj5); m_backCard.AddChild(textObj5); num += 20; } m_equipmentTitle = (textObj.Clone() as TextObj); m_equipmentTitle.FontSize = 12f; m_equipmentTitle.Text = "Equipment:"; m_equipmentTitle.Position = new Vector2(50f, 180f); m_backCard.AddChild(m_equipmentTitle); m_runesTitle = (textObj.Clone() as TextObj); m_runesTitle.FontSize = 12f; m_runesTitle.Text = "Enchantments:"; m_runesTitle.Position = new Vector2(m_equipmentTitle.X, 330f); m_backCard.AddChild(m_runesTitle); for (var j = 0; j < Game.PlayerStats.GetEquippedArray.Length; j++) { var textObj6 = textObj.Clone() as TextObj; textObj6.Text = "test"; textObj6.Position = new Vector2(80f, m_equipmentTitle.Y + 50f); m_equipmentList.Add(textObj6); m_backCard.AddChild(textObj6); } for (var k = 0; k < 10; k++) { var textObj7 = textObj.Clone() as TextObj; textObj7.X = 60f; textObj7.Text = EquipmentAbilityType.ToString(k); textObj7.FontSize = 7f; m_runeBackTitleList.Add(textObj7); m_backCard.AddChild(textObj7); var textObj8 = textObj.Clone() as TextObj; textObj8.X = textObj7.Bounds.Right + 10; textObj8.FontSize = 7f; m_runeBackDescriptionList.Add(textObj8); m_backCard.AddChild(textObj8); } var textObj9 = textObj.Clone() as TextObj; textObj9.X = 60f; textObj9.Text = EquipmentAbilityType.ToString(20); textObj9.FontSize = 7f; m_runeBackTitleList.Add(textObj9); m_backCard.AddChild(textObj9); var textObj10 = textObj.Clone() as TextObj; textObj10.X = textObj9.Bounds.Right + 10; textObj10.FontSize = 7f; m_runeBackDescriptionList.Add(textObj10); m_backCard.AddChild(textObj10); var textObj11 = textObj.Clone() as TextObj; textObj11.X = 60f; textObj11.Text = EquipmentAbilityType.ToString(21); textObj11.FontSize = 7f; m_runeBackTitleList.Add(textObj11); m_backCard.AddChild(textObj11); var textObj12 = textObj.Clone() as TextObj; textObj12.X = textObj11.Bounds.Right + 10; textObj12.FontSize = 7f; m_runeBackDescriptionList.Add(textObj12); m_backCard.AddChild(textObj12); }