private void PrintMonsters(CastleConsole castleConsole) { Print(1, 11, "You have killed these Monsters......", Color.White); scoringMonsters = new Collection <Monster>(); foreach (Monster monster in castleConsole.ItemManager.CastleMonsters) { if (monster.IsAlive == false) { if (monster.Value > 0) { scoringMonsters.Add(monster); } } } if (scoringMonsters.Count == 0) { Print(17, 13, "NONE", Color.White); } else { int xPoint = 19; xPoint = xPoint -= scoringMonsters.Count; foreach (var item in this.scoringMonsters) { SetGlyph(xPoint, 13, item.Character, Color.White); xPoint += 2; } } }
private void PrintMonsters(CastleConsole castleConsole) { this.CellData.Print(1, 11, CastleAdventureResources.KilledMonsters, CastleGame.GameColor); scoringMonsters = new Collection <Monster>(); foreach (Monster monster in castleConsole.ItemManager.CastleMonsters) { if (monster.IsAlive == false) { if (monster.Value > 0) { scoringMonsters.Add(monster); } } } if (scoringMonsters.Count == 0) { this.CellData.Print(17, 13, CastleAdventureResources.None, CastleGame.GameColor); } else { int xPoint = 19; xPoint = xPoint -= scoringMonsters.Count; foreach (var item in this.scoringMonsters) { this.CellData.SetCharacter(xPoint, 13, item.Character, CastleGame.GameColor); xPoint += 2; } } }
private void PrintTreasures(CastleConsole castleConsole) { Print(1, 5, "You have collected these Treasues...", Color.White); scoringItems = new Collection <CastleItem>(); foreach (var item in castleConsole.ItemManager.CastleItems) { if (item.Collected) { if (item.Value > 0) { scoringItems.Add(item); } } } if (scoringItems.Count == 0) { Print(17, 7, "NONE", Color.White); } else { int xPoint = 19; xPoint = xPoint -= scoringItems.Count; foreach (var item in this.scoringItems) { SetGlyph(xPoint, 7, item.Character, Color.White); xPoint += 2; } } }
private void PrintTreasures(CastleConsole castleConsole) { this.CellData.Print(1, 5, CastleAdventureResources.CollectedTreasures, CastleGame.GameColor); scoringItems = new Collection <CastleItem>(); foreach (var item in castleConsole.ItemManager.CastleItems) { if (item.Collected) { if (item.Value > 0) { scoringItems.Add(item); } } } if (scoringItems.Count == 0) { this.CellData.Print(17, 7, CastleAdventureResources.None, CastleGame.GameColor); } else { int xPoint = 19; xPoint = xPoint -= scoringItems.Count; foreach (var item in this.scoringItems) { this.CellData.SetCharacter(xPoint, 7, item.Character, CastleGame.GameColor); xPoint += 2; } } }
private void PrintTreasures(CastleConsole castleConsole) { this.CellData.Print(1, 5, "You have collected these Treasues...", Color.White); scoringItems = new Collection<CastleItem>(); foreach(var item in castleConsole.ItemManager.CastleItems) { if(item.Collected) { if(item.Value > 0) { scoringItems.Add(item); } } } if(scoringItems.Count == 0) { this.CellData.Print(17, 7, "NONE", Color.White); } else { int xPoint = 19; xPoint = xPoint -= scoringItems.Count; foreach (var item in this.scoringItems) { this.CellData.SetCharacter(xPoint, 7, item.Character, Color.White); xPoint += 2; } } }
private static void RestartGame(object sender, EventArgs args) { castleConsole = new CastleConsole(); castleConsole.StopGamePlay += ProcessGameOver; SadConsole.Global.CurrentScreen = castleConsole; SadConsole.Global.FocusedConsoles.Set(castleConsole); }
private void StartGame(object sender, EventArgs args) { SadConsole.Engine.ConsoleRenderStack[0].IsVisible = false; SadConsole.Engine.ConsoleRenderStack.Remove(gameMenuConsole); castleConsole = new CastleConsole(); castleConsole.StopGamePlay += ProcessGameOver; SadConsole.Engine.ConsoleRenderStack.Add(castleConsole); SadConsole.Engine.ConsoleRenderStack[0].IsVisible = true; SadConsole.Engine.ActiveConsole = SadConsole.Engine.ConsoleRenderStack[0]; }
public GameScoreConsole(CastleConsole castleConsole) : base(40, 25) { if (castleConsole.GameResult == GameResult.Win) { win = true; } else { win = false; } releaseCount = 2; playAgain = false; PrintResult(castleConsole.GameResult); PrintTreasures(castleConsole); PrintMonsters(castleConsole); PrintScore(); Print(11, 24, "- Press any key -", Color.White); }
public GameScoreConsole(CastleConsole castleConsole) : base(40, 25) { if (castleConsole.GameResult == GameResult.Win) { win = true; } else { win = false; } releaseCount = 2; playAgain = false; PrintResult(castleConsole.GameResult); PrintTreasures(castleConsole); PrintMonsters(castleConsole); PrintScore(); this.CellData.Print(11, 24, CastleAdventureResources.PressAnyKey2, CastleGame.GameColor); }
public GameScoreConsole(CastleConsole castleConsole) : base(40, 25) { if(castleConsole.GameResult == GameResult.Win) { win = true; } else { win = false; } releaseCount = 2; playAgain = false; PrintResult(castleConsole.GameResult); PrintTreasures(castleConsole); PrintMonsters(castleConsole); PrintScore(); this.CellData.Print(11, 24, "- Press any key -", Color.White); }
private void RestartGame(object sender, EventArgs args) { SadConsole.Engine.ConsoleRenderStack[0].IsVisible = false; SadConsole.Engine.ConsoleRenderStack.Remove(gameScoreConsole); castleConsole = new CastleConsole(); castleConsole.StopGamePlay += ProcessGameOver; SadConsole.Engine.ConsoleRenderStack.Add(castleConsole); SadConsole.Engine.ConsoleRenderStack[0].IsVisible = true; SadConsole.Engine.ActiveConsole = SadConsole.Engine.ConsoleRenderStack[0]; }
private void PrintMonsters(CastleConsole castleConsole) { this.CellData.Print(1, 11, "You have killed these Monsters......", Color.White); scoringMonsters = new Collection<Monster>(); foreach(Monster monster in castleConsole.ItemManager.CastleMonsters) { if(monster.IsAlive == false) { if(monster.Value > 0) { scoringMonsters.Add(monster); } } } if (scoringMonsters.Count == 0) { this.CellData.Print(17, 13, "NONE", Color.White); } else { int xPoint = 19; xPoint = xPoint -= scoringMonsters.Count; foreach (var item in this.scoringMonsters) { this.CellData.SetCharacter(xPoint, 13, item.Character, Color.White); xPoint += 2; } } }