public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { var tex = ModContent.GetTexture(Texture); var texGlow = ModContent.GetTexture(Texture + "Glow"); var texHot = ModContent.GetTexture(Texture + "Hot"); spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, lightColor, projectile.rotation, tex.Size() / 2, projectile.scale, 0, 0); if (State == 0) { spriteBatch.Draw(texGlow, projectile.Center - Main.screenPosition, null, VitricSummonOrb.MoltenGlow(timer / 30f * 110), projectile.rotation, texGlow.Size() / 2, projectile.scale, 0, 0); } if (State == 1) { spriteBatch.Draw(texHot, projectile.Center - Main.screenPosition, null, Color.White * Math.Min(1, timer / 30f), projectile.rotation, texHot.Size() / 2, projectile.scale, 0, 0); } return(false); }
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { NPC target = Main.npc[enemyID]; Color color; if (stuck) { color = VitricSummonOrb.MoltenGlow(100 - (needleLerp * 10)); } else { color = VitricSummonOrb.MoltenGlow(100); } Texture2D tex = Main.projectileTexture[projectile.type]; spriteBatch.Draw(tex, (projectile.Center - Main.screenPosition + new Vector2(0, projectile.gfxOffY)), VitricSummonOrb.WhiteFrame(tex.Size().ToRectangle(), false), lightColor, projectile.rotation, new Vector2(tex.Width / 2, tex.Height / 2), projectile.scale, SpriteEffects.None, 0); spriteBatch.Draw(tex, (projectile.Center - Main.screenPosition + new Vector2(0, projectile.gfxOffY)), VitricSummonOrb.WhiteFrame(tex.Size().ToRectangle(), true), color * (needleLerp / 10f), projectile.rotation, new Vector2(tex.Width / 2, tex.Height / 2), projectile.scale, SpriteEffects.None, 0); if (stuck) { tex = ModContent.GetTexture(AssetDirectory.VitricItem + "NeedlerBloom"); color = Color.Lerp(Color.Orange, Color.Red, needleLerp / 20f); color.A = 0; spriteBatch.Draw(tex, (projectile.Center - Main.screenPosition + new Vector2(0, projectile.gfxOffY)), null, color * 0.66f, projectile.rotation, new Vector2(tex.Width, tex.Height) / 2, ((projectile.scale * (needleLerp / 10f)) + 0.25f) * new Vector2(1f, 1.25f), SpriteEffects.None, 0f); } return(false); }