示例#1
0
 public override void LoadContent()
 {
     m_plate           = new ObjContainer("SkillUnlockPlate_Character");
     m_plate.Position  = new Vector2(660f, 360f);
     m_plate.ForceDraw = true;
     m_text            = new TextObj(Game.JunicodeFont);
     m_text.ForceDraw  = true;
     m_text.Text       =
         "This is temporary text to see how many sentences can be fit into this area.  Hopefully it is quite a bit, as this is the area where we will be comprehensively describing the unlock.  It will also be used to determine word wrap length.";
     m_text.FontSize = 10f;
     m_text.WordWrap(340);
     m_text.DropShadow = new Vector2(2f, 2f);
     m_plate.AddChild(m_text);
     m_text.Position          = new Vector2(-110f, -100f);
     m_picturePlate           = new ObjContainer("SkillUnlockPicturePlate_Character");
     m_picturePlate.Position  = new Vector2(360f, 410f);
     m_picturePlate.Rotation  = -15f;
     m_picturePlate.ForceDraw = true;
     m_picture              = new SpriteObj("BlacksmithUnlockPicture_Sprite");
     m_picture.ForceDraw    = true;
     m_picture.OutlineWidth = 1;
     m_picture.Position     = m_picturePlate.Position;
     m_titlePlate           = new SpriteObj("SkillUnlockTitlePlate_Sprite");
     m_titlePlate.Position  = new Vector2(660f, 160f);
     m_titlePlate.ForceDraw = true;
     m_title           = new SpriteObj("ClassUnlockedText_Sprite");
     m_title.Position  = m_titlePlate.Position;
     m_title.Y        -= 40f;
     m_title.ForceDraw = true;
     base.LoadContent();
 }
示例#2
0
        public override void LoadContent()
        {
            var textObj = new TextObj(Game.JunicodeFont);

            textObj.FontSize = 12f;
            textObj.Align    = Types.TextAlign.Left;
            var textObj2 = new TextObj(Game.JunicodeFont);

            textObj2.FontSize          = 14f;
            textObj2.Text              = "Blacksmith";
            textObj2.DropShadow        = new Vector2(2f, 2f);
            textObj2.TextureColor      = new Color(236, 197, 132);
            m_dialogContainer          = new ObjContainer("DialogBox_Character");
            m_dialogContainer.Position = new Vector2(660f, 100f);
            m_dialogContainer.AddChild(textObj2);
            m_dialogContainer.ForceDraw = true;
            textObj2.Position           = new Vector2(-(float)m_dialogContainer.Width / 2.2f,
                                                      -(float)m_dialogContainer.Height / 1.6f);
            m_dialogContainer.AddChild(textObj);
            textObj.Position = new Vector2(-(float)m_dialogContainer.Width / 2.15f,
                                           -(float)m_dialogContainer.Height / 3.5f);
            textObj.Text =
                "This is a test to see how much text I can fit onto this dialog box without it running out of space. The text needs to be defined after the dialog text position is set, because the dialogtext width affects the entire width of the dialog container, which in END.";
            textObj.WordWrap(850);
            textObj.DropShadow = new Vector2(2f, 3f);
            var spriteObj = new SpriteObj("ContinueTextIcon_Sprite");

            spriteObj.Position = new Vector2(m_dialogContainer.GetChildAt(2).Bounds.Right,
                                             m_dialogContainer.GetChildAt(2).Bounds.Bottom);
            m_dialogContainer.AddChild(spriteObj);
            m_dialogContinueIconY = spriteObj.Y;
            var textObj3 = new TextObj(Game.JunicodeFont);

            textObj3.FontSize = 12f;
            textObj3.Text     = "Yes";
            textObj3.Align    = Types.TextAlign.Centre;
            var textObj4 = new TextObj(Game.JunicodeFont);

            textObj4.FontSize       = 12f;
            textObj4.Text           = "No";
            textObj4.Align          = Types.TextAlign.Centre;
            m_dialogChoiceContainer = new ObjContainer();
            var obj = new SpriteObj("GameOverStatPlate_Sprite");

            m_dialogChoiceContainer.AddChild(obj);
            var spriteObj2 = new SpriteObj("DialogueChoiceHighlight_Sprite");

            m_dialogChoiceContainer.AddChild(spriteObj2);
            m_dialogChoiceContainer.ForceDraw = true;
            m_dialogChoiceContainer.Position  = new Vector2(660f, 360f);
            m_dialogChoiceContainer.AddChild(textObj3);
            textObj3.Y -= 40f;
            m_dialogChoiceContainer.AddChild(textObj4);
            textObj4.Y                     += 7f;
            spriteObj2.Position             = new Vector2(textObj3.X, textObj3.Y + spriteObj2.Height / 2 + 3f);
            m_dialogChoiceContainer.Scale   = Vector2.Zero;
            m_dialogChoiceContainer.Visible = false;
            base.LoadContent();
        }
