public override void Dispose() { if (!IsDisposed) { Console.WriteLine("Disposing Game Over Boss Screen"); m_lastBoss = null; m_dialoguePlate.Dispose(); m_dialoguePlate = null; m_continueText.Dispose(); m_continueText = null; m_playerGhost.Dispose(); m_playerGhost = null; m_spotlight.Dispose(); m_spotlight = null; m_bossFallSound.Dispose(); m_bossFallSound = null; m_bossKneesSound.Dispose(); m_bossKneesSound = null; m_playerFrame.Dispose(); m_playerFrame = null; m_king.Dispose(); m_king = null; base.Dispose(); } }
public override void Dispose() { if (!base.IsDisposed) { Console.WriteLine("Disposing Game Over Boss Screen"); this.m_lastBoss = null; this.m_dialoguePlate.Dispose(); this.m_dialoguePlate = null; this.m_continueText.Dispose(); this.m_continueText = null; this.m_playerGhost.Dispose(); this.m_playerGhost = null; this.m_spotlight.Dispose(); this.m_spotlight = null; this.m_bossFallSound.Dispose(); this.m_bossFallSound = null; this.m_bossKneesSound.Dispose(); this.m_bossKneesSound = null; this.m_playerFrame.Dispose(); this.m_playerFrame = null; this.m_king.Dispose(); this.m_king = null; base.Dispose(); } }
private void CreateLineageObjs() { var num = 700; var num2 = 400; var num3 = 0; if (Game.PlayerStats.FamilyTreeArray.Count > 10) { for (var i = 0; i < 10; i++) { var familyTreeNode = Game.PlayerStats.FamilyTreeArray[i]; var lineageObj = new LineageObj(null, true); lineageObj.IsDead = true; lineageObj.Age = familyTreeNode.Age; lineageObj.ChildAge = familyTreeNode.ChildAge; lineageObj.Class = familyTreeNode.Class; lineageObj.PlayerName = familyTreeNode.Name; lineageObj.IsFemale = familyTreeNode.IsFemale; lineageObj.SetPortrait(familyTreeNode.HeadPiece, familyTreeNode.ShoulderPiece, familyTreeNode.ChestPiece); lineageObj.NumEnemiesKilled = familyTreeNode.NumEnemiesBeaten; lineageObj.BeatenABoss = familyTreeNode.BeatenABoss; lineageObj.SetTraits(familyTreeNode.Traits); lineageObj.UpdateAge(num); lineageObj.UpdateData(); lineageObj.UpdateClassRank(); num += lineageObj.Age; lineageObj.X = num3; num3 += num2; m_lineageArray.Add(lineageObj); } return; } foreach (var current in Game.PlayerStats.FamilyTreeArray) { var lineageObj2 = new LineageObj(null, true); lineageObj2.IsDead = true; lineageObj2.Age = current.Age; lineageObj2.ChildAge = current.ChildAge; lineageObj2.Class = current.Class; lineageObj2.PlayerName = current.Name; lineageObj2.IsFemale = current.IsFemale; lineageObj2.SetPortrait(current.HeadPiece, current.ShoulderPiece, current.ChestPiece); lineageObj2.NumEnemiesKilled = current.NumEnemiesBeaten; lineageObj2.BeatenABoss = current.BeatenABoss; lineageObj2.SetTraits(current.Traits); lineageObj2.UpdateAge(num); lineageObj2.UpdateData(); lineageObj2.UpdateClassRank(); num += lineageObj2.Age; lineageObj2.X = num3; num3 += num2; m_lineageArray.Add(lineageObj2); } }
public override void LoadContent() { m_continueText = new KeyIconTextObj(Game.JunicodeFont); m_continueText.FontSize = 14f; m_continueText.Align = Types.TextAlign.Right; m_continueText.Opacity = 0f; m_continueText.Position = new Vector2(1270f, 30f); m_continueText.ForceDraw = true; var dropShadow = new Vector2(2f, 2f); var textureColor = new Color(255, 254, 128); m_dialoguePlate = new ObjContainer("DialogBox_Character"); m_dialoguePlate.Position = new Vector2(660f, 610f); m_dialoguePlate.ForceDraw = true; var textObj = new TextObj(Game.JunicodeFont); textObj.Align = Types.TextAlign.Centre; textObj.Text = "Your valor shown in battle shall never be forgotten."; textObj.FontSize = 18f; textObj.DropShadow = dropShadow; textObj.Position = new Vector2(0f, -(float)m_dialoguePlate.Height / 2 + 25); m_dialoguePlate.AddChild(textObj); var keyIconTextObj = new KeyIconTextObj(Game.JunicodeFont); keyIconTextObj.FontSize = 12f; keyIconTextObj.Align = Types.TextAlign.Centre; keyIconTextObj.Text = "\"Arrrrggghhhh\""; keyIconTextObj.DropShadow = dropShadow; keyIconTextObj.Y = 10f; keyIconTextObj.TextureColor = textureColor; m_dialoguePlate.AddChild(keyIconTextObj); var textObj2 = new TextObj(Game.JunicodeFont); textObj2.FontSize = 8f; textObj2.Text = "-Player X's parting words"; textObj2.Y = keyIconTextObj.Y; textObj2.Y += 40f; textObj2.X += 20f; textObj2.DropShadow = dropShadow; m_dialoguePlate.AddChild(textObj2); m_playerGhost = new SpriteObj("PlayerGhost_Sprite"); m_playerGhost.AnimationDelay = 0.1f; m_spotlight = new SpriteObj("GameOverSpotlight_Sprite"); m_spotlight.Rotation = 90f; m_spotlight.ForceDraw = true; m_spotlight.Position = new Vector2(660f, 40 + m_spotlight.Height); m_playerFrame = new LineageObj(null, true); m_playerFrame.DisablePlaque = true; m_king = new SpriteObj("King_Sprite"); m_king.OutlineWidth = 2; m_king.AnimationDelay = 0.1f; m_king.PlayAnimation(); m_king.Scale = new Vector2(2f, 2f); base.LoadContent(); }
private void AddLineageRow(int numLineages, Vector2 position, bool createEmpty, bool randomizePortrait) { if (m_selectedLineageObj != null) { m_selectedLineageObj.ForceDraw = false; m_selectedLineageObj.Y = 0f; } m_currentPoint = position; m_currentBranchArray.Clear(); int[] array = { -450, 0, 450 }; int[] array2 = { -200, 200 }; for (var i = 0; i < numLineages; i++) { var lineageObj = new LineageObj(this, createEmpty); if (randomizePortrait) { lineageObj.RandomizePortrait(); } lineageObj.ForceDraw = true; lineageObj.X = position.X + m_xPosOffset; var array3 = array; if (numLineages == 2) { array3 = array2; } lineageObj.Y = array3[i]; m_currentBranchArray.Add(lineageObj); if (lineageObj.Traits.X == 20f || lineageObj.Traits.Y == 20f) { lineageObj.FlipPortrait = true; } } m_currentPoint = m_currentBranchArray[1].Position; Camera.Position = m_currentPoint; m_selectedLineageObj = m_currentBranchArray[1]; m_selectedLineageIndex = 1; }
private void CreateLineageObjDebug() { var num = 700; var num2 = 400; var num3 = 0; for (var i = 0; i < 10; i++) { FamilyTreeNode familyTreeNode; if (i > Game.PlayerStats.FamilyTreeArray.Count - 1) { familyTreeNode = new FamilyTreeNode { Age = (byte)CDGMath.RandomInt(15, 30), ChildAge = (byte)CDGMath.RandomInt(15, 30), Name = Game.NameArray[CDGMath.RandomInt(0, Game.NameArray.Count - 1)], HeadPiece = (byte)CDGMath.RandomInt(1, 5), ShoulderPiece = (byte)CDGMath.RandomInt(1, 5), ChestPiece = (byte)CDGMath.RandomInt(1, 5) }; } else { familyTreeNode = Game.PlayerStats.FamilyTreeArray[i]; } var lineageObj = new LineageObj(null, true); lineageObj.IsDead = true; lineageObj.Age = familyTreeNode.Age; lineageObj.ChildAge = familyTreeNode.ChildAge; lineageObj.Class = familyTreeNode.Class; lineageObj.PlayerName = familyTreeNode.Name; lineageObj.IsFemale = familyTreeNode.IsFemale; lineageObj.SetPortrait(familyTreeNode.HeadPiece, familyTreeNode.ShoulderPiece, familyTreeNode.ChestPiece); lineageObj.NumEnemiesKilled = familyTreeNode.NumEnemiesBeaten; lineageObj.BeatenABoss = familyTreeNode.BeatenABoss; lineageObj.SetTraits(familyTreeNode.Traits); lineageObj.UpdateAge(num); lineageObj.UpdateData(); lineageObj.UpdateClassRank(); num += lineageObj.Age; lineageObj.X = num3; num3 += num2; m_lineageArray.Add(lineageObj); } }
public override void Dispose() { if (!IsDisposed) { Console.WriteLine("Disposing Lineage Screen"); m_titleText.Dispose(); m_titleText = null; m_selectedLineageObj = null; foreach (var current in m_currentBranchArray) { current.Dispose(); } m_currentBranchArray.Clear(); m_currentBranchArray = null; foreach (var current2 in m_masterArray) { if (!current2.IsDisposed) { current2.Dispose(); } } m_masterArray.Clear(); m_masterArray = null; if (m_startingLineageObj != null) { m_startingLineageObj.Dispose(); } m_startingLineageObj = null; m_background.Dispose(); m_background = null; m_bgShadow.Dispose(); m_bgShadow = null; m_selectTween = null; m_descriptionPlate.Dispose(); m_descriptionPlate = null; m_confirmText.Dispose(); m_confirmText = null; m_navigationText.Dispose(); m_navigationText = null; m_rerollText.Dispose(); m_rerollText = null; base.Dispose(); } }
public override void Dispose() { if (!base.IsDisposed) { Console.WriteLine("Disposing Lineage Screen"); this.m_titleText.Dispose(); this.m_titleText = null; this.m_selectedLineageObj = null; foreach (LineageObj current in this.m_currentBranchArray) { current.Dispose(); } this.m_currentBranchArray.Clear(); this.m_currentBranchArray = null; foreach (LineageObj current2 in this.m_masterArray) { if (!current2.IsDisposed) { current2.Dispose(); } } this.m_masterArray.Clear(); this.m_masterArray = null; if (this.m_startingLineageObj != null) { this.m_startingLineageObj.Dispose(); } this.m_startingLineageObj = null; this.m_background.Dispose(); this.m_background = null; this.m_bgShadow.Dispose(); this.m_bgShadow = null; this.m_selectTween = null; this.m_descriptionPlate.Dispose(); this.m_descriptionPlate = null; this.m_confirmText.Dispose(); this.m_confirmText = null; this.m_navigationText.Dispose(); this.m_navigationText = null; this.m_rerollText.Dispose(); this.m_rerollText = null; base.Dispose(); } }
public override void Dispose() { if (!IsDisposed) { Console.WriteLine("Disposing Game Over Screen"); m_player = null; m_dialoguePlate.Dispose(); m_dialoguePlate = null; m_continueText.Dispose(); m_continueText = null; m_playerGhost.Dispose(); m_playerGhost = null; m_spotlight.Dispose(); m_spotlight = null; m_playerFallSound.Dispose(); m_playerFallSound = null; m_playerSwordFallSound.Dispose(); m_playerSwordFallSound = null; m_playerSwordSpinSound.Dispose(); m_playerSwordSpinSound = null; m_objKilledPlayer = null; if (m_enemyList != null) { m_enemyList.Clear(); } m_enemyList = null; if (m_enemyStoredPositions != null) { m_enemyStoredPositions.Clear(); } m_enemyStoredPositions = null; m_playerFrame.Dispose(); m_playerFrame = null; base.Dispose(); } }
public void LoadFamilyTreeData() { this.m_masterArray.Clear(); int num = 700; if (Game.PlayerStats.FamilyTreeArray != null && Game.PlayerStats.FamilyTreeArray.Count > 0) { int num2 = 0; using (List<FamilyTreeNode>.Enumerator enumerator = Game.PlayerStats.FamilyTreeArray.GetEnumerator()) { while (enumerator.MoveNext()) { FamilyTreeNode current = enumerator.Current; LineageObj lineageObj = new LineageObj(this, true); lineageObj.IsDead = true; lineageObj.Age = current.Age; lineageObj.ChildAge = current.ChildAge; lineageObj.Class = current.Class; lineageObj.PlayerName = current.Name; lineageObj.IsFemale = current.IsFemale; lineageObj.SetPortrait(current.HeadPiece, current.ShoulderPiece, current.ChestPiece); lineageObj.NumEnemiesKilled = current.NumEnemiesBeaten; lineageObj.BeatenABoss = current.BeatenABoss; lineageObj.SetTraits(current.Traits); lineageObj.UpdateAge(num); lineageObj.UpdateData(); lineageObj.UpdateClassRank(); num += (int)lineageObj.Age; lineageObj.X = (float)num2; num2 += this.m_xPosOffset; this.m_masterArray.Add(lineageObj); if (lineageObj.Traits.X == 20f || lineageObj.Traits.Y == 20f) { lineageObj.FlipPortrait = true; } } return; } } int num3 = 0; LineageObj lineageObj2 = new LineageObj(this, true); lineageObj2.IsDead = true; lineageObj2.Age = 30; lineageObj2.ChildAge = 5; lineageObj2.Class = 0; lineageObj2.PlayerName = "Sir Johannes"; lineageObj2.SetPortrait(1, 1, 1); lineageObj2.NumEnemiesKilled = 50; lineageObj2.BeatenABoss = false; lineageObj2.UpdateAge(num); lineageObj2.UpdateData(); lineageObj2.UpdateClassRank(); num += (int)lineageObj2.Age; lineageObj2.X = (float)num3; num3 += this.m_xPosOffset; this.m_masterArray.Add(lineageObj2); if (lineageObj2.Traits.X == 20f || lineageObj2.Traits.Y == 20f) { lineageObj2.FlipPortrait = true; } }
public override void HandleInput() { if (!this.m_lockControls && (this.m_selectTween == null || (this.m_selectTween != null && !this.m_selectTween.Active))) { LineageObj selectedLineageObj = this.m_selectedLineageObj; int selectedLineageIndex = this.m_selectedLineageIndex; if (Game.GlobalInput.JustPressed(9) && SkillSystem.GetSkill(SkillType.Randomize_Children).ModifierAmount > 0f && !Game.PlayerStats.RerolledChildren) { this.m_lockControls = true; SoundManager.PlaySound(new string[] { "frame_woosh_01", "frame_woosh_02" }); if (this.m_xShift != 0) { this.m_xShift = 0; Tween.By(this.m_descriptionPlate, 0.2f, new Easing(Back.EaseOut), new string[] { "delay", "0.2", "X", "-600" }); this.m_selectTween = Tween.To(base.Camera, 0.3f, new Easing(Quad.EaseOut), new string[] { "delay", "0.2", "X", (this.m_masterArray.Count * this.m_xPosOffset).ToString() }); } (base.ScreenManager as RCScreenManager).StartWipeTransition(); Tween.RunFunction(0.2f, this, "RerollCurrentBranch", new object[0]); } if (Game.GlobalInput.Pressed(20) || Game.GlobalInput.Pressed(21)) { if (base.Camera.X > this.m_masterArray[0].X + 10f) { SoundManager.PlaySound("frame_swoosh_01"); this.m_selectTween = Tween.By(base.Camera, 0.3f, new Easing(Quad.EaseOut), new string[] { "X", (-this.m_xPosOffset).ToString() }); if (this.m_xShift == 0) { Tween.By(this.m_descriptionPlate, 0.2f, new Easing(Back.EaseIn), new string[] { "X", "600" }); } this.m_xShift--; } } else if ((Game.GlobalInput.Pressed(22) || Game.GlobalInput.Pressed(23)) && this.m_xShift < 0) { SoundManager.PlaySound("frame_swoosh_01"); this.m_selectTween = Tween.By(base.Camera, 0.3f, new Easing(Quad.EaseOut), new string[] { "X", this.m_xPosOffset.ToString() }); this.m_xShift++; if (this.m_xShift == 0) { Tween.By(this.m_descriptionPlate, 0.2f, new Easing(Back.EaseOut), new string[] { "X", "-600" }); } } if (this.m_xShift == 0) { if (Game.GlobalInput.JustPressed(16) || Game.GlobalInput.JustPressed(17)) { if (this.m_selectedLineageIndex > 0) { SoundManager.PlaySound("frame_swap"); } this.m_selectedLineageIndex--; if (this.m_selectedLineageIndex < 0) { this.m_selectedLineageIndex = 0; } if (this.m_selectedLineageIndex != selectedLineageIndex) { this.UpdateDescriptionPlate(); this.m_selectTween = Tween.By(this.m_currentBranchArray[0], 0.3f, new Easing(Quad.EaseOut), new string[] { "Y", "450" }); Tween.By(this.m_currentBranchArray[1], 0.3f, new Easing(Quad.EaseOut), new string[] { "Y", "450" }); Tween.By(this.m_currentBranchArray[2], 0.3f, new Easing(Quad.EaseOut), new string[] { "Y", "450" }); } } else if (Game.GlobalInput.JustPressed(18) || Game.GlobalInput.JustPressed(19)) { if (this.m_selectedLineageIndex < this.m_currentBranchArray.Count - 1) { SoundManager.PlaySound("frame_swap"); } this.m_selectedLineageIndex++; if (this.m_selectedLineageIndex > this.m_currentBranchArray.Count - 1) { this.m_selectedLineageIndex = this.m_currentBranchArray.Count - 1; } if (this.m_selectedLineageIndex != selectedLineageIndex) { this.UpdateDescriptionPlate(); this.m_selectTween = Tween.By(this.m_currentBranchArray[0], 0.3f, new Easing(Quad.EaseOut), new string[] { "Y", "-450" }); Tween.By(this.m_currentBranchArray[1], 0.3f, new Easing(Quad.EaseOut), new string[] { "Y", "-450" }); Tween.By(this.m_currentBranchArray[2], 0.3f, new Easing(Quad.EaseOut), new string[] { "Y", "-450" }); } } } this.m_selectedLineageObj = this.m_currentBranchArray[this.m_selectedLineageIndex]; if (Game.GlobalInput.JustPressed(0) || Game.GlobalInput.JustPressed(1)) { if (this.m_xShift == 0) { if (selectedLineageObj == this.m_selectedLineageObj) { RCScreenManager rCScreenManager = base.ScreenManager as RCScreenManager; rCScreenManager.DialogueScreen.SetDialogue("LineageChoiceWarning"); rCScreenManager.DialogueScreen.SetDialogueChoice("ConfirmTest1"); rCScreenManager.DialogueScreen.SetConfirmEndHandler(this, "StartGame", new object[0]); rCScreenManager.DialogueScreen.SetCancelEndHandler(typeof(Console), "WriteLine", new object[] { "Canceling Selection" }); (base.ScreenManager as RCScreenManager).DisplayScreen(13, true, null); } } else { this.m_xShift = 0; SoundManager.PlaySound(new string[] { "frame_woosh_01", "frame_woosh_02" }); Tween.By(this.m_descriptionPlate, 0.2f, new Easing(Back.EaseOut), new string[] { "X", "-600" }); this.m_selectTween = Tween.To(base.Camera, 0.3f, new Easing(Quad.EaseOut), new string[] { "X", (this.m_masterArray.Count * this.m_xPosOffset).ToString() }); } } base.HandleInput(); } }
public override void HandleInput() { if (!m_lockControls && (m_selectTween == null || (m_selectTween != null && !m_selectTween.Active))) { var selectedLineageObj = m_selectedLineageObj; var selectedLineageIndex = m_selectedLineageIndex; if (Game.GlobalInput.JustPressed(9) && SkillSystem.GetSkill(SkillType.Randomize_Children).ModifierAmount > 0f && !Game.PlayerStats.RerolledChildren) { m_lockControls = true; SoundManager.PlaySound("frame_woosh_01", "frame_woosh_02"); if (m_xShift != 0) { m_xShift = 0; Tween.By(m_descriptionPlate, 0.2f, Back.EaseOut, "delay", "0.2", "X", "-600"); m_selectTween = Tween.To(Camera, 0.3f, Quad.EaseOut, "delay", "0.2", "X", (m_masterArray.Count * m_xPosOffset).ToString()); } (ScreenManager as RCScreenManager).StartWipeTransition(); Tween.RunFunction(0.2f, this, "RerollCurrentBranch"); } if (Game.GlobalInput.Pressed(20) || Game.GlobalInput.Pressed(21)) { if (Camera.X > m_masterArray[0].X + 10f) { SoundManager.PlaySound("frame_swoosh_01"); m_selectTween = Tween.By(Camera, 0.3f, Quad.EaseOut, "X", (-m_xPosOffset).ToString()); if (m_xShift == 0) { Tween.By(m_descriptionPlate, 0.2f, Back.EaseIn, "X", "600"); } m_xShift--; } } else if ((Game.GlobalInput.Pressed(22) || Game.GlobalInput.Pressed(23)) && m_xShift < 0) { SoundManager.PlaySound("frame_swoosh_01"); m_selectTween = Tween.By(Camera, 0.3f, Quad.EaseOut, "X", m_xPosOffset.ToString()); m_xShift++; if (m_xShift == 0) { Tween.By(m_descriptionPlate, 0.2f, Back.EaseOut, "X", "-600"); } } if (m_xShift == 0) { if (Game.GlobalInput.JustPressed(16) || Game.GlobalInput.JustPressed(17)) { if (m_selectedLineageIndex > 0) { SoundManager.PlaySound("frame_swap"); } m_selectedLineageIndex--; if (m_selectedLineageIndex < 0) { m_selectedLineageIndex = 0; } if (m_selectedLineageIndex != selectedLineageIndex) { UpdateDescriptionPlate(); m_selectTween = Tween.By(m_currentBranchArray[0], 0.3f, Quad.EaseOut, "Y", "450"); Tween.By(m_currentBranchArray[1], 0.3f, Quad.EaseOut, "Y", "450"); Tween.By(m_currentBranchArray[2], 0.3f, Quad.EaseOut, "Y", "450"); } } else if (Game.GlobalInput.JustPressed(18) || Game.GlobalInput.JustPressed(19)) { if (m_selectedLineageIndex < m_currentBranchArray.Count - 1) { SoundManager.PlaySound("frame_swap"); } m_selectedLineageIndex++; if (m_selectedLineageIndex > m_currentBranchArray.Count - 1) { m_selectedLineageIndex = m_currentBranchArray.Count - 1; } if (m_selectedLineageIndex != selectedLineageIndex) { UpdateDescriptionPlate(); m_selectTween = Tween.By(m_currentBranchArray[0], 0.3f, Quad.EaseOut, "Y", "-450"); Tween.By(m_currentBranchArray[1], 0.3f, Quad.EaseOut, "Y", "-450"); Tween.By(m_currentBranchArray[2], 0.3f, Quad.EaseOut, "Y", "-450"); } } } m_selectedLineageObj = m_currentBranchArray[m_selectedLineageIndex]; if (Game.GlobalInput.JustPressed(0) || Game.GlobalInput.JustPressed(1)) { if (m_xShift == 0) { if (selectedLineageObj == m_selectedLineageObj) { var rCScreenManager = ScreenManager as RCScreenManager; rCScreenManager.DialogueScreen.SetDialogue("LineageChoiceWarning"); rCScreenManager.DialogueScreen.SetDialogueChoice("ConfirmTest1"); rCScreenManager.DialogueScreen.SetConfirmEndHandler(this, "StartGame"); rCScreenManager.DialogueScreen.SetCancelEndHandler(typeof(Console), "WriteLine", "Canceling Selection"); (ScreenManager as RCScreenManager).DisplayScreen(13, true); } } else { m_xShift = 0; SoundManager.PlaySound("frame_woosh_01", "frame_woosh_02"); Tween.By(m_descriptionPlate, 0.2f, Back.EaseOut, "X", "-600"); m_selectTween = Tween.To(Camera, 0.3f, Quad.EaseOut, "X", (m_masterArray.Count * m_xPosOffset).ToString()); } } base.HandleInput(); } }
public void LoadFamilyTreeData() { m_masterArray.Clear(); var num = 700; if (Game.PlayerStats.FamilyTreeArray != null && Game.PlayerStats.FamilyTreeArray.Count > 0) { var num2 = 0; using (var enumerator = Game.PlayerStats.FamilyTreeArray.GetEnumerator()) { while (enumerator.MoveNext()) { var current = enumerator.Current; var lineageObj = new LineageObj(this, true); lineageObj.IsDead = true; lineageObj.Age = current.Age; lineageObj.ChildAge = current.ChildAge; lineageObj.Class = current.Class; lineageObj.PlayerName = current.Name; lineageObj.IsFemale = current.IsFemale; lineageObj.SetPortrait(current.HeadPiece, current.ShoulderPiece, current.ChestPiece); lineageObj.NumEnemiesKilled = current.NumEnemiesBeaten; lineageObj.BeatenABoss = current.BeatenABoss; lineageObj.SetTraits(current.Traits); lineageObj.UpdateAge(num); lineageObj.UpdateData(); lineageObj.UpdateClassRank(); num += lineageObj.Age; lineageObj.X = num2; num2 += m_xPosOffset; m_masterArray.Add(lineageObj); if (lineageObj.Traits.X == 20f || lineageObj.Traits.Y == 20f) { lineageObj.FlipPortrait = true; } } return; } } var num3 = 0; var lineageObj2 = new LineageObj(this, true); lineageObj2.IsDead = true; lineageObj2.Age = 30; lineageObj2.ChildAge = 5; lineageObj2.Class = 0; lineageObj2.PlayerName = "Sir Johannes"; lineageObj2.SetPortrait(1, 1, 1); lineageObj2.NumEnemiesKilled = 50; lineageObj2.BeatenABoss = false; lineageObj2.UpdateAge(num); lineageObj2.UpdateData(); lineageObj2.UpdateClassRank(); num += lineageObj2.Age; lineageObj2.X = num3; num3 += m_xPosOffset; m_masterArray.Add(lineageObj2); if (lineageObj2.Traits.X == 20f || lineageObj2.Traits.Y == 20f) { lineageObj2.FlipPortrait = true; } }
private void CreateLineageObjDebug() { int num = 700; int num2 = 400; int num3 = 0; for (int i = 0; i < 10; i++) { FamilyTreeNode familyTreeNode; if (i > Game.PlayerStats.FamilyTreeArray.Count - 1) { familyTreeNode = new FamilyTreeNode { Age = (byte)CDGMath.RandomInt(15, 30), ChildAge = (byte)CDGMath.RandomInt(15, 30), Name = Game.NameArray[CDGMath.RandomInt(0, Game.NameArray.Count - 1)], HeadPiece = (byte)CDGMath.RandomInt(1, 5), ShoulderPiece = (byte)CDGMath.RandomInt(1, 5), ChestPiece = (byte)CDGMath.RandomInt(1, 5) }; } else { familyTreeNode = Game.PlayerStats.FamilyTreeArray[i]; } LineageObj lineageObj = new LineageObj(null, true); lineageObj.IsDead = true; lineageObj.Age = familyTreeNode.Age; lineageObj.ChildAge = familyTreeNode.ChildAge; lineageObj.Class = familyTreeNode.Class; lineageObj.PlayerName = familyTreeNode.Name; lineageObj.IsFemale = familyTreeNode.IsFemale; lineageObj.SetPortrait(familyTreeNode.HeadPiece, familyTreeNode.ShoulderPiece, familyTreeNode.ChestPiece); lineageObj.NumEnemiesKilled = familyTreeNode.NumEnemiesBeaten; lineageObj.BeatenABoss = familyTreeNode.BeatenABoss; lineageObj.SetTraits(familyTreeNode.Traits); lineageObj.UpdateAge(num); lineageObj.UpdateData(); lineageObj.UpdateClassRank(); num += (int)lineageObj.Age; lineageObj.X = (float)num3; num3 += num2; this.m_lineageArray.Add(lineageObj); } }
public override void Dispose() { if (!base.IsDisposed) { Console.WriteLine("Disposing Game Over Screen"); this.m_player = null; this.m_dialoguePlate.Dispose(); this.m_dialoguePlate = null; this.m_continueText.Dispose(); this.m_continueText = null; this.m_playerGhost.Dispose(); this.m_playerGhost = null; this.m_spotlight.Dispose(); this.m_spotlight = null; this.m_playerFallSound.Dispose(); this.m_playerFallSound = null; this.m_playerSwordFallSound.Dispose(); this.m_playerSwordFallSound = null; this.m_playerSwordSpinSound.Dispose(); this.m_playerSwordSpinSound = null; this.m_objKilledPlayer = null; if (this.m_enemyList != null) { this.m_enemyList.Clear(); } this.m_enemyList = null; if (this.m_enemyStoredPositions != null) { this.m_enemyStoredPositions.Clear(); } this.m_enemyStoredPositions = null; this.m_playerFrame.Dispose(); this.m_playerFrame = null; base.Dispose(); } }
public override void LoadContent() { this.m_continueText = new KeyIconTextObj(Game.JunicodeFont); this.m_continueText.FontSize = 14f; this.m_continueText.Align = Types.TextAlign.Right; this.m_continueText.Opacity = 0f; this.m_continueText.Position = new Vector2(1270f, 30f); this.m_continueText.ForceDraw = true; Vector2 dropShadow = new Vector2(2f, 2f); Color textureColor = new Color(255, 254, 128); this.m_dialoguePlate = new ObjContainer("DialogBox_Character"); this.m_dialoguePlate.Position = new Vector2(660f, 610f); this.m_dialoguePlate.ForceDraw = true; TextObj textObj = new TextObj(Game.JunicodeFont); textObj.Align = Types.TextAlign.Centre; textObj.Text = "Your valor shown in battle shall never be forgotten."; textObj.FontSize = 17f; textObj.DropShadow = dropShadow; textObj.Position = new Vector2(0f, (float)(-(float)this.m_dialoguePlate.Height / 2 + 25)); this.m_dialoguePlate.AddChild(textObj); KeyIconTextObj keyIconTextObj = new KeyIconTextObj(Game.JunicodeFont); keyIconTextObj.FontSize = 12f; keyIconTextObj.Align = Types.TextAlign.Centre; keyIconTextObj.Text = "\"Arrrrggghhhh\""; keyIconTextObj.DropShadow = dropShadow; keyIconTextObj.Y = 0f; keyIconTextObj.TextureColor = textureColor; this.m_dialoguePlate.AddChild(keyIconTextObj); TextObj textObj2 = new TextObj(Game.JunicodeFont); textObj2.FontSize = 8f; textObj2.Text = "-Player X's parting words"; textObj2.Y = keyIconTextObj.Y; textObj2.Y += 40f; textObj2.X += 20f; textObj2.DropShadow = dropShadow; this.m_dialoguePlate.AddChild(textObj2); this.m_playerGhost = new SpriteObj("PlayerGhost_Sprite"); this.m_playerGhost.AnimationDelay = 0.1f; this.m_spotlight = new SpriteObj("GameOverSpotlight_Sprite"); this.m_spotlight.Rotation = 90f; this.m_spotlight.ForceDraw = true; this.m_spotlight.Position = new Vector2(660f, (float)(40 + this.m_spotlight.Height)); this.m_playerFrame = new LineageObj(null, true); this.m_playerFrame.DisablePlaque = true; base.LoadContent(); }
private void AddLineageRow(int numLineages, Vector2 position, bool createEmpty, bool randomizePortrait) { if (this.m_selectedLineageObj != null) { this.m_selectedLineageObj.ForceDraw = false; this.m_selectedLineageObj.Y = 0f; } this.m_currentPoint = position; this.m_currentBranchArray.Clear(); int[] array = new int[] { -450, 0, 450 }; int[] array2 = new int[] { -200, 200 }; for (int i = 0; i < numLineages; i++) { LineageObj lineageObj = new LineageObj(this, createEmpty); if (randomizePortrait) { lineageObj.RandomizePortrait(); } lineageObj.ForceDraw = true; lineageObj.X = position.X + (float)this.m_xPosOffset; int[] array3 = array; if (numLineages == 2) { array3 = array2; } lineageObj.Y = (float)array3[i]; this.m_currentBranchArray.Add(lineageObj); if (lineageObj.Traits.X == 20f || lineageObj.Traits.Y == 20f) { lineageObj.FlipPortrait = true; } } this.m_currentPoint = this.m_currentBranchArray[1].Position; base.Camera.Position = this.m_currentPoint; this.m_selectedLineageObj = this.m_currentBranchArray[1]; this.m_selectedLineageIndex = 1; }
private void CreateLineageObjs() { int num = 700; int num2 = 400; int num3 = 0; if (Game.PlayerStats.FamilyTreeArray.Count > 10) { for (int i = 0; i < 10; i++) { FamilyTreeNode familyTreeNode = Game.PlayerStats.FamilyTreeArray[i]; LineageObj lineageObj = new LineageObj(null, true); lineageObj.IsDead = true; lineageObj.Age = familyTreeNode.Age; lineageObj.ChildAge = familyTreeNode.ChildAge; lineageObj.Class = familyTreeNode.Class; lineageObj.PlayerName = familyTreeNode.Name; lineageObj.IsFemale = familyTreeNode.IsFemale; lineageObj.SetPortrait(familyTreeNode.HeadPiece, familyTreeNode.ShoulderPiece, familyTreeNode.ChestPiece); lineageObj.NumEnemiesKilled = familyTreeNode.NumEnemiesBeaten; lineageObj.BeatenABoss = familyTreeNode.BeatenABoss; lineageObj.SetTraits(familyTreeNode.Traits); lineageObj.UpdateAge(num); lineageObj.UpdateData(); lineageObj.UpdateClassRank(); num += (int)lineageObj.Age; lineageObj.X = (float)num3; num3 += num2; this.m_lineageArray.Add(lineageObj); } return; } foreach (FamilyTreeNode current in Game.PlayerStats.FamilyTreeArray) { LineageObj lineageObj2 = new LineageObj(null, true); lineageObj2.IsDead = true; lineageObj2.Age = current.Age; lineageObj2.ChildAge = current.ChildAge; lineageObj2.Class = current.Class; lineageObj2.PlayerName = current.Name; lineageObj2.IsFemale = current.IsFemale; lineageObj2.SetPortrait(current.HeadPiece, current.ShoulderPiece, current.ChestPiece); lineageObj2.NumEnemiesKilled = current.NumEnemiesBeaten; lineageObj2.BeatenABoss = current.BeatenABoss; lineageObj2.SetTraits(current.Traits); lineageObj2.UpdateAge(num); lineageObj2.UpdateData(); lineageObj2.UpdateClassRank(); num += (int)lineageObj2.Age; lineageObj2.X = (float)num3; num3 += num2; this.m_lineageArray.Add(lineageObj2); } }