public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) { TremorUtils.DrawNPCGlowMask(spriteBatch, npc, mod.GetTexture("NovaPillar/NovaPillar_GlowMask")); float num88 = NovaHandler.ShieldStrength / (float)NPC.ShieldStrengthTowerMax; if (NovaHandler.ShieldStrength > 0) { Main.spriteBatch.End(); Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointWrap, DepthStencilState.Default, RasterizerState.CullNone); var center = npc.Center - Main.screenPosition; float num89 = 0f; if (npc.ai[3] > 0f && npc.ai[3] <= 30f) { num89 = 1f - npc.ai[3] / 30f; } Filters.Scene["Tremor:Nova"].GetShader().UseIntensity(1f + num89).UseProgress(0f); DrawData drawData = new DrawData(TextureManager.Load("Images/Misc/Perlin"), center - new Vector2(0, 10), new Rectangle(0, 0, 600, 600), Color.White * (num88 * 0.8f + 0.2f), npc.rotation, new Vector2(300f, 300f), npc.scale * (1f + num89 * 0.05f), SpriteEffects.None, 0); GameShaders.Misc["ForceField"].UseColor(new Vector3(1f + num89 * 0.5f)); GameShaders.Misc["ForceField"].Apply(drawData); drawData.Draw(Main.spriteBatch); Main.spriteBatch.End(); Main.spriteBatch.Begin(); return; } if (npc.ai[3] > 0f) { Main.spriteBatch.End(); Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointWrap, DepthStencilState.Default, RasterizerState.CullNone); var center = npc.Center - Main.screenPosition; float num90 = npc.ai[3] / 120f; float num91 = Math.Min(npc.ai[3] / 30f, 1f); Filters.Scene["Tremor:Nova"].GetShader().UseIntensity(Math.Min(5f, 15f * num90) + 1f).UseProgress(num90); DrawData drawData = new DrawData(TextureManager.Load("Images/Misc/Perlin"), center - new Vector2(0, 10), new Rectangle(0, 0, 600, 600), new Color(new Vector4(1f - (float)Math.Sqrt(num91))), npc.rotation, new Vector2(300f, 300f), npc.scale * (1f + num91), SpriteEffects.None, 0); GameShaders.Misc["ForceField"].UseColor(new Vector3(2f)); GameShaders.Misc["ForceField"].Apply(drawData); drawData.Draw(Main.spriteBatch); Main.spriteBatch.End(); Main.spriteBatch.Begin(); return; } Filters.Scene["Tremor:Nova"].GetShader().UseIntensity(0f).UseProgress(0f); }
public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) { TremorUtils.DrawNPCGlowMask(spriteBatch, npc, mod.GetTexture("NovaPillar/NPCs/NovaFlier_GlowMask")); }