示例#3
0
 public static void RandomIntro(TextObj textObj, int wordWrap = 0)
 {
     textObj.Text = WordBuilder.intro[CDGMath.RandomInt(0, WordBuilder.intro.Length - 1)] + WordBuilder.middle[CDGMath.RandomInt(0, WordBuilder.middle.Length - 1)] + WordBuilder.end[CDGMath.RandomInt(0, WordBuilder.end.Length - 1)];
     if (wordWrap > 0)
     {
         textObj.WordWrap(wordWrap);
     }
 }
示例#4
0
 public static void RandomIntro(TextObj textObj, int wordWrap = 0)
 {
     textObj.Text = intro[CDGMath.RandomInt(0, intro.Length - 1)] +
                    middle[CDGMath.RandomInt(0, middle.Length - 1)] + end[CDGMath.RandomInt(0, end.Length - 1)];
     if (wordWrap > 0)
     {
         textObj.WordWrap(wordWrap);
     }
 }
示例#5
0
 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);
 }
示例#6
0
 public override void LoadContent()
 {
     this.DebugTextObj = new TextObj(Game.JunicodeFont);
     this.DebugTextObj.FontSize = 26f;
     this.DebugTextObj.Align = Types.TextAlign.Centre;
     this.DebugTextObj.Text = "";
     this.DebugTextObj.ForceDraw = true;
     this.m_projectileIconPool = new ProjectileIconPool(200, this.m_projectileManager, base.ScreenManager as RCScreenManager);
     this.m_projectileIconPool.Initialize();
     this.m_textManager.Initialize();
     this.m_impactEffectPool.Initialize();
     this.m_physicsManager = (base.ScreenManager.Game as Game).PhysicsManager;
     this.m_physicsManager.SetGravity(0f, 1830f);
     this.m_projectileManager.Initialize();
     this.m_physicsManager.Initialize(base.ScreenManager.Camera);
     this.m_itemDropManager = new ItemDropManager(600, this.m_physicsManager);
     this.m_itemDropManager.Initialize();
     this.m_playerHUD = new PlayerHUDObj();
     this.m_playerHUD.SetPosition(new Vector2(20f, 40f));
     this.m_enemyHUD = new EnemyHUDObj();
     this.m_enemyHUD.Position = new Vector2((float)(660 - this.m_enemyHUD.Width / 2), 20f);
     this.m_miniMapDisplay.SetPlayer(this.m_player);
     this.m_miniMapDisplay.InitializeAlphaMap(new Rectangle(1070, 50, 200, 100), base.Camera);
     this.InitializeAllRooms(true);
     this.InitializeEnemies();
     this.InitializeChests(true);
     this.InitializeRenderTargets();
     this.m_mapBG = new SpriteObj("MinimapBG_Sprite");
     this.m_mapBG.Position = new Vector2(1070f, 50f);
     this.m_mapBG.ForceDraw = true;
     this.UpdateCamera();
     this.m_borderSize = 100;
     this.m_blackBorder1 = new SpriteObj("Blank_Sprite");
     this.m_blackBorder1.TextureColor = Color.Black;
     this.m_blackBorder1.Scale = new Vector2(1340f / (float)this.m_blackBorder1.Width, (float)(this.m_borderSize / this.m_blackBorder1.Height));
     this.m_blackBorder2 = new SpriteObj("Blank_Sprite");
     this.m_blackBorder2.TextureColor = Color.Black;
     this.m_blackBorder2.Scale = new Vector2(1340f / (float)this.m_blackBorder2.Width, (float)(this.m_borderSize / this.m_blackBorder2.Height));
     this.m_blackBorder1.ForceDraw = true;
     this.m_blackBorder2.ForceDraw = true;
     this.m_blackBorder1.Y = (float)(-(float)this.m_borderSize);
     this.m_blackBorder2.Y = 720f;
     this.m_dungeonLight = new SpriteObj("LightSource_Sprite");
     this.m_dungeonLight.ForceDraw = true;
     this.m_dungeonLight.Scale = new Vector2(12f, 12f);
     this.m_traitAura = new SpriteObj("LightSource_Sprite");
     this.m_traitAura.ForceDraw = true;
     this.m_objectivePlate = new ObjContainer("DialogBox_Character");
     this.m_objectivePlate.ForceDraw = true;
     TextObj textObj = new TextObj(Game.JunicodeFont);
     textObj.Position = new Vector2(-400f, -60f);
     textObj.OverrideParentScale = true;
     textObj.FontSize = 10f;
     textObj.Text = "Fairy Chest Objective:";
     textObj.TextureColor = Color.Red;
     textObj.OutlineWidth = 2;
     this.m_objectivePlate.AddChild(textObj);
     TextObj textObj2 = new TextObj(Game.JunicodeFont);
     textObj2.OverrideParentScale = true;
     textObj2.Position = new Vector2(textObj.X, textObj.Y + 40f);
     textObj2.ForceDraw = true;
     textObj2.FontSize = 9f;
     textObj2.Text = "Reach the chest in 15 seconds:";
     textObj2.WordWrap(250);
     textObj2.OutlineWidth = 2;
     this.m_objectivePlate.AddChild(textObj2);
     TextObj textObj3 = new TextObj(Game.JunicodeFont);
     textObj3.OverrideParentScale = true;
     textObj3.Position = new Vector2(textObj2.X, textObj2.Y + 35f);
     textObj3.ForceDraw = true;
     textObj3.FontSize = 9f;
     textObj3.Text = "Time Remaining:";
     textObj3.WordWrap(250);
     textObj3.OutlineWidth = 2;
     this.m_objectivePlate.AddChild(textObj3);
     this.m_objectivePlate.Scale = new Vector2(250f / (float)this.m_objectivePlate.GetChildAt(0).Width, 130f / (float)this.m_objectivePlate.GetChildAt(0).Height);
     this.m_objectivePlate.Position = new Vector2(1470f, 250f);
     SpriteObj spriteObj = new SpriteObj("Blank_Sprite");
     spriteObj.TextureColor = Color.Red;
     spriteObj.Position = new Vector2(textObj2.X, textObj2.Y + 20f);
     spriteObj.ForceDraw = true;
     spriteObj.OverrideParentScale = true;
     spriteObj.ScaleY = 0.5f;
     this.m_objectivePlate.AddChild(spriteObj);
     SpriteObj spriteObj2 = new SpriteObj("Blank_Sprite");
     spriteObj2.TextureColor = Color.Red;
     spriteObj2.Position = new Vector2(textObj2.X, spriteObj.Y + 35f);
     spriteObj2.ForceDraw = true;
     spriteObj2.OverrideParentScale = true;
     spriteObj2.ScaleY = 0.5f;
     this.m_objectivePlate.AddChild(spriteObj2);
     base.LoadContent();
     this.m_sky = new SkyObj(this);
     this.m_sky.LoadContent(base.Camera);
     this.m_whiteBG = new SpriteObj("Blank_Sprite");
     this.m_whiteBG.Opacity = 0f;
     this.m_whiteBG.Scale = new Vector2(1320f / (float)this.m_whiteBG.Width, 720f / (float)this.m_whiteBG.Height);
     this.m_filmGrain = new SpriteObj("FilmGrain_Sprite");
     this.m_filmGrain.ForceDraw = true;
     this.m_filmGrain.Scale = new Vector2(2.015f, 2.05f);
     this.m_filmGrain.X -= 5f;
     this.m_filmGrain.Y -= 5f;
     this.m_filmGrain.PlayAnimation(true);
     this.m_filmGrain.AnimationDelay = 0.0333333351f;
     this.m_compassBG = new SpriteObj("CompassBG_Sprite");
     this.m_compassBG.ForceDraw = true;
     this.m_compassBG.Position = new Vector2(660f, 90f);
     this.m_compassBG.Scale = Vector2.Zero;
     this.m_compass = new SpriteObj("Compass_Sprite");
     this.m_compass.Position = this.m_compassBG.Position;
     this.m_compass.ForceDraw = true;
     this.m_compass.Scale = Vector2.Zero;
     this.InitializeCreditsText();
 }
