public override void Draw()
{
hpBar.Draw();
fBar.Draw();
if (hasUsedJetPack)
{
hasUsedJetPack = false;
for (int x = 0; x < 2; x++)
Drawer.Draw(
TextureStatic.Get("jetpackFlame"),
body.Position,
drawRectangle,
Color.White,
body.Rotation,
drawOrigin,
1f,
SpriteEffects.None,
.7f);
}
else
{
if(!hasJetpack)
Drawer.Draw(
TextureStatic.Get("solitudePlayer"),
body.Position,//new Vector2(body.Position.X - width / 2, body.Position.Y - height / 2),
drawRectangle,
Color.White,
body.Rotation,
drawOrigin,//TextureStatic.GetOrigin("solitudePlayer"),
1,
SpriteEffects.None,
.8f);
else
Drawer.Draw(
TextureStatic.Get("solitudePlayerJetpack"),
body.Position,//new Vector2(body.Position.X - width / 2, body.Position.Y - height / 2),
drawRectangle,
Color.White,
body.Rotation,
drawOrigin,//TextureStatic.GetOrigin("solitudePlayer"),
1,
SpriteEffects.None,
.8f);
}
for (int x = 0; x < lives; x++)
{
placeholderVector = new Vector2(1700 - x * 30, 137);
placeholderRectangle = new Rectangle(0, 0, ((int) width) / 2, ((int) height) / 2);
Drawer.Draw(
TextureStatic.Get("playerLives"),
placeholderVector,//new Vector2(body.Position.X - width / 2, body.Position.Y - height / 2),
placeholderRectangle,
Color.White,
0,
drawOrigin,//TextureStatic.GetOrigin("solitudePlayer"),
1,
SpriteEffects.None,
.9f);
}
//draw the arrow
if (jumpCounter > 0)
{
arrowColor = new Color(255, 255 - jumpCounter * 2, 0);
arrowbodyRectangle = new Rectangle(
0,
0,
7,
jumpCounter);
Drawer.Draw(
TextureStatic.Get("arrow-body"),
arrowbodyPosition,
arrowbodyRectangle,
arrowColor,
(float)Math.PI + rotation,
arrowbodyOrigin,
1,
SpriteEffects.None,
1f);
Drawer.Draw(
TextureStatic.Get("arrow"),
arrowheadPosition,
arrowheadRectangle,
arrowColor,
rotation,
arrowheadOrigin,
1,
SpriteEffects.None,
1f);
}
}