public void DrawCrosshair() { float crosshairscaled = camera.Scale(crosshairsize, crosshair.Width); var mousepos = Mouse.GetState(); Vector2 _mousepos = new Vector2(mousepos.X, mousepos.Y); Vector2 pos = camera.Centercursortexture(crosshair, _mousepos, crosshairscaled); spritebatch.Draw(crosshair, pos, null, Color.White, 0, Vector2.Zero, crosshairscaled, SpriteEffects.None, 1f); }
public void Draw(float timeElapsed) { fade -= timeElapsed / maxtime; timealive += timeElapsed; lifepercent = timealive / maxtime; currentsize = shockwaveminsize + lifepercent * shockwavemaxsize; scale = camera.Scale(currentsize, shockwavetexture.Width); Color color = new Color(fade, fade, fade, fade); centertexture = new Vector2(shockwavetexture.Width / 2, shockwavetexture.Height / 2); spritebatch.Draw(shockwavetexture, camera.Converttovisualcoords(currentPos, scale), null, color, 0, centertexture, scale, SpriteEffects.None, 0.9f); }
public void Draw(SpriteBatch spritebatch, Camera camera) { float scale = camera.Scale(particlesize,smokecloud.Width); spritebatch.Draw(smokecloud, camera.Converttovisualcoords(currentpos, scale), null, color, rotation, randomdirection, scale, SpriteEffects.None, 0.8f); }
public void Draw(SpriteBatch spritebatch, Camera camera) { float scale = camera.Scale(particlesize, smokecloud.Width); spritebatch.Draw(smokecloud, camera.Converttovisualcoords(currentpos, scale), null, color, rotation, randomdirection, scale, SpriteEffects.None, 0.8f); }
public void Draw() { float scale = camera.Scale(particlesize, spark.Width); spritebatch.Draw(spark, camera.Converttovisualcoords(startpos, scale), null, color, 0, randomdirection, scale, SpriteEffects.None, 0.7f); }