示例#7
0
        public void UpdateDescriptionPlate(SkillObj trait)
        {
            var text = trait.IconName;

            text = text.Replace("Locked", "");
            text = text.Replace("Max", "");
            m_skillIcon.ChangeSprite(text);
            m_skillTitle.Text       = trait.Name;
            m_skillDescription.Text = trait.Description;
            m_skillDescription.WordWrap(280);
            m_inputDescription.Text = trait.InputDescription;
            m_inputDescription.WordWrap(280);
            m_inputDescription.Y = m_skillDescription.Bounds.Bottom + 10;
            var num = TraitStatType.GetTraitStat(trait.TraitType);

            if (num > -1f)
            {
                if (num < 1f)
                {
                    num *= 100f;
                    num  = (int)Math.Round(num, MidpointRounding.AwayFromZero);
                }
                if (num == 0f)
                {
                    num = trait.ModifierAmount;
                    if (trait.TraitType == SkillType.Crit_Chance_Up)
                    {
                        num *= 100f;
                        num  = (int)Math.Round(num, MidpointRounding.AwayFromZero);
                    }
                }
                m_skillCurrent.Text = "Current: " + num + trait.UnitOfMeasurement;
                if (trait.CurrentLevel < trait.MaxLevel)
                {
                    var num2 = trait.PerLevelModifier;
                    if (num2 < 1f && trait.TraitType != SkillType.Invuln_Time_Up)
                    {
                        num2 *= 100f;
                        if (trait.TraitType != SkillType.Death_Dodge)
                        {
                            num2 = (int)Math.Round(num2, MidpointRounding.AwayFromZero);
                        }
                    }
                    m_skillUpgrade.Text = "Upgrade: +" + num2 + trait.UnitOfMeasurement;
                }
                else
                {
                    m_skillUpgrade.Text = "Upgrade: --";
                }
                m_skillLevel.Text = string.Concat("Level: ", trait.CurrentLevel, "/", trait.MaxLevel);
                var arg = "unlock";
                if (trait.CurrentLevel > 0)
                {
                    arg = "upgrade";
                }
                m_skillCost.Text = trait.TotalCost + " gold to " + arg;
                if (m_inputDescription.Text != " " && m_inputDescription.Text != "")
                {
                    m_skillCurrent.Y = m_inputDescription.Bounds.Bottom + 40;
                }
                else
                {
                    m_skillCurrent.Y = m_skillDescription.Bounds.Bottom + 40;
                }
                m_skillUpgrade.Y             = m_skillCurrent.Y + 30f;
                m_skillLevel.Y               = m_skillUpgrade.Y + 30f;
                m_descriptionDivider.Visible = true;
            }
            else
            {
                m_skillCurrent.Text          = "";
                m_skillUpgrade.Text          = "";
                m_skillLevel.Text            = "";
                m_descriptionDivider.Visible = false;
                var arg2 = "unlock";
                if (trait.CurrentLevel > 0)
                {
                    arg2 = "upgrade";
                }
                m_skillCost.Text = trait.TotalCost + " gold to " + arg2;
            }
            m_descriptionDivider.Position = new Vector2(m_skillCurrent.AbsX, m_skillCurrent.AbsY - 20f);
            if (trait.CurrentLevel >= trait.MaxLevel)
            {
                m_skillCost.Visible   = false;
                m_skillCostBG.Visible = false;
            }
            else
            {
                m_skillCost.Visible   = true;
                m_skillCostBG.Visible = true;
            }
            m_playerMoney.Text = Game.PlayerStats.Gold.ToString();
        }
