public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) { effect.VertexColorEnabled = true; for (int i = 1; i < ProjectileID.Sets.TrailCacheLength[projectile.type]; i++) { Vector2 newCenter = projectile.oldPos[i] + projectile.Size / 2; float lerpamount = 0.5f + (i / (float)(ProjectileID.Sets.TrailCacheLength[projectile.type] * 2)); float scale = (ProjectileID.Sets.TrailCacheLength[projectile.type] - i) / (float)ProjectileID.Sets.TrailCacheLength[projectile.type]; spriteBatch.Draw(mod.GetTexture("Extras/StardustPillarStar"), newCenter - Main.screenPosition, null, Color.Lerp(SpiritMod.StarjinxColor(Main.GlobalTime * 4 + i), Color.Transparent, lerpamount) * projectile.Opacity, 0, new Vector2(36, 36), scale * ((float)Math.Sin(projectile.timeLeft / 14) / 8 + 1) * 0.4f, SpriteEffects.None, 0); } spriteBatch.Draw(mod.GetTexture("Extras/StardustPillarStar"), projectile.Center - Main.screenPosition, null, Color.Lerp(SpiritMod.StarjinxColor(Main.GlobalTime * 4), Color.Transparent, 0.75f) * projectile.Opacity, 0, new Vector2(36, 36), projectile.scale * ((float)Math.Sin(projectile.timeLeft / 14) / 8 + 1), SpriteEffects.None, 0); StarDraw.DrawStarBasic(effect, projectile.Center, projectile.rotation, projectile.scale * 30, Color.Lerp(SpiritMod.StarjinxColor(Timer), Color.Black, 0.15f) * projectile.Opacity); StarDraw.DrawStarBasic(effect, projectile.Center, projectile.rotation, projectile.scale * 20, Color.Lerp(SpiritMod.StarjinxColor(Timer), Color.White, 0.75f) * projectile.Opacity); return(false); }
public void DrawPrimShape(BasicEffect effect) { if (projectile.velocity.Length() >= 1) { for (int i = 1; i < ProjectileID.Sets.TrailCacheLength[projectile.type]; i += 2) { Vector2 newCenter = projectile.oldPos[i] + projectile.Size / 2; float lerpamount = 0.5f + (i / (float)(ProjectileID.Sets.TrailCacheLength[projectile.type] * 2)); StarDraw.DrawStarBasic(effect, newCenter, projectile.oldRot[i], Scale * 100, Color.Lerp(SpiritMod.StarjinxColor(Main.GlobalTime * 4 + i), Color.Transparent, lerpamount)); } } StarDraw.DrawStarBasic(effect, projectile.Center, projectile.rotation, Scale * 100, Color.Lerp(SpiritMod.StarjinxColor(Main.GlobalTime * 4), Color.Black, 0.1f)); StarDraw.DrawStarBasic(effect, projectile.Center, projectile.rotation, Scale * 70, Color.White); }
public void DrawPrimShape(BasicEffect effect) => StarDraw.DrawStarBasic(effect, projectile.Center, projectile.rotation, projectile.scale * 15, Color.White);
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { StarDraw.DrawStarBasic(effect, projectile.Center, projectile.rotation, projectile.scale * 30, color); return(false); }
public void Draw(SpriteBatch spriteBatch, BasicEffect effect) { StarDraw.DrawStarBasic(effect, position, rotation, scale * 0.8f, Color.White); StarDraw.DrawStarBasic(effect, position, rotation, scale * 1.5f, color * 0.5f); }