Exemplo n.º 1
0
	public final void DrawMouseOver(SpriteBatch batch) {
		this.pathVisibleTime = 0.8f;
		batch.draw(this.gameContent.mouseOver,
				this.position.sub(this.gameContent.mouseOverOrigin),
				LColor.gold);
		batch.flush();
	}
Exemplo n.º 2
0
	public final void Draw(GameTime gameTime, SpriteBatch batch) {
		for (Bullet bullet : this.bullets) {
			bullet.Draw(batch);
		}
		if (!this.isAlive()) {
			this.removeTime = Math.max(
					(this.removeTime - gameTime.getElapsedGameTime()), 0f);
		}

		LColor colour = LColor.white;
		this.animationPlayer
				.Draw(gameTime,
						batch,
						this.position,
						colour,
						0f,
						(Math.abs(this.rotation) > 1.570796f) ? SpriteEffects.FlipHorizontally
								: SpriteEffects.None);
		batch.draw(
				this.gameContent.weapon[(int) this.rank.getValue()],
				this.position,
				null,
				colour,
				MathUtils.radToDeg(this.rotation),
				15,
				15,
				1f,
				(Math.abs(this.rotation) > 1.570796f) ? SpriteEffects.FlipVertically
						: SpriteEffects.None);
		if (this.isAlive()) {
			batch.draw(this.gameContent.healthBar, this.position.sub(
					(this.gameContent.healthBar.getWidth() / 2), 20f),
					LColor.white);
			rect.setBounds(
					0,
					0,
					(int) ((this.health / this.MaxHealth) * this.gameContent.healthBar
							.getWidth()), this.gameContent.healthBar
							.getHeight());
			batch.draw(this.gameContent.healthBar, this.position.sub(
					(this.gameContent.healthBar.getWidth() / 2), 20f), rect,
					LColor.red);
			batch.flush();
		}
	}