示例#8
0
        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();
        }
示例#9
0
 public override void LoadContent()
 {
     m_blacksmithUI                    = new ObjContainer("BlacksmithUI_Character");
     m_blacksmithUI.Position           = new Vector2(660f, 360f);
     m_playerMoney                     = new TextObj(Game.GoldFont);
     m_playerMoney.Align               = Types.TextAlign.Left;
     m_playerMoney.Text                = "1000";
     m_playerMoney.FontSize            = 30f;
     m_playerMoney.OverrideParentScale = true;
     m_playerMoney.Position            = new Vector2(210f, -225f);
     m_playerMoney.AnchorY             = 10f;
     m_blacksmithUI.AddChild(m_playerMoney);
     for (var i = 0; i < m_blacksmithUI.NumChildren; i++)
     {
         m_blacksmithUI.GetChildAt(i).Scale = Vector2.Zero;
     }
     m_selectionIcon = new SpriteObj("BlacksmithUI_SelectionIcon_Sprite");
     m_selectionIcon.PlayAnimation();
     m_selectionIcon.Scale               = Vector2.Zero;
     m_selectionIcon.AnimationDelay      = 0.1f;
     m_selectionIcon.ForceDraw           = true;
     m_equipmentDescriptionText          = new TextObj(Game.JunicodeFont);
     m_equipmentDescriptionText.Align    = Types.TextAlign.Centre;
     m_equipmentDescriptionText.FontSize = 12f;
     m_equipmentDescriptionText.Position = new Vector2(230f, -20f);
     m_equipmentDescriptionText.Text     = "Select a category";
     m_equipmentDescriptionText.WordWrap(190);
     m_equipmentDescriptionText.Scale = Vector2.Zero;
     m_blacksmithUI.AddChild(m_equipmentDescriptionText);
     foreach (var current in m_masterIconArray)
     {
         var absPosition = m_blacksmithUI.GetChildAt(6).AbsPosition;
         absPosition.X += 85f;
         var x    = absPosition.X;
         var num  = 70f;
         var num2 = 80f;
         for (var j = 0; j < current.Length; j++)
         {
             current[j]           = new ObjContainer("BlacksmithUI_QuestionMarkIcon_Character");
             current[j].Position  = absPosition;
             current[j].Scale     = Vector2.Zero;
             current[j].ForceDraw = true;
             absPosition.X       += num;
             if (absPosition.X > x + num * 4f)
             {
                 absPosition.X  = x;
                 absPosition.Y += num2;
             }
         }
     }
     InitializeTextObjs();
     m_equippedIcon             = new SpriteObj("BlacksmithUI_EquippedIcon_Sprite");
     m_confirmText              = new KeyIconTextObj(Game.JunicodeFont);
     m_confirmText.Text         = "to close map";
     m_confirmText.FontSize     = 12f;
     m_confirmText.Position     = new Vector2(50f, 550f);
     m_confirmText.ForceDraw    = true;
     m_cancelText               = new KeyIconTextObj(Game.JunicodeFont);
     m_cancelText.Text          = "to re-center on player";
     m_cancelText.FontSize      = 12f;
     m_cancelText.Position      = new Vector2(m_confirmText.X, m_confirmText.Y + 40f);
     m_cancelText.ForceDraw     = true;
     m_navigationText           = new KeyIconTextObj(Game.JunicodeFont);
     m_navigationText.Text      = "to move map";
     m_navigationText.FontSize  = 12f;
     m_navigationText.Position  = new Vector2(m_confirmText.X, m_confirmText.Y + 80f);
     m_navigationText.ForceDraw = true;
     m_newIconList              = new List <SpriteObj>();
     for (var k = 0; k < 25; k++)
     {
         var spriteObj = new SpriteObj("BlacksmithUI_NewIcon_Sprite");
         spriteObj.Visible = false;
         spriteObj.Scale   = new Vector2(1.1f, 1.1f);
         m_newIconList.Add(spriteObj);
     }
     base.LoadContent();
 }
