diff --git a/Projectiles/Summon/BlackHawkGlow.png b/Projectiles/Summon/BlackHawkGlow.png new file mode 100644 index 0000000000..24479cb839 Binary files /dev/null and b/Projectiles/Summon/BlackHawkGlow.png differ diff --git a/Projectiles/Summon/BlackHawkSummon.cs b/Projectiles/Summon/BlackHawkSummon.cs index e62818c4fe..c0974c50fd 100644 --- a/Projectiles/Summon/BlackHawkSummon.cs +++ b/Projectiles/Summon/BlackHawkSummon.cs @@ -2,6 +2,7 @@ using CalamityMod.Buffs.Summon; using CalamityMod.CalPlayer; using CalamityMod.Projectiles; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using System; using Terraria; using Terraria.ID; @@ -267,5 +268,31 @@ namespace CalamityMod.Projectiles.Summon //Does no contact damage public override bool CanDamage() => false; + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D texture = Main.projectileTexture[projectile.type]; + int frameHeight = texture.Height / Main.projFrames[projectile.type]; + int y6 = frameHeight * projectile.frame; + SpriteEffects spriteEffects = SpriteEffects.None; + if (projectile.spriteDirection == -1) + spriteEffects = SpriteEffects.FlipHorizontally; + + spriteBatch.Draw(texture, projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, frameHeight)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), projectile.scale, spriteEffects, 0f); + return false; + } + + //Pretty glowmask + public override void PostDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D texture = ModContent.GetTexture("CalamityMod/Projectiles/Summon/BlackHawkGlow"); + int frameHeight = texture.Height / Main.projFrames[projectile.type]; + int y6 = frameHeight * projectile.frame; + SpriteEffects spriteEffects = SpriteEffects.None; + if (projectile.spriteDirection == -1) + spriteEffects = SpriteEffects.FlipHorizontally; + + spriteBatch.Draw(texture, projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, frameHeight)), Color.White, projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), projectile.scale, spriteEffects, 0f); + } } } diff --git a/Projectiles/Summon/CosmicViperGlow.png b/Projectiles/Summon/CosmicViperGlow.png new file mode 100644 index 0000000000..4f35f5fc00 Binary files /dev/null and b/Projectiles/Summon/CosmicViperGlow.png differ diff --git a/Projectiles/Summon/CosmicViperSummon.cs b/Projectiles/Summon/CosmicViperSummon.cs index 286043a29a..48d29995ab 100644 --- a/Projectiles/Summon/CosmicViperSummon.cs +++ b/Projectiles/Summon/CosmicViperSummon.cs @@ -268,19 +268,31 @@ namespace CalamityMod.Projectiles.Summon } } - public override bool CanDamage() => false; + public override bool CanDamage() => false; - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { Texture2D texture = Main.projectileTexture[projectile.type]; - int frameHeight = Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type]; + int frameHeight = texture.Height / Main.projFrames[projectile.type]; int y6 = frameHeight * projectile.frame; SpriteEffects spriteEffects = SpriteEffects.None; if (projectile.spriteDirection == -1) spriteEffects = SpriteEffects.FlipHorizontally; spriteBatch.Draw(texture, projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, frameHeight)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), projectile.scale, spriteEffects, 0f); - return false; + return false; + } + + public override void PostDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D texture = ModContent.GetTexture("CalamityMod/Projectiles/Summon/CosmicViperGlow"); + int frameHeight = texture.Height / Main.projFrames[projectile.type]; + int y6 = frameHeight * projectile.frame; + SpriteEffects spriteEffects = SpriteEffects.None; + if (projectile.spriteDirection == -1) + spriteEffects = SpriteEffects.FlipHorizontally; + + spriteBatch.Draw(texture, projectile.Center - Main.screenPosition, new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, frameHeight)), Color.White, projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), projectile.scale, spriteEffects, 0f); } } }