public override void LoadContent() { m_loadingText = new TextObj(); m_loadingText.Font = Game.JunicodeLargeFont; m_loadingText.Text = "Building"; m_loadingText.Align = Types.TextAlign.Centre; m_loadingText.FontSize = 40f; m_loadingText.OutlineWidth = 4; m_loadingText.ForceDraw = true; m_gateSprite = new ObjContainer("LoadingScreenGate_Character"); m_gateSprite.ForceDraw = true; m_gateSprite.Scale = new Vector2(2f, 2f); m_gateSprite.Y -= m_gateSprite.Height; m_effectPool.Initialize(); m_blackTransitionIn = new SpriteObj("Blank_Sprite"); m_blackTransitionIn.Rotation = 15f; m_blackTransitionIn.Scale = new Vector2(1320 / m_blackTransitionIn.Width, 2000 / m_blackTransitionIn.Height); m_blackTransitionIn.TextureColor = Color.Black; m_blackTransitionIn.ForceDraw = true; m_blackScreen = new SpriteObj("Blank_Sprite"); m_blackScreen.Scale = new Vector2(1320 / m_blackScreen.Width, 720 / m_blackScreen.Height); m_blackScreen.TextureColor = Color.Black; m_blackScreen.ForceDraw = true; m_blackTransitionOut = new SpriteObj("Blank_Sprite"); m_blackTransitionOut.Rotation = 15f; m_blackTransitionOut.Scale = new Vector2(1320 / m_blackTransitionOut.Width, 2000 / m_blackTransitionOut.Height); m_blackTransitionOut.TextureColor = Color.Black; m_blackTransitionOut.ForceDraw = true; base.LoadContent(); }
public override void LoadContent() { m_impactEffectPool.Initialize(); m_manor = new ObjContainer("TraitsCastle_Character"); m_manor.Scale = new Vector2(2f, 2f); m_manor.ForceDraw = true; for (var i = 0; i < m_manor.NumChildren; i++) { m_manor.GetChildAt(i).Visible = false; m_manor.GetChildAt(i).Opacity = 0f; } m_dialoguePlate = new ObjContainer("TraitsScreenPlate_Container"); m_dialoguePlate.ForceDraw = true; m_dialoguePlate.Position = new Vector2(1320 - m_dialoguePlate.Width / 2, 360f); m_skillIcon = new SpriteObj("Icon_Health_Up_Sprite"); m_skillIcon.Position = new Vector2(-110f, -200f); m_dialoguePlate.AddChild(m_skillIcon); m_skillTitle = new TextObj(Game.JunicodeFont); m_skillTitle.Text = "Skill name"; m_skillTitle.DropShadow = new Vector2(2f, 2f); m_skillTitle.TextureColor = new Color(236, 197, 132); m_skillTitle.Position = new Vector2(m_skillIcon.Bounds.Right + 15, m_skillIcon.Y); m_skillTitle.FontSize = 12f; m_dialoguePlate.AddChild(m_skillTitle); m_skillDescription = new TextObj(Game.JunicodeFont); m_skillDescription.Text = "Description text goes here. Let's see how well the word wrap function works."; m_skillDescription.Position = new Vector2(m_dialoguePlate.GetChildAt(1).X - 30f, m_dialoguePlate.GetChildAt(1).Bounds.Bottom + 20); m_skillDescription.FontSize = 10f; m_skillDescription.DropShadow = new Vector2(2f, 2f); m_skillDescription.TextureColor = new Color(228, 218, 208); m_skillDescription.WordWrap(m_dialoguePlate.Width - 50); m_dialoguePlate.AddChild(m_skillDescription); m_inputDescription = new KeyIconTextObj(Game.JunicodeFont); m_inputDescription.Text = "Input descriptions go here.."; m_inputDescription.Position = new Vector2(m_skillIcon.X - 30f, m_skillDescription.Bounds.Bottom + 20); m_inputDescription.FontSize = 10f; m_inputDescription.DropShadow = new Vector2(2f, 2f); m_inputDescription.TextureColor = new Color(228, 218, 208); m_inputDescription.WordWrap(m_dialoguePlate.Width - 50); m_dialoguePlate.AddChild(m_inputDescription); m_descriptionDivider = new SpriteObj("Blank_Sprite"); m_descriptionDivider.ScaleX = 250f / m_descriptionDivider.Width; m_descriptionDivider.ScaleY = 0.25f; m_descriptionDivider.ForceDraw = true; m_descriptionDivider.DropShadow = new Vector2(2f, 2f); m_skillCurrent = new TextObj(Game.JunicodeFont); m_skillCurrent.Position = new Vector2(m_inputDescription.X, m_inputDescription.Bounds.Bottom + 10); m_skillCurrent.FontSize = 10f; m_skillCurrent.DropShadow = new Vector2(2f, 2f); m_skillCurrent.TextureColor = new Color(228, 218, 208); m_skillCurrent.WordWrap(m_dialoguePlate.Width - 50); m_dialoguePlate.AddChild(m_skillCurrent); m_skillUpgrade = (m_skillCurrent.Clone() as TextObj); m_skillUpgrade.Y += 15f; m_dialoguePlate.AddChild(m_skillUpgrade); m_skillLevel = (m_skillUpgrade.Clone() as TextObj); m_skillLevel.Y += 15f; m_dialoguePlate.AddChild(m_skillLevel); m_skillCost = new TextObj(Game.JunicodeFont); m_skillCost.X = m_skillIcon.X; m_skillCost.Y = 182f; m_skillCost.FontSize = 10f; m_skillCost.DropShadow = new Vector2(2f, 2f); m_skillCost.TextureColor = Color.Yellow; m_dialoguePlate.AddChild(m_skillCost); m_skillCostBG = new SpriteObj("SkillTreeGoldIcon_Sprite"); m_skillCostBG.Position = new Vector2(-180f, 180f); m_dialoguePlate.AddChild(m_skillCostBG); m_dialoguePlate.ForceDraw = true; m_bg = new SpriteObj("TraitsBG_Sprite"); m_bg.Scale = new Vector2(1320f / m_bg.Width, 1320f / m_bg.Width); m_bg.ForceDraw = true; m_cloud1 = new SpriteObj("TraitsCloud1_Sprite") { ForceDraw = true }; m_cloud2 = new SpriteObj("TraitsCloud2_Sprite") { ForceDraw = true }; m_cloud3 = new SpriteObj("TraitsCloud3_Sprite") { ForceDraw = true }; m_cloud4 = new SpriteObj("TraitsCloud4_Sprite") { ForceDraw = true }; m_cloud5 = new SpriteObj("TraitsCloud5_Sprite") { ForceDraw = true }; var opacity = 1f; m_cloud1.Opacity = opacity; m_cloud2.Opacity = opacity; m_cloud3.Opacity = opacity; m_cloud4.Opacity = opacity; m_cloud5.Opacity = opacity; m_cloud1.Position = new Vector2(CDGMath.RandomInt(0, 1520), CDGMath.RandomInt(0, 360)); m_cloud2.Position = new Vector2(CDGMath.RandomInt(0, 1520), CDGMath.RandomInt(0, 360)); m_cloud3.Position = new Vector2(CDGMath.RandomInt(0, 1520), CDGMath.RandomInt(0, 360)); m_cloud4.Position = new Vector2(CDGMath.RandomInt(0, 1520), CDGMath.RandomInt(0, 360)); m_cloud5.Position = new Vector2(CDGMath.RandomInt(0, 1520), CDGMath.RandomInt(0, 360)); m_selectionIcon = new SpriteObj("IconHalo_Sprite"); m_selectionIcon.ForceDraw = true; m_selectionIcon.AnimationDelay = 0.1f; m_selectionIcon.PlayAnimation(); m_selectionIcon.Scale = new Vector2(1.1f, 1.1f); m_titleText = new SpriteObj("ManorTitleText_Sprite"); m_titleText.X = m_titleText.Width / 2f + 20f; m_titleText.Y = 64.8f; m_titleText.ForceDraw = true; m_continueText = new KeyIconTextObj(Game.JunicodeFont); m_continueText.ForceDraw = true; m_continueText.FontSize = 12f; m_continueText.DropShadow = new Vector2(2f, 2f); m_continueText.Position = new Vector2(1300f, 630f); m_continueText.Align = Types.TextAlign.Right; m_toggleIconsText = new KeyIconTextObj(Game.JunicodeFont); m_toggleIconsText.ForceDraw = true; m_toggleIconsText.FontSize = 12f; m_toggleIconsText.DropShadow = new Vector2(2f, 2f); m_toggleIconsText.Position = new Vector2(m_continueText.X, m_continueText.Y + 40f); m_toggleIconsText.Align = Types.TextAlign.Right; m_confirmText = new KeyIconTextObj(Game.JunicodeFont); m_confirmText.Align = Types.TextAlign.Right; m_confirmText.FontSize = 12f; m_confirmText.DropShadow = new Vector2(2f, 2f); m_confirmText.Position = new Vector2(1300f, 10f); m_confirmText.ForceDraw = true; m_navigationText = new KeyIconTextObj(Game.JunicodeFont); m_navigationText.Align = Types.TextAlign.Right; m_navigationText.FontSize = 12f; m_navigationText.DropShadow = new Vector2(2f, 2f); m_navigationText.Position = new Vector2(m_confirmText.X, m_confirmText.Y + 40f); m_navigationText.ForceDraw = true; m_coinIcon = new SpriteObj("CoinIcon_Sprite"); m_coinIcon.Position = new Vector2(1100f, 585f); m_coinIcon.Scale = new Vector2(0.9f, 0.9f); m_coinIcon.ForceDraw = true; m_playerMoney = new TextObj(Game.GoldFont); m_playerMoney.Align = Types.TextAlign.Left; m_playerMoney.Text = "1000"; m_playerMoney.FontSize = 30f; m_playerMoney.Position = new Vector2(m_coinIcon.X + 35f, m_coinIcon.Y); m_playerMoney.ForceDraw = true; base.LoadContent(); }