示例#10
0
 public override void LoadContent()
 {
     TextObj textObj = new TextObj(Game.JunicodeFont);
     textObj.FontSize = 12f;
     textObj.Align = Types.TextAlign.Left;
     TextObj textObj2 = new TextObj(Game.JunicodeFont);
     textObj2.FontSize = 14f;
     textObj2.Text = "Blacksmith";
     textObj2.DropShadow = new Vector2(2f, 2f);
     textObj2.TextureColor = new Color(236, 197, 132);
     this.m_dialogContainer = new ObjContainer("DialogBox_Character");
     this.m_dialogContainer.Position = new Vector2(660f, 100f);
     this.m_dialogContainer.AddChild(textObj2);
     this.m_dialogContainer.ForceDraw = true;
     textObj2.Position = new Vector2((float)(-(float)this.m_dialogContainer.Width) / 2.2f, (float)(-(float)this.m_dialogContainer.Height) / 1.6f);
     this.m_dialogContainer.AddChild(textObj);
     textObj.Position = new Vector2((float)(-(float)this.m_dialogContainer.Width) / 2.15f, (float)(-(float)this.m_dialogContainer.Height) / 3.5f);
     textObj.Text = "This is a test to see how much text I can fit onto this dialog box without it running out of space. The text needs to be defined after the dialog text position is set, because the dialogtext width affects the entire width of the dialog container, which in END.";
     textObj.WordWrap(850);
     textObj.DropShadow = new Vector2(2f, 3f);
     SpriteObj spriteObj = new SpriteObj("ContinueTextIcon_Sprite");
     spriteObj.Position = new Vector2((float)this.m_dialogContainer.GetChildAt(2).Bounds.Right, (float)this.m_dialogContainer.GetChildAt(2).Bounds.Bottom);
     this.m_dialogContainer.AddChild(spriteObj);
     this.m_dialogContinueIconY = spriteObj.Y;
     TextObj textObj3 = new TextObj(Game.JunicodeFont);
     textObj3.FontSize = 12f;
     textObj3.Text = "Yes";
     textObj3.Align = Types.TextAlign.Centre;
     TextObj textObj4 = new TextObj(Game.JunicodeFont);
     textObj4.FontSize = 12f;
     textObj4.Text = "No";
     textObj4.Align = Types.TextAlign.Centre;
     this.m_dialogChoiceContainer = new ObjContainer();
     SpriteObj obj = new SpriteObj("GameOverStatPlate_Sprite");
     this.m_dialogChoiceContainer.AddChild(obj);
     SpriteObj spriteObj2 = new SpriteObj("DialogueChoiceHighlight_Sprite");
     this.m_dialogChoiceContainer.AddChild(spriteObj2);
     this.m_dialogChoiceContainer.ForceDraw = true;
     this.m_dialogChoiceContainer.Position = new Vector2(660f, 360f);
     this.m_dialogChoiceContainer.AddChild(textObj3);
     textObj3.Y -= 40f;
     this.m_dialogChoiceContainer.AddChild(textObj4);
     textObj4.Y += 7f;
     spriteObj2.Position = new Vector2(textObj3.X, textObj3.Y + (float)(spriteObj2.Height / 2) + 3f);
     this.m_dialogChoiceContainer.Scale = Vector2.Zero;
     this.m_dialogChoiceContainer.Visible = false;
     base.LoadContent();
 }
