public override void Initialize() { foreach (var current in EnemyList) { if (current is EnemyObj_Fireball) { m_boss = (current as EnemyObj_Fireball); } current.Visible = false; current.PauseEnemy(true); } m_boss.ChangeSprite("EnemyGhostBossIdle_Character"); m_bossStartingScale = m_boss.ScaleX; m_fireList = new List <SpriteObj>(); var num = 0f; var num2 = 24f; for (var i = 0; i < 15; i++) { var spriteObj = new SpriteObj("GhostBossProjectile_Sprite"); spriteObj.PlayAnimation(); spriteObj.OutlineWidth = 2; spriteObj.Position = CDGMath.GetCirclePosition(num, 300f, m_boss.Position); spriteObj.Scale = new Vector2(2f, 2f); num += num2; spriteObj.Opacity = 0f; m_fireList.Add(spriteObj); GameObjList.Add(spriteObj); } base.Initialize(); }
public override void LoadContent(GraphicsDevice graphics) { m_daggerIcons = new ObjContainer(); var num = 0; var num2 = 10; for (var i = 0; i < m_numTries; i++) { var spriteObj = new SpriteObj("SpellDagger_Sprite"); spriteObj.Scale = new Vector2(2f, 2f); spriteObj.X = num + 10; spriteObj.Y = num2; num += spriteObj.Width; if (i == m_numTries / 2 - 1) { num = 0; num2 += 20; } m_daggerIcons.AddChild(spriteObj); } m_daggerIcons.OutlineWidth = 2; m_targetIcons = new ObjContainer(); for (var j = 0; j < m_numTargets; j++) { var spriteObj2 = new SpriteObj("Target2Piece1_Sprite"); spriteObj2.Scale = new Vector2(2f, 2f); spriteObj2.X += j * (spriteObj2.Width + 10); m_targetIcons.AddChild(spriteObj2); } m_targetIcons.OutlineWidth = 2; GameObjList.Add(m_targetIcons); GameObjList.Add(m_daggerIcons); base.LoadContent(graphics); }
public override void Initialize() { m_bossTitle1 = new TextObj(Game.JunicodeFont); m_bossTitle1.Text = "The Forsaken"; m_bossTitle1.OutlineWidth = 2; m_bossTitle1.FontSize = 18f; m_bossTitle2 = new TextObj(Game.JunicodeLargeFont); m_bossTitle2.Text = "Alexander"; m_bossTitle2.OutlineWidth = 2; m_bossTitle2.FontSize = 40f; m_bossDivider = new SpriteObj("Blank_Sprite"); m_bossDivider.OutlineWidth = 2; foreach (var current in DoorList) { m_roomFloor = current.Bounds.Bottom; } m_bossChest = new ChestObj(null); m_bossChest.Position = new Vector2(Bounds.Center.X - m_bossChest.Width / 2f, Bounds.Center.Y); GameObjList.Add(m_bossChest); m_rainFG = new List <RaindropObj>(); for (var i = 0; i < 50; i++) { var raindropObj = new RaindropObj(new Vector2(CDGMath.RandomFloat(X - Width, X), CDGMath.RandomFloat(Y, Y + Height))); m_rainFG.Add(raindropObj); raindropObj.ChangeToParticle(); } base.Initialize(); }
public override void Initialize() { m_speechBubble = new SpriteObj("UpArrowSquare_Sprite"); m_speechBubble.Flip = SpriteEffects.FlipHorizontally; m_icon = new SpriteObj("Blank_Sprite"); m_icon.Scale = new Vector2(2f, 2f); foreach (var current in GameObjList) { if (current.Name == "pedestal") { m_pedestal = (current as SpriteObj); break; } } m_pedestal.OutlineWidth = 2; m_icon.X = m_pedestal.X; m_icon.Y = m_pedestal.Y - (m_pedestal.Y - m_pedestal.Bounds.Top) - m_icon.Height / 2f - 10f; m_icon.OutlineWidth = 2; m_iconYPos = m_icon.Y; GameObjList.Add(m_icon); m_speechBubble.Y = m_icon.Y - 30f; m_speechBubble.X = m_icon.X; m_speechBubble.Visible = false; GameObjList.Add(m_speechBubble); base.Initialize(); }
public override void LoadContent(GraphicsDevice graphics) { m_tutorialText = new KeyIconTextObj(Game.JunicodeLargeFont); m_tutorialText.FontSize = 28f; m_tutorialText.Text = "[Input:" + 10 + "] to Jump"; m_tutorialText.Align = Types.TextAlign.Centre; m_tutorialText.OutlineWidth = 2; m_tutorialText.ForcedScale = new Vector2(0.8f, 0.8f); m_creditsText = new TextObj(Game.JunicodeFont); m_creditsText.FontSize = 20f; m_creditsText.Text = "Cellar Door Games"; m_creditsText.DropShadow = new Vector2(2f, 2f); m_creditsTitleText = (m_creditsText.Clone() as TextObj); m_creditsTitleText.FontSize = 14f; var textObj = new TextObj(Game.JunicodeFont); textObj.FontSize = 12f; textObj.Text = "Down Attack this"; textObj.OutlineWidth = 2; textObj.Align = Types.TextAlign.Centre; textObj.Position = m_waypointList[m_waypointList.Count - 1].Position; textObj.X -= 25f; textObj.Y -= 70f; GameObjList.Add(textObj); base.LoadContent(graphics); }
public override void Initialize() { var vector = Vector2.Zero; var zero = Vector2.Zero; foreach (var current in GameObjList) { if (current is WaypointObj) { zero.X = current.X; } } foreach (var current2 in TerrainObjList) { if (current2.Name == "GatePosition") { vector = new Vector2(current2.X, current2.Bounds.Bottom); } if (current2.Name == "Floor") { zero.Y = current2.Y; } } m_gate.Position = new Vector2(vector.X, vector.Y); if (!IsReversed) { m_elf.Flip = SpriteEffects.FlipHorizontally; } m_elf.Position = new Vector2(zero.X, zero.Y - (m_elf.Bounds.Bottom - m_elf.AnchorY) - 2f); GameObjList.Add(m_elf); GameObjList.Add(m_gate); base.Initialize(); }
public void CopyRoomObjects(RoomObj room) { foreach (var current in room.TerrainObjList) { TerrainObjList.Add(current.Clone() as TerrainObj); } foreach (var current2 in room.GameObjList) { GameObjList.Add(current2.Clone() as GameObj); } foreach (var current3 in room.DoorList) { var doorObj = current3.Clone() as DoorObj; doorObj.Room = this; DoorList.Add(doorObj); } foreach (var current4 in room.EnemyList) { EnemyList.Add(current4.Clone() as EnemyObj); } foreach (var current5 in room.BorderList) { BorderList.Add(current5.Clone() as BorderObj); } }
public CastleEntranceRoomObj() { m_castleGate = new PhysicsObj("CastleEntranceGate_Sprite"); m_castleGate.IsWeighted = false; m_castleGate.IsCollidable = true; m_castleGate.CollisionTypeTag = 1; m_castleGate.Layer = -1f; m_castleGate.OutlineWidth = 2; GameObjList.Add(m_castleGate); m_teleporter = new TeleporterObj(); GameObjList.Add(m_teleporter); }
public override void Initialize() { m_boss = (EnemyList[0] as EnemyObj_Fairy); m_boss.PauseEnemy(true); m_bossShadow = new ObjContainer("EnemyFairyGhostBossMove_Character"); m_boss.ChangeSprite("EnemyFairyGhostBossIdle_Character"); m_bossShadow.TextureColor = Color.Black; m_bossShadow.Scale = m_boss.Scale; m_bossShadow.PlayAnimation(); GameObjList.Add(m_bossShadow); base.Initialize(); }
public override void Initialize() { m_speechBubble = new SpriteObj("UpArrowSquare_Sprite"); m_speechBubble.Flip = SpriteEffects.FlipHorizontally; GameObjList.Add(m_speechBubble); foreach (var current in GameObjList) { if (current.Name == "fountain") { m_fountain = current; break; } } (m_fountain as SpriteObj).OutlineWidth = 2; m_speechBubble.X = m_fountain.X; base.Initialize(); }
public override void Initialize() { m_speechBubble = new SpriteObj("UpArrowSquare_Sprite"); m_speechBubble.Flip = SpriteEffects.FlipHorizontally; GameObjList.Add(m_speechBubble); foreach (var current in GameObjList) { if (current.Name == "diary") { m_diary = (current as SpriteObj); break; } } m_diary.OutlineWidth = 2; m_speechBubble.Position = new Vector2(m_diary.X, m_diary.Y - m_speechBubble.Height - 20f); base.Initialize(); }
public override void Initialize() { foreach (var current in GameObjList) { if (current.Name == "portrait") { m_portraitFrame = (current as SpriteObj); break; } } m_portraitFrame.ChangeSprite("GiantPortrait_Sprite"); m_portraitFrame.Scale = new Vector2(2f, 2f); m_portrait = new SpriteObj("Blank_Sprite"); m_portrait.Position = m_portraitFrame.Position; m_portrait.Scale = new Vector2(0.95f, 0.95f); GameObjList.Add(m_portrait); base.Initialize(); }
public override void Initialize() { m_speechBubble = new SpriteObj("UpArrowSquare_Sprite"); m_speechBubble.Flip = SpriteEffects.FlipHorizontally; m_speechBubble.Visible = false; GameObjList.Add(m_speechBubble); foreach (var current in GameObjList) { if (current.Name == "Jukebox") { m_jukeBox = current; break; } } (m_jukeBox as SpriteObj).OutlineWidth = 2; m_jukeBox.Y -= 2f; m_speechBubble.Position = new Vector2(m_jukeBox.X, m_jukeBox.Y - m_speechBubble.Height - 20f); base.Initialize(); }
public override void LoadContent(GraphicsDevice graphics) { var textObj = new TextObj(Game.JunicodeFont); textObj.FontSize = 25f; textObj.Text = "test text"; textObj.DropShadow = new Vector2(2f, 2f); if (!IsReversed) { textObj.Position = new Vector2(Bounds.Right - 1000, Bounds.Top + 200); } else { textObj.Position = new Vector2(Bounds.Left + 300, Bounds.Top + 200); } for (var i = 0; i < 3; i++) { var textObj2 = textObj.Clone() as TextObj; textObj2.Y += i * 100; m_targetText.Add(textObj2); var textObj3 = textObj.Clone() as TextObj; textObj3.Y += i * 100; textObj3.X = textObj2.X + 500f; m_targetDataText.Add(textObj3); } m_axeIcons = new ObjContainer(); var num = 0; var num2 = 10; for (var j = 0; j < m_numTries; j++) { var spriteObj = new SpriteObj("SpellAxe_Sprite"); spriteObj.Scale = new Vector2(2f, 2f); spriteObj.X = num + 10; spriteObj.Y = num2; num += spriteObj.Width + 5; m_axeIcons.AddChild(spriteObj); } m_axeIcons.OutlineWidth = 2; GameObjList.Add(m_axeIcons); base.LoadContent(graphics); }
public override void Initialize() { m_teleporter = new TeleporterObj(); SpriteObj item = null; foreach (var current in GameObjList) { if (current.Name == "teleporter") { m_teleporter.Position = current.Position; item = (current as SpriteObj); break; } } GameObjList.Remove(item); GameObjList.Add(m_teleporter); m_teleporter.OutlineWidth = 2; m_teleporter.TextureColor = Color.PaleVioletRed; base.Initialize(); }
public override void Initialize() { m_boss1 = (EnemyList[0] as EnemyObj_Blob); m_boss1.PauseEnemy(true); m_boss1.DisableAllWeight = false; m_desiredBossScale = m_boss1.Scale.X; m_blobArray = new List <ObjContainer>(); for (var i = 0; i < m_numIntroBlobs; i++) { var objContainer = new ObjContainer("EnemyBlobBossAir_Character"); objContainer.Position = m_boss1.Position; objContainer.Scale = new Vector2(0.4f, 0.4f); objContainer.GetChildAt(0).TextureColor = Color.White; objContainer.GetChildAt(2).TextureColor = Color.LightSkyBlue; objContainer.GetChildAt(2).Opacity = 0.8f; (objContainer.GetChildAt(1) as SpriteObj).OutlineColour = Color.Black; objContainer.Y -= 1000f; m_blobArray.Add(objContainer); GameObjList.Add(objContainer); } base.Initialize(); }
public override void Initialize() { m_bossTitle1 = new TextObj(Game.JunicodeFont) { Text = "The Forsaken", OutlineWidth = 2, FontSize = 18f }; m_bossTitle2 = new TextObj(Game.JunicodeLargeFont) { Text = "Alexander", OutlineWidth = 2, FontSize = 40f }; m_bossDivider = new SpriteObj("Blank_Sprite") { OutlineWidth = 2 }; foreach (var current in DoorList) { m_roomFloor = current.Bounds.Bottom; } m_bossChest = new ChestObj(null); m_bossChest.Position = new Vector2(Bounds.Center.X - m_bossChest.Width / 2f, Bounds.Center.Y); GameObjList.Add(m_bossChest); base.Initialize(); }
public override void Initialize() { m_speechBubble = new SpriteObj("ExclamationSquare_Sprite"); m_speechBubble.Flip = SpriteEffects.FlipHorizontally; m_speechBubble.Scale = new Vector2(1.2f, 1.2f); GameObjList.Add(m_speechBubble); m_mapText = new KeyIconTextObj(Game.JunicodeFont); m_mapText.Text = "view map any time"; m_mapText.Align = Types.TextAlign.Centre; m_mapText.FontSize = 12f; m_mapText.OutlineWidth = 2; GameObjList.Add(m_mapText); m_mapIcon = new KeyIconObj(); m_mapIcon.Scale = new Vector2(0.5f, 0.5f); GameObjList.Add(m_mapIcon); foreach (var current in GameObjList) { if (current.Name == "diary") { m_diary = (current as SpriteObj); } if (current.Name == "map") { (current as SpriteObj).OutlineWidth = 2; m_mapText.Position = new Vector2(current.X, current.Bounds.Top - 50); m_mapIcon.Position = new Vector2(m_mapText.X, m_mapText.Y - 20f); } } m_diary.OutlineWidth = 2; m_speechBubble.Position = new Vector2(m_diary.X, m_diary.Y - m_speechBubble.Height - 20f); DoorObj doorObj = null; foreach (var current2 in GameObjList) { if (current2.Name == "LastDoor") { m_bossDoorSprite = (current2 as ObjContainer); break; } } foreach (var current3 in DoorList) { if (current3.DoorPosition == "Left") { doorObj = current3; } if (current3.IsBossDoor) { m_bossDoor = current3; m_bossDoor.Locked = true; } } for (var i = 1; i < m_bossDoorSprite.NumChildren; i++) { m_bossDoorSprite.GetChildAt(i).Opacity = 0f; } m_bossDoorSprite.AnimationDelay = 0.1f; m_castleGate.Position = new Vector2(doorObj.Bounds.Right - m_castleGate.Width, doorObj.Y - m_castleGate.Height); m_teleporter.Position = new Vector2(X + Width / 2f - 600f, Y + 720f - 120f); base.Initialize(); }
public override void Initialize() { foreach (var current in GameObjList) { if (current.Name == "diary") { m_diary = (current as SpriteObj); } if (current.Name == "doorsprite") { m_doorSprite = (current as SpriteObj); } } m_door = DoorList[0]; m_speechBubble = new SpriteObj("ExclamationSquare_Sprite"); m_speechBubble.Flip = SpriteEffects.FlipHorizontally; m_speechBubble.Scale = new Vector2(1.2f, 1.2f); GameObjList.Add(m_speechBubble); m_diary.OutlineWidth = 2; m_speechBubble.Position = new Vector2(m_diary.X, m_diary.Y - m_speechBubble.Height - 20f); m_tutorialTextList = new[] { "Tap [Input:" + 11 + "] to Jump", "Hold [Input:" + 11 + "] to Jump Higher", "Tap [Input:" + 12 + "] to Attack", string.Concat("Hold [Input:", 19, "] and Tap [Input:", 11, "] to Drop Ledges"), string.Concat("(Air) Hold [Input:", 19, "] and Tap [Input:", 12, "] to Attack Down") }; m_tutorialControllerTextList = new[] { "Tap [Input:" + 10 + "] to Jump", "Hold [Input:" + 10 + "] to Jump Higher", "Tap [Input:" + 12 + "] to Attack", string.Concat("Hold [Input:", 18, "] and Tap [Input:", 10, "] to Drop Ledges"), string.Concat("(Air) Hold [Input:", 18, "] and Tap [Input:", 12, "] to Attack Down") }; m_creditsTextTitleList = new[] { "Developed by", "Design", "Programming", "Art", "Sound Design & Music", "Music", "" }; m_creditsTextList = new[] { "Cellar Door Games", "Teddy Lee", "Kenny Lee", "Glauber Kotaki", "Gordon McGladdery", "Judson Cowan", "Rogue Legacy" }; m_creditsPosition = new Vector2(50f, 580f); foreach (var current2 in GameObjList) { if (current2.Name == "waypoint1") { m_waypointList.Add(current2); } if (current2.Name == "waypoint2") { m_waypointList.Add(current2); } if (current2.Name == "waypoint3") { m_waypointList.Add(current2); } if (current2.Name == "waypoint4") { m_waypointList.Add(current2); } if (current2.Name == "waypoint5") { m_waypointList.Add(current2); } } base.Initialize(); }
public override void Initialize() { m_gate = new PhysicsObj("CastleEntranceGate_Sprite"); m_gate.IsWeighted = false; m_gate.IsCollidable = true; m_gate.CollisionTypeTag = 1; m_gate.Layer = -1f; m_gate.OutlineWidth = 2; GameObjList.Add(m_gate); var rectangle = default(Rectangle); Color[] array = { Color.Red, Color.Blue, Color.Green, Color.Yellow, Color.Orange, Color.Purple, Color.Pink, Color.MediumTurquoise, Color.CornflowerBlue }; foreach (var current in GameObjList) { if (current is WaypointObj) { m_elf.X = current.X; } if (current.Name == "Balloon") { m_balloonList.Add(current as ObjContainer); (current as ObjContainer).GetChildAt(1).TextureColor = array[CDGMath.RandomInt(0, array.Length - 1)]; } } foreach (var current2 in TerrainObjList) { if (current2.Name == "Floor") { m_elf.Y = current2.Y - (m_elf.Bounds.Bottom - m_elf.Y) - 2f; } if (current2.Name == "GatePosition") { rectangle = current2.Bounds; } } m_gate.X = rectangle.X; m_gate.Y = rectangle.Bottom; if (!IsReversed) { m_elf.Flip = SpriteEffects.FlipHorizontally; } GameObjList.Add(m_elf); foreach (var current3 in TerrainObjList) { if (current3.Name == "Boundary") { current3.Visible = false; m_targetBounds = current3.Bounds; break; } } var num = 10f; float num2 = m_targetBounds.X + 40; float num3 = m_targetBounds.Y; var num4 = m_targetBounds.Width / num; var num5 = m_targetBounds.Height / num; var num6 = 0; while (num6 < num * num) { var breakableObj = new BreakableObj("Target2_Character"); breakableObj.X = num2; breakableObj.Y = num3; breakableObj.Scale = new Vector2(1.6f, 1.6f); breakableObj.OutlineWidth = 2; breakableObj.HitBySpellsOnly = true; breakableObj.IsWeighted = false; m_targetList.Add(breakableObj); breakableObj.SameTypesCollide = false; breakableObj.DropItem = false; GameObjList.Add(breakableObj); num2 += num4; if ((num6 + 1) % num == 0f) { num2 = m_targetBounds.X + 40; num3 += num5; } num6++; } m_rewardChest = new ChestObj(null); m_rewardChest.ChestType = 3; if (!IsReversed) { m_rewardChest.Flip = SpriteEffects.FlipHorizontally; m_rewardChest.Position = new Vector2(m_elf.X + 100f, m_elf.Bounds.Bottom - m_rewardChest.Height - 8); } else { m_rewardChest.Position = new Vector2(m_elf.X - 150f, m_elf.Bounds.Bottom - m_rewardChest.Height - 8); } m_rewardChest.Visible = false; GameObjList.Add(m_rewardChest); base.Initialize(); }
public override void Initialize() { Color[] array = { Color.Red, Color.Blue, Color.Green, Color.Yellow, Color.Orange, Color.Purple, Color.Pink, Color.MediumTurquoise, Color.CornflowerBlue }; foreach (var current in GameObjList) { if (current is WaypointObj) { m_elf.X = current.X; } if (current.Name == "Line") { m_line = current; } if (current.Name == "Balloon") { m_balloonList.Add(current as ObjContainer); (current as ObjContainer).GetChildAt(1).TextureColor = array[CDGMath.RandomInt(0, array.Length - 1)]; } } var num = 0f; foreach (var current2 in TerrainObjList) { if (current2.Name == "Floor") { m_elf.Y = current2.Y - (m_elf.Bounds.Bottom - m_elf.Y); num = current2.Y; break; } } if (!IsReversed) { m_elf.Flip = SpriteEffects.FlipHorizontally; } GameObjList.Add(m_elf); m_elf.Y -= 2f; m_targetList = new List <BreakableObj>(); for (var i = 0; i < m_numTargets; i++) { var breakableObj = new BreakableObj("Target1_Character"); breakableObj.Scale = new Vector2(2f, 2f); breakableObj.Visible = false; breakableObj.DropItem = false; breakableObj.HitBySpellsOnly = true; breakableObj.Position = m_line.Position; if (!IsReversed) { breakableObj.Flip = SpriteEffects.FlipHorizontally; } else { breakableObj.Flip = SpriteEffects.None; } m_targetList.Add(breakableObj); GameObjList.Add(breakableObj); } m_rewardChest = new ChestObj(null); m_rewardChest.ChestType = 3; if (!IsReversed) { m_rewardChest.Flip = SpriteEffects.FlipHorizontally; m_rewardChest.Position = new Vector2(m_elf.X + 100f, num - m_rewardChest.Height - 8f); } else { m_rewardChest.Position = new Vector2(m_elf.X - 150f, num - m_rewardChest.Height - 8f); } m_rewardChest.Visible = false; GameObjList.Add(m_rewardChest); base.Initialize(); }