Resprited Phangasm

This commit is contained in:
GinYuH committed 2022-09-21 20:20:34 -07:00
1 parent e754c40600
commit dda260ca0d
4 files changed
+20 -3

No files matched your search

+8 -2
View File
@@ -3,6 +3,7 @@ using CalamityMod.Projectiles.Ranged;
using CalamityMod.Rarities;
using CalamityMod.Tiles.Furniture.CraftingStations;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
@@ -22,8 +23,8 @@ namespace CalamityMod.Items.Weapons.Ranged
public override void SetDefaults()
{
Item.damage = 180;
Item.width = 20;
Item.height = 12;
Item.width = 48;
Item.height = 82;
Item.useTime = 12;
Item.useAnimation = 12;
Item.useStyle = ItemUseStyleID.Shoot;
@@ -50,6 +51,11 @@ namespace CalamityMod.Items.Weapons.Ranged
return false;
}
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
{
Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Ranged/PhangasmGlow").Value);
}
public override void AddRecipes()
{
CreateRecipe().
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 978 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 695 B

+12 -1
View File
@@ -1,4 +1,5 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria;
using Terraria.ID;
@@ -18,7 +19,7 @@ namespace CalamityMod.Projectiles.Ranged
public override void SetDefaults()
{
Projectile.width = 40;
Projectile.width = 48;
Projectile.height = 82;
Projectile.friendly = true;
Projectile.penetrate = -1;
@@ -132,6 +133,16 @@ namespace CalamityMod.Projectiles.Ranged
player.itemRotation = (float)Math.Atan2((double)(Projectile.velocity.Y * (float)Projectile.direction), (double)(Projectile.velocity.X * (float)Projectile.direction));
}
public override void PostDraw(Color lightColor)
{
Texture2D texture = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Ranged/PhangasmGlow").Value;
SpriteEffects spriteEffects = SpriteEffects.None;
if (Projectile.spriteDirection == -1)
spriteEffects = SpriteEffects.FlipHorizontally;
Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, new Vector2(texture.Width / 2f, texture.Height / 2f), Projectile.scale, spriteEffects, 0);
}
public override bool? CanDamage() => false;
}
}