public override void Draw(GraphicsDevice graphics) { int drawX = (int)Math.Round(position.X) - game.IntCameraX; int drawY = (int)Math.Round(position.Y) - game.IntCameraY; graphics.DrawImageRotate(GameImage.PlayerBullet, 32, 32, 1, animation, drawX, drawY, 28, 16, (int)Math.Round(direction)); }
public override void Draw(GraphicsDevice graphics) { int drawX = (int)Math.Round(position.X) - game.IntCameraX; int drawY = (int)Math.Round(position.Y) - game.IntCameraY; graphics.DrawImageRotate(GameImage.PlayerBullet, 32, 32, 1, animation, drawX, drawY, 28, 16, (int)Math.Round(direction)); }
public override void Draw(GraphicsDevice graphics) { int drawX = (int)Math.Round(position.X) - game.IntCameraX; int drawY = (int)Math.Round(position.Y) - game.IntCameraY; int textureCol = animation / 2; switch (currentState) { case State.Rise: if (direction == Direction.Left) { graphics.DrawImageFix(GameImage.Mushroom, 32, 32, 0, textureCol, drawX, drawY, this); } else { graphics.DrawImageFixFlip(GameImage.Mushroom, 32, 32, 0, textureCol, drawX, drawY, this); } break; case State.Wait: if (direction == Direction.Left) { graphics.DrawImageFix(GameImage.Mushroom, 32, 32, 0, 7, drawX, drawY, this); } else { graphics.DrawImageFixFlip(GameImage.Mushroom, 32, 32, 0, 7, drawX, drawY, this); } break; case State.Attack: graphics.DrawImageRotate(GameImage.Mushroom, 32, 32, 1, textureCol, drawX + 16, drawY + 16, 16, 16, (int)Math.Round(angle)); break; } }
public override void Draw(GraphicsDevice graphics) { int drawX = (int)Math.Round(position.X) - game.IntCameraX; int drawY = (int)Math.Round(position.Y) - game.IntCameraY; int textureCol = animation / 2; switch (currentState) { case State.Rise: if (direction == Direction.Left) { graphics.DrawImageFix(GameImage.Mushroom, 32, 32, 0, textureCol, drawX, drawY, this); } else { graphics.DrawImageFixFlip(GameImage.Mushroom, 32, 32, 0, textureCol, drawX, drawY, this); } break; case State.Wait: if (direction == Direction.Left) { graphics.DrawImageFix(GameImage.Mushroom, 32, 32, 0, 7, drawX, drawY, this); } else { graphics.DrawImageFixFlip(GameImage.Mushroom, 32, 32, 0, 7, drawX, drawY, this); } break; case State.Attack: graphics.DrawImageRotate(GameImage.Mushroom, 32, 32, 1, textureCol, drawX + 16, drawY + 16, 16, 16, (int)Math.Round(angle)); break; } }