public void Draw() { DrawGround(); DrawItems(); StairsDown.Draw(this); int i = 0; foreach (Monster monster in _monsters) { monster.Draw(this); if (IsInFov(monster.X, monster.Y)) { monster.DrawStats(Game.MonsterStat, Game.MonsterItem); i++; } } StairsUp.Draw(this); Player player = Game.Player; player.DrawStats(); player.DrawInventoryE(); player.DrawInventoryA(); player.DrawInventoryI(); }
public void Draw() { //mapConsole.Clear(); foreach (RogueSharp.Cell cell in GetAllCells()) { SetConsoleSymbolForCell(cell); } foreach (Door door in Doors) { door.Draw(this); } StairsUp.Draw(this); StairsDown.Draw(this); foreach (TreasurePile treasurePile in _treasurePiles) { IDrawable drawableTreasure = treasurePile.Treasure as IDrawable; if (drawableTreasure != null) { drawableTreasure.Draw(this); } } //statConsole.Clear(); int i = 0; foreach (Monster monster in _monsters) { monster.Draw(this); if (IsInFov(monster.X, monster.Y)) { monster.DrawStats(Game.MonsterStat, Game.MonsterItem); i++; } } Player player = Game.Player; player.Draw(this); player.DrawStats(); player.DrawInventoryE(); player.DrawInventoryA(); player.DrawInventoryI(); }
/* public void ChangeGameState(GameState state) * { * * * } * public enum GameState { START, PLAY, END }*/ /// <summary> /// This is called when the game should draw itself. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Draw(GameTime gameTime) { Matrix camera1 = camera.GetTransform(); GraphicsDevice.Clear(Color.CornflowerBlue); screenScale = camera.GetScreenScale(graphicsDevice); spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.NonPremultiplied, null, null, null, null, camera1 * Matrix.CreateScale(screenScale)); spikesTrap.Draw(spriteBatch); spriteBatch.Draw(ecirBarLife, ecir.BarLifeEcir(), Color.Red); if (zombie != null) { spriteBatch.Draw(zombieBarLife, zombie.ZombieBarLife(), zombie.ColorBar()); //se o zombie não for destruido desanha a bar life } terrain1.Draw(spriteBatch); spikesTrap.Draw(spriteBatch); hollowKnight.Draw(spriteBatch); stairs.Draw(spriteBatch); ogre.Draw(spriteBatch); if (!ecir.EcirDestroy()) { spriteBatch.Draw(ecir.Texture, ecir.Rectangle, ecir.EcirColor()); } // if(zombie!=null)if (!zombie.DestroyZombie()) spriteBatch.Draw(zombie.Texture, zombie.Rectangle, zombie.ZombieColor()); else { zombie = null; }// se o zombie não for destruido e levar dano muda de cor quando a vida chagar a 0 é destruido if (zombie != null) { if (!zombie.DestroyZombie()) { spriteBatch.Draw(zombie.Texture, zombie.Rectangle, null, zombie.ZombieColor(), 0, new Vector2(zombie.Rectangle.Width / 2, zombie.Rectangle.Height / 2), zombie.SpriteEffect, 0f); } } skeleton.Draw(spriteBatch); fireBall.Draw(spriteBatch); if (pause == true) { MenuPause.Draw(spriteBatch); } spriteBatch.End(); // TODO: Add your drawing code here base.Draw(gameTime); }
private void DrawLevelState(GameTime gameTime) { mainGame.GraphicsDevice.Clear(Color.White); spriteBatch.Begin(); board.Draw(spriteBatch); stairs.Draw(spriteBatch); if (!fatBossZombie.eatingDarwin) { darwin.Draw(spriteBatch); } zTime.Draw(spriteBatch); nurseryOne.Draw(spriteBatch); nurseryTwo.Draw(spriteBatch); if (fatBossZombie.isZombieAlive()) { fatBossZombie.Draw(spriteBatch); } foreach (BasicObject a in walls) { spriteBatch.Draw(wallTex, board.getPosition(a.X, a.Y), Color.White); } if (messageMode) { } spriteBatch.DrawString(messageFont, "HUMANITY: ", new Vector2(board.getPosition(zTime.X, zTime.Y).X + board.getSquareWidth() * 3 / 2, board.getPosition(zTime.X, 24).Y), Color.Black); spriteBatch.DrawString(messageFont, "DEATH COUNT: " + mainGame.DEATH_COUNTER.ToString(), new Vector2(board.getPosition(23, 24).X, board.getPosition(23, 24).Y), Color.Black); spriteBatch.End(); }
private void DrawLevelState(GameTime gameTime) { mainGame.GraphicsDevice.Clear(Color.White); spriteBatch.Begin(); board.Draw(spriteBatch); pattern.Draw(spriteBatch); foreach (Vortex v in vortexes) { v.Draw(spriteBatch); } darwin.Draw(spriteBatch); zTime.Draw(spriteBatch); potion.Draw(spriteBatch); snake.Draw(spriteBatch); snake2.Draw(spriteBatch); snake3.Draw(spriteBatch); snake4.Draw(spriteBatch); northZombie.Draw(spriteBatch); southZombie.Draw(spriteBatch); eastZombie.Draw(spriteBatch); westZombie.Draw(spriteBatch); foreach (Flame flame in flames) { flame.Draw(spriteBatch, mainGame.Content.Load <Texture2D>("flame")); } if (messageMode) { zombieMessage.Draw(spriteBatch, messageFont); darwinMessage.Draw(spriteBatch, messageFont); } foreach (BasicObject a in walls) { spriteBatch.Draw(wallTex, board.getPosition(a.X, a.Y), Color.White); } foreach (Box b in boxes) { b.Draw(spriteBatch); } // only show the stairs after the pattern is complete if (pattern.isComplete(board, boxes)) { if (pattern.shouldSparkle()) { //PUT THE SOUND HERE if (playSound) { revealStairsSound.Play(); playSound = false; } Console.Out.WriteLine("here"); stairs.Draw(spriteBatch); Rectangle rect = stairs.destination; Rectangle source = new Rectangle(0, 0, 100, 100); if (pattern.getSparkleCount() >= 0 && pattern.getSparkleCount() < 25) { rect.Height = 100; rect.Width = 100; rect.X -= 30; rect.Y -= 50; spriteBatch.Draw(sparkleTex, rect, source, Color.White); } else if (pattern.getSparkleCount() >= 25 && pattern.getSparkleCount() < 50) { rect.Height = 100; rect.Width = 100; rect.X -= 30; rect.Y -= 50; source.X = 100; spriteBatch.Draw(sparkleTex, rect, source, Color.White); } else if (pattern.getSparkleCount() >= 50) { rect.Height = 100; rect.Width = 100; rect.X -= 30; rect.Y -= 50; source.X = 200; spriteBatch.Draw(sparkleTex, rect, source, Color.White); } } else { stairs.Draw(spriteBatch); } } spriteBatch.DrawString(messageFont, "HUMANITY: ", new Vector2(board.getPosition(zTime.X, zTime.Y).X + board.getSquareWidth() * 3 / 2, board.getPosition(zTime.X, 24).Y), Color.Black); spriteBatch.DrawString(messageFont, "DEATH COUNT: " + mainGame.DEATH_COUNTER.ToString(), new Vector2(board.getPosition(23, 24).X, board.getPosition(23, 24).Y), Color.Black); spriteBatch.End(); }