Merge branch '1.4.4' of https://github.com/CalamityTeam/CalamityMod into 1.4.4
No files matched your search
|
Before Width: | Height: | Size: 573 B After Width: | Height: | Size: 583 B |
|
Before Width: | Height: | Size: 683 B After Width: | Height: | Size: 523 B |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 826 B |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 899 B |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 799 B |
@@ -12,8 +12,8 @@ namespace CalamityMod.Items.Accessories
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 20;
|
||||
Item.height = 24;
|
||||
Item.width = 18;
|
||||
Item.height = 40;
|
||||
Item.value = CalamityGlobalItem.Rarity1BuyPrice;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.accessory = true;
|
||||
|
||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 749 B |
@@ -11,8 +11,8 @@ namespace CalamityMod.Items.Accessories
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 20;
|
||||
Item.height = 24;
|
||||
Item.width = 34;
|
||||
Item.height = 52;
|
||||
Item.value = CalamityGlobalItem.Rarity5BuyPrice;
|
||||
Item.rare = ItemRarityID.Pink;
|
||||
Item.accessory = true;
|
||||
|
||||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 1.4 KiB |
@@ -11,8 +11,8 @@ namespace CalamityMod.Items.Accessories
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 20;
|
||||
Item.height = 24;
|
||||
Item.width = 18;
|
||||
Item.height = 40;
|
||||
Item.value = CalamityGlobalItem.Rarity1BuyPrice;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.accessory = true;
|
||||
|
||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 754 B |
@@ -9,8 +9,8 @@ namespace CalamityMod.Items.Accessories
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 20;
|
||||
Item.height = 24;
|
||||
Item.width = 18;
|
||||
Item.height = 40;
|
||||
Item.value = CalamityGlobalItem.Rarity1BuyPrice;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.accessory = true;
|
||||
|
||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 725 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 955 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@@ -199,13 +199,15 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
var barFG = Request<Texture2D>("CalamityMod/UI/MiscTextures/GenericBarFront").Value;
|
||||
|
||||
float barScale = 3f;
|
||||
|
||||
Vector2 drawPos = position + Vector2.UnitY * (frame.Height - 8) * scale + Vector2.UnitX * (frame.Width - barBG.Width * barScale) * scale * 0.5f;
|
||||
Vector2 barOrigin = barBG.Size() * 0.5f;
|
||||
float xOffset = frame.Width * 0.25f - barBG.Width * 0.5f;
|
||||
float yOffset = frame.Height * 0.7f - barBG.Height;
|
||||
Vector2 drawPos = position + Vector2.UnitX * scale * xOffset + Vector2.UnitY * scale * yOffset;
|
||||
Rectangle frameCrop = new Rectangle(0, 0, (int)(Charge / 10f * barFG.Width), barFG.Height);
|
||||
Color color = Main.hslToRgb((Main.GlobalTimeWrappedHourly * 0.6f) % 1, 1, 0.75f + (float)Math.Sin(Main.GlobalTimeWrappedHourly * 3f) * 0.1f);
|
||||
|
||||
spriteBatch.Draw(barBG, drawPos, null, color, 0f, origin, scale * barScale, 0f, 0f);
|
||||
spriteBatch.Draw(barFG, drawPos, frameCrop, color * 0.8f, 0f, origin, scale * barScale, 0f, 0f);
|
||||
spriteBatch.Draw(barBG, drawPos, null, color, 0f, barOrigin, scale * barScale, 0f, 0f);
|
||||
spriteBatch.Draw(barFG, drawPos, frameCrop, color * 0.8f, 0f, barOrigin, scale * barScale, 0f, 0f);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -215,13 +215,15 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
var barFG = Request<Texture2D>("CalamityMod/UI/MiscTextures/GenericBarFront").Value;
|
||||
|
||||
float barScale = 3.5f;
|
||||
|
||||
Vector2 drawPos = position + Vector2.UnitY * (frame.Height - 10) * scale + Vector2.UnitX * (frame.Width - barBG.Width * barScale) * scale * 0.5f;
|
||||
Vector2 barOrigin = barBG.Size() * 0.5f;
|
||||
float xOffset = frame.Width * 0.25f - barBG.Width * 0.5f;
|
||||
float yOffset = frame.Height * 0.7f - barBG.Height;
|
||||
Vector2 drawPos = position + Vector2.UnitX * scale * xOffset + Vector2.UnitY * scale * yOffset;
|
||||
Rectangle frameCrop = new Rectangle(0, 0, (int)(Charge / 10f * barFG.Width), barFG.Height);
|
||||
Color color = Main.hslToRgb(((float)Math.Sin(Main.GlobalTimeWrappedHourly * 0.6f) * 0.5f + 0.5f) * 0.15f, 1, 0.85f + (float)Math.Sin(Main.GlobalTimeWrappedHourly * 3f) * 0.1f);
|
||||
|
||||
spriteBatch.Draw(barBG, drawPos, null, color, 0f, origin, scale * barScale, 0f, 0f);
|
||||
spriteBatch.Draw(barFG, drawPos, frameCrop, color * 0.8f, 0f, origin, scale * barScale, 0f, 0f);
|
||||
spriteBatch.Draw(barBG, drawPos, null, color, 0f, barOrigin, scale * barScale, 0f, 0f);
|
||||
spriteBatch.Draw(barFG, drawPos, frameCrop, color * 0.8f, 0f, barOrigin, scale * barScale, 0f, 0f);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -126,12 +126,15 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
var barBG = Request<Texture2D>("CalamityMod/UI/MiscTextures/GenericBarBack").Value;
|
||||
var barFG = Request<Texture2D>("CalamityMod/UI/MiscTextures/GenericBarFront").Value;
|
||||
|
||||
Vector2 drawPos = position + Vector2.UnitY * (frame.Height - 2) * scale + Vector2.UnitX * (frame.Width - barBG.Width * barScale) * scale * 0.5f;
|
||||
Vector2 barOrigin = barBG.Size() * 0.5f;
|
||||
float xOffset = frame.Width * 0.25f - barBG.Width * 0.5f;
|
||||
float yOffset = frame.Height * 0.8f - barBG.Height;
|
||||
Vector2 drawPos = position + Vector2.UnitX * scale * xOffset + Vector2.UnitY * scale * yOffset;
|
||||
Rectangle frameCrop = new Rectangle(0, 0, (int)(Charge / 10f * barFG.Width), barFG.Height);
|
||||
Color color = Main.hslToRgb((Main.GlobalTimeWrappedHourly * 0.6f) % 1, 1, 0.85f + (float)Math.Sin(Main.GlobalTimeWrappedHourly * 3f) * 0.1f);
|
||||
|
||||
spriteBatch.Draw(barBG, drawPos, null, color , 0f, origin, scale * barScale, 0f, 0f);
|
||||
spriteBatch.Draw(barFG, drawPos, frameCrop, color * 0.8f, 0f, origin, scale * barScale, 0f, 0f);
|
||||
spriteBatch.Draw(barBG, drawPos, null, color , 0f, barOrigin, scale * barScale, 0f, 0f);
|
||||
spriteBatch.Draw(barFG, drawPos, frameCrop, color * 0.8f, 0f, barOrigin, scale * barScale, 0f, 0f);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -156,13 +156,15 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
var barFG = Request<Texture2D>("CalamityMod/UI/MiscTextures/GenericBarFront").Value;
|
||||
|
||||
float barScale = 1.5f;
|
||||
|
||||
Vector2 drawPos = position + Vector2.UnitY * ( frame.Height - 2f ) * scale + Vector2.UnitX * (frame.Width - barBG.Width * barScale) * scale * 0.5f;
|
||||
Vector2 barOrigin = barBG.Size() * 0.5f;
|
||||
float xOffset = frame.Width * 0.25f - barBG.Width * 0.5f;
|
||||
float yOffset = frame.Height * 0.8f - barBG.Height;
|
||||
Vector2 drawPos = position + Vector2.UnitX * scale * xOffset + Vector2.UnitY * scale * yOffset;
|
||||
Rectangle frameCrop = new Rectangle(0, 0, (int)(Charge / 10f * barFG.Width), barFG.Height);
|
||||
Color color = Main.hslToRgb((Main.GlobalTimeWrappedHourly * 0.6f) % 1, 1, 0.85f + (float)Math.Sin(Main.GlobalTimeWrappedHourly * 3f) * 0.1f);
|
||||
|
||||
spriteBatch.Draw(barBG, drawPos, null, color, 0f, origin, scale * barScale, 0f, 0f);
|
||||
spriteBatch.Draw(barFG, drawPos, frameCrop, color * 0.8f, 0f, origin, scale * barScale, 0f, 0f);
|
||||
spriteBatch.Draw(barBG, drawPos, null, color, 0f, barOrigin, scale * barScale, 0f, 0f);
|
||||
spriteBatch.Draw(barFG, drawPos, frameCrop, color * 0.8f, 0f, barOrigin, scale * barScale, 0f, 0f);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -14,8 +14,8 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
{
|
||||
Item.damage = 25;
|
||||
Item.mana = 10;
|
||||
Item.width = 46;
|
||||
Item.height = 28;
|
||||
Item.width = 38;
|
||||
Item.height = 40;
|
||||
Item.useTime = Item.useAnimation = 24;
|
||||
Item.useStyle = ItemUseStyleID.HoldUp;
|
||||
Item.noMelee = true;
|
||||
|
||||
|
Before Width: | Height: | Size: 631 B After Width: | Height: | Size: 909 B |
@@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
{
|
||||
Item.damage = 33;
|
||||
Item.mana = 10;
|
||||
Item.width = Item.height = 42;
|
||||
Item.width = Item.height = 46;
|
||||
Item.useTime = Item.useAnimation = 35;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.noMelee = true;
|
||||
|
||||
|
Before Width: | Height: | Size: 464 B After Width: | Height: | Size: 1.1 KiB |
@@ -932,7 +932,7 @@ BrimstoneElementalRelic: {
|
||||
|
||||
CalamitasCloneRelic: {
|
||||
DisplayName: Calamitas Clone Relic
|
||||
Tooltip: A glimpse into what could have been...
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
CalamitasRelic: {
|
||||
@@ -957,7 +957,7 @@ CragmawMireRelic: {
|
||||
|
||||
CryogenRelic: {
|
||||
DisplayName: Cryogen Relic
|
||||
Tooltip: A glimpse into what could have been...
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
DesertScourgeRelic: {
|
||||
@@ -977,7 +977,7 @@ DraedonRelic: {
|
||||
|
||||
DragonfollyRelic: {
|
||||
DisplayName: Dragonfolly Relic
|
||||
Tooltip: A glimpse into what could have been...
|
||||
Tooltip: ""
|
||||
}
|
||||
|
||||
GiantClamRelic: {
|
||||
@@ -4024,4 +4024,4 @@ WaterTurret: {
|
||||
Shoots high-speed water blasts at nearby enemies
|
||||
Cannot attack while a boss is alive
|
||||
'''
|
||||
}
|
||||
}
|
||||
@@ -94,7 +94,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
if (hurtInfo.Damage > 0)
|
||||
target.AddBuff(BuffID.Electrified, 120, true);
|
||||
target.AddBuff(BuffID.Electrified, 30, true);
|
||||
}
|
||||
|
||||
public override void ModifyNPCLoot(NPCLoot npcLoot)
|
||||
|
||||
@@ -44,7 +44,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
else if (Projectile.ai[0] >= 55f)
|
||||
{
|
||||
Projectile.ai[0] = 90f;
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, storedVelocity, ModContent.ProjectileType<CirrusBlast>(), Projectile.damage, 0f, Projectile.owner, Projectile.ai[1], Projectile.whoAmI);
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, storedVelocity, ModContent.ProjectileType<CirrusBlast>(), Projectile.damage, 0f, Projectile.owner, Projectile.ai[1], Projectile.whoAmI);
|
||||
|
||||
SoundEngine.PlaySound(SANSFire, Projectile.Center); // Funny Gaster Blaster sounds #2
|
||||
}
|
||||
|
||||
@@ -43,7 +43,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
else if (Projectile.ai[0] >= 55f)
|
||||
{
|
||||
Projectile.ai[0] = 90f;
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, storedVelocity, ModContent.ProjectileType<RavagerBlast>(), Projectile.damage, 0f, Projectile.owner, Projectile.ai[1], Projectile.whoAmI);
|
||||
if (Projectile.owner == Main.myPlayer)
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, storedVelocity, ModContent.ProjectileType<RavagerBlast>(), Projectile.damage, 0f, Projectile.owner, Projectile.ai[1], Projectile.whoAmI);
|
||||
|
||||
SoundEngine.PlaySound(SANSFire, Projectile.Center); //Funny Gaster Blaster sounds #2
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
Texture2D glow = ModContent.Request<Texture2D>(Texture + "Glow").Value;
|
||||
Rectangle frame = glow.Frame(1, Main.projFrames[Type], 0, Projectile.frame);
|
||||
Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, frame.Size() / 2f, Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, frame.Size() * 0.5f, Projectile.scale, SpriteEffects.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
public override void PostDraw(Color lightColor)
|
||||
{
|
||||
Texture2D glow = ModContent.Request<Texture2D>(Texture + "Glow").Value;
|
||||
Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, glow.Size() / 2f, Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, glow.Size() * 0.5f, Projectile.scale, SpriteEffects.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,14 +29,14 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D tex = ModContent.Request<Texture2D>(Texture).Value;
|
||||
Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() * 0.5f, Projectile.scale, SpriteEffects.None);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void PostDraw(Color lightColor)
|
||||
{
|
||||
Texture2D glow = ModContent.Request<Texture2D>(Texture + "Glow").Value;
|
||||
Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, glow.Size() / 2f, Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, glow.Size() * 0.5f, Projectile.scale, SpriteEffects.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -116,7 +116,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
public override void PostDraw(Color lightColor)
|
||||
{
|
||||
Texture2D glow = ModContent.Request<Texture2D>(Texture + "Glow").Value;
|
||||
Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, glow.Size() / 2f, Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, glow.Size() * 0.5f, Projectile.scale, SpriteEffects.None);
|
||||
}
|
||||
|
||||
public override bool? CanHitNPC(NPC target) => Projectile.ai[0] == 1f ? false : base.CanHitNPC(target);
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
Texture2D glow = ModContent.Request<Texture2D>(Texture + "Glow").Value;
|
||||
Rectangle frame = glow.Frame(1, Main.projFrames[Type], 0, Projectile.frame);
|
||||
Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, frame.Size() / 2f, Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, frame.Size() * 0.5f, Projectile.scale, SpriteEffects.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 708 B After Width: | Height: | Size: 1.7 KiB |
@@ -18,15 +18,14 @@ namespace CalamityMod.Projectiles.Summon
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ProjectileID.Sets.MinionSacrificable[Projectile.type] = true;
|
||||
ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true;
|
||||
Main.projFrames[Projectile.type] = 3;
|
||||
ProjectileID.Sets.MinionSacrificable[Type] = true;
|
||||
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
|
||||
Main.projFrames[Type] = 6;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 36;
|
||||
Projectile.height = 36;
|
||||
Projectile.width = Projectile.height = 32;
|
||||
Projectile.netImportant = true;
|
||||
Projectile.friendly = true;
|
||||
Projectile.ignoreWater = true;
|
||||
@@ -95,7 +94,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
Projectile.frame++;
|
||||
Projectile.frameCounter = 0;
|
||||
}
|
||||
if (Projectile.frame >= Main.projFrames[Projectile.type])
|
||||
if (Projectile.frame >= Main.projFrames[Type])
|
||||
{
|
||||
Projectile.frame = 0;
|
||||
}
|
||||
@@ -306,13 +305,10 @@ namespace CalamityMod.Projectiles.Summon
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D texture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
int frameHeight = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = frameHeight * Projectile.frame;
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (Projectile.spriteDirection == -1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame);
|
||||
SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None;
|
||||
|
||||
Main.EntitySpriteDraw(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, 0);
|
||||
Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, frame.Size() * 0.5f, Projectile.scale, spriteEffects);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -320,13 +316,10 @@ namespace CalamityMod.Projectiles.Summon
|
||||
public override void PostDraw(Color lightColor)
|
||||
{
|
||||
Texture2D texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Summon/BlackHawkGlow").Value;
|
||||
int frameHeight = texture.Height / Main.projFrames[Projectile.type];
|
||||
int y6 = frameHeight * Projectile.frame;
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (Projectile.spriteDirection == -1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
Rectangle frame = texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame);
|
||||
SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None;
|
||||
|
||||
Main.EntitySpriteDraw(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, 0);
|
||||
Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, frame.Size() * 0.5f, Projectile.scale, spriteEffects);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 181 B After Width: | Height: | Size: 132 B |
@@ -23,15 +23,15 @@ namespace CalamityMod.Projectiles.Summon
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.projFrames[Projectile.type] = 4;
|
||||
ProjectileID.Sets.NeedsUUID[Projectile.type] = true;
|
||||
ProjectileID.Sets.MinionSacrificable[Projectile.type] = true;
|
||||
ProjectileID.Sets.MinionTargettingFeature[Projectile.type] = true;
|
||||
Main.projFrames[Type] = 6;
|
||||
ProjectileID.Sets.NeedsUUID[Type] = true;
|
||||
ProjectileID.Sets.MinionSacrificable[Type] = true;
|
||||
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = Projectile.height = 16;
|
||||
Projectile.width = Projectile.height = 22;
|
||||
Projectile.netImportant = true;
|
||||
Projectile.friendly = true;
|
||||
Projectile.ignoreWater = true;
|
||||
@@ -159,16 +159,15 @@ namespace CalamityMod.Projectiles.Summon
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D eyeTexture = ModContent.Request<Texture2D>(Texture).Value;
|
||||
Rectangle frame = eyeTexture.Frame(1, 4, 0, Projectile.frame);
|
||||
Vector2 origin = frame.Size() * 0.5f;
|
||||
Rectangle frame = eyeTexture.Frame(1, Main.projFrames[Type], 0, Projectile.frame);
|
||||
SpriteEffects spriteEffects = Owner.gravDir == 1 ? SpriteEffects.None : SpriteEffects.FlipVertically;
|
||||
Main.EntitySpriteDraw(eyeTexture, Projectile.Center - Main.screenPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(eyeTexture, Projectile.Center - Main.screenPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, frame.Size() * 0.5f, Projectile.scale, SpriteEffects.None);
|
||||
|
||||
// Pupil drawing.
|
||||
Texture2D pupilTexture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Summon/DeathstareEyePupil").Value;
|
||||
Vector2 pupilDrawPosition = Projectile.Center - Main.screenPosition + PupilAngle.ToRotationVector2() * PupilOutwardness;
|
||||
pupilDrawPosition -= Vector2.UnitY * 4f;
|
||||
Main.EntitySpriteDraw(pupilTexture, pupilDrawPosition, null, Projectile.GetAlpha(lightColor), PupilAngle, pupilTexture.Size() * 0.5f, PupilScale, SpriteEffects.None, 0);
|
||||
pupilDrawPosition -= Vector2.UnitY * 6f;
|
||||
Main.EntitySpriteDraw(pupilTexture, pupilDrawPosition, null, Projectile.GetAlpha(lightColor), PupilAngle, pupilTexture.Size() * 0.5f, PupilScale, SpriteEffects.None);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 487 B After Width: | Height: | Size: 859 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 977 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.0 KiB |