public override void LoadContent() { var textureColor = new Color(200, 150, 55); m_smoke1 = new SpriteObj("TextSmoke_Sprite"); m_smoke1.ForceDraw = true; m_smoke1.Scale = new Vector2(2f, 2f); m_smoke1.Opacity = 0.3f; m_smoke1.TextureColor = textureColor; m_smoke2 = (m_smoke1.Clone() as SpriteObj); m_smoke2.Flip = SpriteEffects.FlipHorizontally; m_smoke2.Opacity = 0.2f; m_smoke3 = (m_smoke1.Clone() as SpriteObj); m_smoke3.Scale = new Vector2(2.5f, 3f); m_smoke3.Opacity = 0.15f; base.LoadContent(); }
public override void LoadContent() { m_levelUpBGImage = new SpriteObj("BlueprintFoundBG_Sprite"); m_levelUpBGImage.ForceDraw = true; m_levelUpBGImage.Visible = false; m_levelUpParticles = new SpriteObj[10]; for (var i = 0; i < m_levelUpParticles.Length; i++) { m_levelUpParticles[i] = new SpriteObj("LevelUpParticleFX_Sprite"); m_levelUpParticles[i].AnimationDelay = 0.0416666679f; m_levelUpParticles[i].ForceDraw = true; m_levelUpParticles[i].Visible = false; } m_itemSprite = new SpriteObj("BlueprintIcon_Sprite"); m_itemSprite.ForceDraw = true; m_itemSprite.OutlineWidth = 2; m_tripStat1 = (m_itemSprite.Clone() as SpriteObj); m_tripStat2 = (m_itemSprite.Clone() as SpriteObj); m_itemFoundText = new TextObj(Game.JunicodeFont); m_itemFoundText.FontSize = 18f; m_itemFoundText.Align = Types.TextAlign.Centre; m_itemFoundText.Text = ""; m_itemFoundText.Position = m_itemEndPos; m_itemFoundText.Y += 70f; m_itemFoundText.ForceDraw = true; m_itemFoundText.OutlineWidth = 2; m_tripStat1FoundText = (m_itemFoundText.Clone() as TextObj); m_tripStat2FoundText = (m_itemFoundText.Clone() as TextObj); m_itemFoundSprite = new SpriteObj("BlueprintFoundText_Sprite"); m_itemFoundSprite.ForceDraw = true; m_itemFoundSprite.Visible = false; m_continueText = new KeyIconTextObj(Game.JunicodeFont); m_continueText.FontSize = 14f; m_continueText.Text = "to continue"; m_continueText.Align = Types.TextAlign.Centre; m_continueText.Position = new Vector2(1320 - m_continueText.Width, 720 - m_continueText.Height - 10); m_continueText.ForceDraw = true; base.LoadContent(); }
private void InitializeProjectiles() { m_earthSummonInSprite = new ProjectileObj("WizardEarthSpellCast_Sprite"); m_earthSummonInSprite.AnimationDelay = 0.1f; m_earthSummonInSprite.PlayAnimation(); m_earthSummonInSprite.Scale = Vector2.Zero; m_earthSummonOutSprite = (m_earthSummonInSprite.Clone() as SpriteObj); m_earthSummonOutSprite.PlayAnimation(); m_earthProjectileObj = new ProjectileObj("WizardEarthSpell_Sprite"); m_earthProjectileObj.IsWeighted = false; m_earthProjectileObj.CollidesWithTerrain = false; m_earthProjectileObj.DestroysWithEnemy = false; m_earthProjectileObj.Damage = Damage; m_earthProjectileObj.Scale = ProjectileScale; m_earthProjectileObj.AnimationDelay = 0.05f; m_earthProjectileObj.Rotation = 0f; m_earthProjectileObj.CanBeFusRohDahed = false; }
public StartingRoomObj() { m_blacksmith = new BlacksmithObj(); m_blacksmith.Flip = SpriteEffects.FlipHorizontally; m_blacksmith.Scale = new Vector2(2.5f, 2.5f); m_blacksmith.Position = new Vector2(700f, 660f - (m_blacksmith.Bounds.Bottom - m_blacksmith.Y) - 1f); m_blacksmith.OutlineWidth = 2; m_blacksmithBoard = new SpriteObj("StartRoomBlacksmithBoard_Sprite"); m_blacksmithBoard.Scale = new Vector2(2f, 2f); m_blacksmithBoard.OutlineWidth = 2; m_blacksmithBoard.Position = new Vector2(m_blacksmith.X - m_blacksmithBoard.Width / 2 - 35f, m_blacksmith.Bounds.Bottom - m_blacksmithBoard.Height - 1); m_blacksmithIcon = new SpriteObj("UpArrowBubble_Sprite"); m_blacksmithIcon.Scale = new Vector2(2f, 2f); m_blacksmithIcon.Visible = false; m_blacksmithIconPosition = new Vector2(m_blacksmith.X - 60f, m_blacksmith.Y - 10f); m_blacksmithIcon.Flip = m_blacksmith.Flip; m_blacksmithIcon.OutlineWidth = 2; m_blacksmithNewIcon = new SpriteObj("ExclamationSquare_Sprite"); m_blacksmithNewIcon.Visible = false; m_blacksmithNewIcon.OutlineWidth = 2; m_enchantressNewIcon = (m_blacksmithNewIcon.Clone() as SpriteObj); m_enchantress = new ObjContainer("Enchantress_Character"); m_enchantress.Scale = new Vector2(2f, 2f); m_enchantress.Flip = SpriteEffects.FlipHorizontally; m_enchantress.Position = new Vector2(1150f, 660f - (m_enchantress.Bounds.Bottom - m_enchantress.AnchorY) - 2f); m_enchantress.PlayAnimation(); m_enchantress.AnimationDelay = 0.1f; (m_enchantress.GetChildAt(4) as IAnimateableObj).StopAnimation(); m_enchantress.OutlineWidth = 2; m_tent = new SpriteObj("StartRoomGypsyTent_Sprite"); m_tent.Scale = new Vector2(1.5f, 1.5f); m_tent.OutlineWidth = 2; m_tent.Position = new Vector2(m_enchantress.X - m_tent.Width / 2 + 5f, m_enchantress.Bounds.Bottom - m_tent.Height); m_enchantressIcon = new SpriteObj("UpArrowBubble_Sprite"); m_enchantressIcon.Scale = new Vector2(2f, 2f); m_enchantressIcon.Visible = false; m_enchantressIconPosition = new Vector2(m_enchantress.X - 60f, m_enchantress.Y - 100f); m_enchantressIcon.Flip = m_enchantress.Flip; m_enchantressIcon.OutlineWidth = 2; m_architect = new ObjContainer("ArchitectIdle_Character"); m_architect.Flip = SpriteEffects.FlipHorizontally; m_architect.Scale = new Vector2(2f, 2f); m_architect.Position = new Vector2(1550f, 660f - (m_architect.Bounds.Bottom - m_architect.AnchorY) - 2f); m_architect.PlayAnimation(); m_architect.AnimationDelay = 0.1f; m_architect.OutlineWidth = 2; (m_architect.GetChildAt(1) as IAnimateableObj).StopAnimation(); m_architectIcon = new SpriteObj("UpArrowBubble_Sprite"); m_architectIcon.Scale = new Vector2(2f, 2f); m_architectIcon.Visible = false; m_architectIconPosition = new Vector2(m_architect.X - 60f, m_architect.Y - 100f); m_architectIcon.Flip = m_architect.Flip; m_architectIcon.OutlineWidth = 2; m_architectRenovating = false; m_screw = new SpriteObj("ArchitectGear_Sprite"); m_screw.Scale = new Vector2(2f, 2f); m_screw.OutlineWidth = 2; m_screw.Position = new Vector2(m_architect.X + 30f, m_architect.Bounds.Bottom - 1); m_screw.AnimationDelay = 0.1f; m_tollCollector = new PhysicsObjContainer("NPCTollCollectorIdle_Character"); m_tollCollector.Flip = SpriteEffects.FlipHorizontally; m_tollCollector.Scale = new Vector2(2.5f, 2.5f); m_tollCollector.IsWeighted = false; m_tollCollector.IsCollidable = true; m_tollCollector.Position = new Vector2(2565f, 420f - (m_tollCollector.Bounds.Bottom - m_tollCollector.AnchorY)); m_tollCollector.PlayAnimation(); m_tollCollector.AnimationDelay = 0.1f; m_tollCollector.OutlineWidth = 2; m_tollCollector.CollisionTypeTag = 1; m_tollCollectorIcon = new SpriteObj("UpArrowBubble_Sprite"); m_tollCollectorIcon.Scale = new Vector2(2f, 2f); m_tollCollectorIcon.Visible = false; m_tollCollectorIcon.Flip = m_tollCollector.Flip; m_tollCollectorIcon.OutlineWidth = 2; m_rainFG = new List <RaindropObj>(); var num = 400; if (LevelEV.SAVE_FRAMES) { num /= 2; } for (var i = 0; i < num; i++) { var item = new RaindropObj(new Vector2(CDGMath.RandomInt(-100, 2540), CDGMath.RandomInt(-400, 720))); m_rainFG.Add(item); } }
public PlayerHUDObj() : base("PlayerHUDLvlText_Sprite") { ForceDraw = true; m_playerLevelText = new TextObj(); m_playerLevelText.Text = Game.PlayerStats.CurrentLevel.ToString(); m_playerLevelText.Font = Game.PlayerLevelFont; m_coin = new SpriteObj("PlayerUICoin_Sprite"); m_coin.ForceDraw = true; m_goldText = new TextObj(); m_goldText.Text = "0"; m_goldText.Font = Game.GoldFont; m_goldText.FontSize = 25f; m_hpBar = new SpriteObj("HPBar_Sprite"); m_hpBar.ForceDraw = true; m_mpBar = new SpriteObj("MPBar_Sprite"); m_mpBar.ForceDraw = true; m_hpText = new TextObj(Game.JunicodeFont); m_hpText.FontSize = 7f; m_hpText.DropShadow = new Vector2(1f, 1f); m_hpText.ForceDraw = true; m_mpText = new TextObj(Game.JunicodeFont); m_mpText.FontSize = 7f; m_mpText.DropShadow = new Vector2(1f, 1f); m_mpText.ForceDraw = true; m_abilitiesSpriteArray = new SpriteObj[5]; var position = new Vector2(130f, 690f); var num = 35; for (var i = 0; i < m_abilitiesSpriteArray.Length; i++) { m_abilitiesSpriteArray[i] = new SpriteObj("Blank_Sprite"); m_abilitiesSpriteArray[i].ForceDraw = true; m_abilitiesSpriteArray[i].Position = position; m_abilitiesSpriteArray[i].Scale = new Vector2(0.5f, 0.5f); position.X += num; } m_hpBarContainer = new ObjContainer("PlayerHUDHPBar_Character"); m_hpBarContainer.ForceDraw = true; m_mpBarContainer = new ObjContainer("PlayerHUDMPBar_Character"); m_mpBarContainer.ForceDraw = true; m_specialItemIcon = new SpriteObj("Blank_Sprite"); m_specialItemIcon.ForceDraw = true; m_specialItemIcon.OutlineWidth = 1; m_specialItemIcon.Scale = new Vector2(1.7f, 1.7f); m_specialItemIcon.Visible = false; m_spellIcon = new SpriteObj(SpellType.Icon(0)); m_spellIcon.ForceDraw = true; m_spellIcon.OutlineWidth = 1; m_spellIcon.Visible = false; m_iconHolder1 = new SpriteObj("BlacksmithUI_IconBG_Sprite"); m_iconHolder1.ForceDraw = true; m_iconHolder1.Opacity = 0.5f; m_iconHolder1.Scale = new Vector2(0.8f, 0.8f); m_iconHolder2 = (m_iconHolder1.Clone() as SpriteObj); m_spellCost = new TextObj(Game.JunicodeFont); m_spellCost.Align = Types.TextAlign.Centre; m_spellCost.ForceDraw = true; m_spellCost.OutlineWidth = 2; m_spellCost.FontSize = 8f; m_spellCost.Visible = false; UpdateSpecialItemIcon(); UpdateSpellIcon(); }