示例#11
0
        private void SetData()
        {
            switch (m_skillUnlockType)
            {
            case 1:
                m_picture.ChangeSprite("BlacksmithUnlockPicture_Sprite");
                m_title.ChangeSprite("SmithyUnlockedText_Sprite");
                break;

            case 2:
                m_picture.ChangeSprite("EnchantressUnlockPicture_Sprite");
                m_title.ChangeSprite("EnchantressUnlockedText_Sprite");
                break;

            case 3:
                m_picture.ChangeSprite("ArchitectUnlockPicture_Sprite");
                m_title.ChangeSprite("ArchitectUnlockedText_Sprite");
                break;

            case 4:
                m_picture.ChangeSprite("NinjaUnlockPicture_Sprite");
                m_title.ChangeSprite("ClassUnlockedText_Sprite");
                break;

            case 5:
                m_picture.ChangeSprite("BankerUnlockPicture_Sprite");
                m_title.ChangeSprite("ClassUnlockedText_Sprite");
                break;

            case 6:
                m_picture.ChangeSprite("SpellSwordUnlockPicture_Sprite");
                m_title.ChangeSprite("ClassUnlockedText_Sprite");
                break;

            case 7:
                m_picture.ChangeSprite("LichUnlockPicture_Sprite");
                m_title.ChangeSprite("ClassUnlockedText_Sprite");
                break;

            case 8:
                m_picture.ChangeSprite("KnightUpgradePicture_Sprite");
                m_title.ChangeSprite("ClassUpgradedText_Sprite");
                break;

            case 9:
                m_picture.ChangeSprite("MageUpgradePicture_Sprite");
                m_title.ChangeSprite("ClassUpgradedText_Sprite");
                break;

            case 10:
                m_picture.ChangeSprite("BarbarianUpgradePicture_Sprite");
                m_title.ChangeSprite("ClassUpgradedText_Sprite");
                break;

            case 11:
                m_picture.ChangeSprite("NinjaUpgradePicture_Sprite");
                m_title.ChangeSprite("ClassUpgradedText_Sprite");
                break;

            case 12:
                m_picture.ChangeSprite("AssassinUpgradePicture_Sprite");
                m_title.ChangeSprite("ClassUpgradedText_Sprite");
                break;

            case 13:
                m_picture.ChangeSprite("BankerUpgradePicture_Sprite");
                m_title.ChangeSprite("ClassUpgradedText_Sprite");
                break;

            case 14:
                m_picture.ChangeSprite("SpellSwordUpgradePicture_Sprite");
                m_title.ChangeSprite("ClassUpgradedText_Sprite");
                break;

            case 15:
                m_picture.ChangeSprite("LichUpgradePicture_Sprite");
                m_title.ChangeSprite("ClassUpgradedText_Sprite");
                break;

            case 16:
                m_picture.ChangeSprite("DragonUnlockPicture_Sprite");
                m_title.ChangeSprite("ClassUnlockedText_Sprite");
                break;

            case 17:
                m_picture.ChangeSprite("TraitorUnlockPicture_Sprite");
                m_title.ChangeSprite("ClassUnlockedText_Sprite");
                break;
            }
            m_text.Text = SkillUnlockType.Description(m_skillUnlockType);
            m_text.WordWrap(340);
        }