public override void Draw(UberSpriteBatch spriteBatch, GameTime gameTime) { Rectangle source = new Rectangle((int)Owner.TextureSize.X * Owner.Step, (int)Owner.TextureSize.Y * (int)Owner.Direction, (int)Owner.TextureSize.X, (int)Owner.TextureSize.Y); if (IsActivated) { spriteBatch.Draw(Owner.Texture, position, source, Color.FromNonPremultiplied(255, 255, 255, 128)); } }
public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch) { spriteBatch.BeginCam(camera); MapFirst.Draw(spriteBatch, true); if (isShown) { if (Player.pos.X >= 0 && Player.pos.Y >= 0) { spriteBatch.Draw(TexturesManager.Tile, Player.pos); } } foreach (Monster entity in Entities.OfType <Monster>()) { entity.Draw(gameTime, spriteBatch); } Player.Draw(gameTime, spriteBatch); MapFirst.Draw(spriteBatch, false); foreach (WorldEffect worldEffect in WorldEffects) { worldEffect.Draw(gameTime, spriteBatch); } if (gameTime.TotalGameTime.TotalMilliseconds % 10000 < 10) { i = RandomManager.Next(0, 2); } Temps.Pluie(spriteBatch, gameTime, MapFirst.Data, i == 1 ? false : true); Temps.Neige(spriteBatch, gameTime, MapFirst.Data, i == 2 ? false : true); spriteBatch.End(); spriteBatch.Begin(); MainGame.cursor.Draw(spriteBatch); foreach (Entity entity in Entities) { entity.DrawUI(gameTime, spriteBatch); } Player.DrawUI(gameTime, spriteBatch); foreach (Window win in Windows) { win.Draw(gameTime, spriteBatch); } if (isShown) { DrawInfo(gameTime, spriteBatch, Color.White); } spriteBatch.End(); }
public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch) { InternalDraw(spriteBatch, Targeter == null ? Color.White : Color.SkyBlue); // Draw le monstre et change la couleur de la cible if (Targeter == null && !KeyboardManager.IsDown(KeyboardManager.BindedKeys[(int)KeyboardManager.KeysEnum.ShowLife])) { return; } Vector2 position = Position - new Vector2(0, TexturesManager.Life.Height); int size = (int)Life * (int)TextureSize.X / LifeMax; for (int i = 0; i < size; i++) { spriteBatch.Draw(TexturesManager.Life, position + new Vector2(i, 0), Color.White); } for (int i = size; i < (int)TextureSize.X; i++) { spriteBatch.Draw(TexturesManager.Life, position + new Vector2(i, 0), Color.Gray); } }
public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch) { spriteBatch.Begin(); spriteBatch.Draw(TexturesManager.BackgroundMenu, new Rectangle(0, 0, MainGame.ScreenX, MainGame.ScreenY)); spriteBatch.DrawUI(TexturesManager.Title, "Wrath of the Rack Ninja", new Vector2(MainGame.ScreenX / 2, MainGame.ScreenY / 2 - 300), Color.Red); startButton.Draw(gameTime, spriteBatch); optionButton.Draw(gameTime, spriteBatch); storyButton.Draw(gameTime, spriteBatch); exitButton.Draw(gameTime, spriteBatch); spriteBatch.End(); }
private static void DrawTile(UberSpriteBatch spriteBatch, int tileId, int x, int y) { if (tileId < 0) { return; } int tileX = tileId % 8; int tileY = (int)Math.Floor(tileId / 8.0); Rectangle dest = new Rectangle(x * TileSize, y * TileSize, TileSize, TileSize); Rectangle src = new Rectangle(tileX * TileSize, tileY * TileSize, TileSize, TileSize); spriteBatch.Draw(TexturesManager.MapTiles, dest, src); }
public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch) { spriteBatch.Begin(); spriteBatch.Draw(TexturesManager.MultiMenu, new Rectangle(0, 0, MainGame.ScreenX, MainGame.ScreenY)); spriteBatch.DrawUI(TexturesManager.Title, "Wrath of the Rack Ninja", new Vector2(MainGame.ScreenX / 2, MainGame.ScreenY / 2 - 300), Color.Red); spriteBatch.DrawUI(TexturesManager.Title, "Multijoueurs", new Vector2(100, MainGame.ScreenY / 2 - 300), Color.Red); backStartButton.Draw(gameTime, spriteBatch); localButton.Draw(gameTime, spriteBatch); foreach (Window win in Windows) { win.Draw(gameTime, spriteBatch); } spriteBatch.End(); }
public override void Draw(GameTime gameTime, UberSpriteBatch spriteBatch) { spriteBatch.Begin(); spriteBatch.Draw(videoPlayer.GetTexture(), new Rectangle(0, 0, MainGame.ScreenX, MainGame.ScreenY)); spriteBatch.End(); }
public void Draw(UberSpriteBatch sprite_batch) { sprite_batch.Draw(texture, position); }
protected void InternalDraw(UberSpriteBatch spriteBatch, Color color) { Rectangle source = new Rectangle((int)TextureSize.X * Step, (int)TextureSize.Y * (int)Direction, (int)TextureSize.X, (int)TextureSize.Y); spriteBatch.Draw(Texture, Position, source, color); }
public void InternalDraw(UberSpriteBatch spriteBatch, Color color) { Rectangle source = new Rectangle((int)textureSize.X * step, (int)textureSize.Y, (int)textureSize.X, (int)textureSize.Y); spriteBatch.Draw(effect, GameScreen.Camera.MapLocation(position), source, color); }
public void InternalDraw(UberSpriteBatch spriteBatch, Color color) { Rectangle source = new Rectangle((int)textureSize.X * step, (int)textureSize.Y, (int)textureSize.X, (int)textureSize.Y); spriteBatch.Draw(effect, position, source, color); }
public static void Draw(UberSpriteBatch spriteBatch) { spriteBatch.Begin(); spriteBatch.Draw(CurrentTexture, Position); spriteBatch.End(); }