From d6d5bc44907ed4b73713bc72c624be8bc349e2cc Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 31 May 2020 12:47:29 -0400 Subject: [PATCH] added glowmasks to black hawks and viper jets --- Projectiles/Summon/BlackHawkGlow.png | Bin 0 -> 708 bytes Projectiles/Summon/BlackHawkSummon.cs | 27 ++++++++++++++++++++++++ Projectiles/Summon/CosmicViperGlow.png | Bin 0 -> 855 bytes Projectiles/Summon/CosmicViperSummon.cs | 22 ++++++++++++++----- 4 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 Projectiles/Summon/BlackHawkGlow.png create mode 100644 Projectiles/Summon/CosmicViperGlow.png diff --git a/Projectiles/Summon/BlackHawkGlow.png b/Projectiles/Summon/BlackHawkGlow.png new file mode 100644 index 0000000000000000000000000000000000000000..24479cb83969ea319e93c156b0723570a1a82040 GIT binary patch literal 708 zcmV;#0z3VQP)5PefX5v?fVW554C-^=yk;JPWUAASY^h{p1^yCPcQ z;RfP)x9hy&_IOm?L+$u{15`I*v5U0}sU6=82n(2&bGRwOauF7Dg$40&bJuy0eBHl2 zjjk0CtyGp4vi>`VnCN!9?M;0;ow}c2Kfk)~xkADz0uY(Bq;$^}C(4lDi$cOFLKe7s z5QIjO0w6LoppHmD0HG{Q!e)(99&R9NAET{Xe1M4htWg>ga=n`(v^TueICl`%v91LL z2t1;%9d|`&rEEP85QGMy@o!WS8iWR+L1>JnTs#7gz$5SoJYvR!iMv_W_AY0van>b( zAZw5{+R7U8N^a_G(@=n0_d4A?0uZx2{PGvMDdO@=9sk5|AWDw|gniQmh_to&(V?mH zm0=YDh|CLzju$?@ymwcIKY1%WRu6*Ez%2XbK>AEP08v@9hbytQJlsIkK8Dwh&w&Ag zo+UlYwtALwH@w%#Dnac(%WJblGiGVE0IPZ2vWC?HtmXj(>67%?X8N>>@!EOt2s{Fh zz$3S;M8;II-lGY&w2ns3+s@MgU z_Beo0ar1~`Tb~#JhzyWqBRO9=_r*~dMF 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 0000000000000000000000000000000000000000..4f35f5fc007aeb8e2c2d532ed1d1a3d90219f22d GIT binary patch literal 855 zcmV-d1E~CoP) zO=5nMN;xK}73!K4i?BGN#R|2;#*eR4bM@z8G^M#N+3ZBs3+-;KM1>HwGETI0%eq6i zSfSJqE@qC35!&B7H&O9xZDDHEy&dgD9sceRc89o)#$3X|om3-q>3V304tE!g$tTB8 z=JR>KZ$4uMk5HnaiN($Kz3F!_Q8hyC(7n7`H)bxMeVb42T%m43p+vdu1`|~ylp+!9 zdtc7WCFu4im}o2^R6WHDRg(g$6^iFkYLa`t&mN52#j((ghpQJtxsFvWuXee!Zerjw zJp0hCIuf|oK`7TT>E%IGIw5ZVK$Pp4^ztAooe;NwAj)-2dU+6)PKet-5al{1y*!9Y zC&cX^h;kj1ULHi7B9v-VN!)Il8ll$tR6E_aelc?tLOsEPd)}xuL|whD73!O-vGz&D z5EUa-+7UT-C{vqL!9>*vm2yPRl62=TML3wK8llpT$Wa6<=elZy=6;&7?Nia!*U#WN z3Zao4ppyDxQa}iupyVd;m7{K?5$dgmBHDVPYL-&e2u(dD#H|^n7A!7dNF^9TQ#qTf zUJ%XYe5!UqG?lZt>IKnU&ZlY@L{mANt6mVz<$S7kK{S=Kx#|Vcrk%IHI=ub-Fijuc zZAFC;wX!Nsqpuz6 z_PWsMEH3J*6H09=aewVEmT0j;?VL;Xau_j0#R$!HM9vp|-3-W0Jly+mFi|x^a~+YR zf|5(t7mb67su7y&h+MWg+Vl$$8y8yVp_+3o?xP&HW|R#MMm5_ZFL$3_sA!8^*JG(z zqIe#iycoE358i5)Qq%}lv)rjhsJjY?y%#d&_`iUd`)Exa 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); } } }