remove extraneous false and split player centered rings into being a separate particle
This commit is contained in:
1 parent
aced0ae08a
commit
e94e71012e
18 files changed
+95
-46
No files matched your search
@@ -287,7 +287,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (Main.rand.NextBool(5))
|
||||
{
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(Player.Center + new Vector2(Main.rand.NextFloat(-10f, 10f), Main.rand.NextFloat(-20f, 20f)), new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-3f, -4f)), Main.rand.NextBool(2) ? Color.OliveDrab : Color.GreenYellow, new Vector2(0.8f, 1), 0, 0.09f, 0f, 45, false);
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(Player.Center + new Vector2(Main.rand.NextFloat(-10f, 10f), Main.rand.NextFloat(-20f, 20f)), new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-3f, -4f)), Main.rand.NextBool(2) ? Color.OliveDrab : Color.GreenYellow, new Vector2(0.8f, 1), 0, 0.09f, 0f, 45);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
}
|
||||
}
|
||||
@@ -315,7 +315,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (ragePulseTimer == 60)
|
||||
{
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(Player.Center, Vector2.Zero, Color.Red, new Vector2(1, 1), 0, 0f, 0.23f, 40, true);
|
||||
PlayerCenteredPulseRing pulse = new PlayerCenteredPulseRing(Player, Vector2.Zero, Color.Red, new Vector2(1, 1), 0, 0f, 0.23f, 40);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
ragePulse = true;
|
||||
}
|
||||
@@ -325,7 +325,7 @@ namespace CalamityMod.CalPlayer
|
||||
ragePulseVisualTimer++;
|
||||
if (ragePulseVisualTimer >= 30)
|
||||
{
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(Player.MountedCenter, Vector2.Zero, (shatteredCommunity ? Color.MediumPurple : Color.Red), new Vector2(1, 1), 0, 0f, 0.18f, 30, true);
|
||||
PlayerCenteredPulseRing pulse = new PlayerCenteredPulseRing(Player, Vector2.Zero, (shatteredCommunity ? Color.MediumPurple : Color.Red), new Vector2(1, 1), 0, 0f, 0.18f, 30);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
ragePulseVisualTimer = 0;
|
||||
ragePulse = false;
|
||||
@@ -384,7 +384,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Main.rand.NextBool(4) && drawInfo.shadow == 0f)
|
||||
{
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(Player.Center + new Vector2(Main.rand.NextFloat(-10f, 10f), Main.rand.NextFloat(-20f, 20f)), Vector2.Zero, Main.rand.NextBool(2) ? Color.DarkTurquoise : Color.Coral, new Vector2(1, 1), 0, 0.08f, 0f, 20, false);
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(Player.Center + new Vector2(Main.rand.NextFloat(-10f, 10f), Main.rand.NextFloat(-20f, 20f)), Vector2.Zero, Main.rand.NextBool(2) ? Color.DarkTurquoise : Color.Coral, new Vector2(1, 1), 0, 0.08f, 0f, 20);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
Particle orb = new GenericBloom(Player.Center + new Vector2(Main.rand.NextFloat(-10f, 10f), Main.rand.NextFloat(-20f, 20f)), Vector2.Zero, Main.rand.NextBool(2) ? Color.DarkTurquoise : Color.Coral, 0.055f, 8);
|
||||
GeneralParticleHandler.SpawnParticle(orb);
|
||||
@@ -462,7 +462,7 @@ namespace CalamityMod.CalPlayer
|
||||
break;
|
||||
}
|
||||
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(Player.Center + new Vector2(Main.rand.NextFloat(-10f, 10f), Main.rand.NextFloat(-20f, 20f)), new Vector2(5, 5).RotatedByRandom(360), sparkColor, new Vector2(Main.rand.NextFloat(1f, 5f), Main.rand.NextFloat(1f, 5f)), 0, Main.rand.NextFloat(0.07f, 0.1f), 0f, 18, false);
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(Player.Center + new Vector2(Main.rand.NextFloat(-10f, 10f), Main.rand.NextFloat(-20f, 20f)), new Vector2(5, 5).RotatedByRandom(360), sparkColor, new Vector2(Main.rand.NextFloat(1f, 5f), Main.rand.NextFloat(1f, 5f)), 0, Main.rand.NextFloat(0.07f, 0.1f), 0f, 18);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
|
||||
float numberOfDusts = 3f;
|
||||
@@ -509,7 +509,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(Player.Center + new Vector2(Main.rand.NextFloat(-10f, 10f), Main.rand.NextFloat(-20f, 20f)), Vector2.Zero, Main.rand.NextBool(3) ? Color.LimeGreen : Color.Green, new Vector2(1, 1), 0, Main.rand.NextFloat(0.07f, 0.18f), 0f, 35, false);
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(Player.Center + new Vector2(Main.rand.NextFloat(-10f, 10f), Main.rand.NextFloat(-20f, 20f)), Vector2.Zero, Main.rand.NextBool(3) ? Color.LimeGreen : Color.Green, new Vector2(1, 1), 0, Main.rand.NextFloat(0.07f, 0.18f), 0f, 35);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
GSDashSlot = SoundEngine.PlaySound(DevourerofGodsHead.DeathAnimationSound, player.Center);
|
||||
SoundOnce = true;
|
||||
|
||||
Particle pulse = new DirectionalPulseRing(player.Center, Vector2.Zero, Color.Orchid, new Vector2(2f, 2f), Main.rand.NextFloat(12f, 25f), 0.1f, 12f, 18, false);
|
||||
Particle pulse = new DirectionalPulseRing(player.Center, Vector2.Zero, Color.Orchid, new Vector2(2f, 2f), Main.rand.NextFloat(12f, 25f), 0.1f, 12f, 18);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
|
||||
for (int i = 0; i <= 15; i++)
|
||||
@@ -96,9 +96,9 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
|
||||
if (Time > 20 && Time < 100)
|
||||
{
|
||||
Particle pulse = new DirectionalPulseRing(player.Center - player.velocity * 0.52f, player.velocity / 1.5f, Color.Fuchsia, new Vector2(1f, 2f), player.velocity.ToRotation(), 0.82f, 0.32f, 60, false);
|
||||
Particle pulse = new DirectionalPulseRing(player.Center - player.velocity * 0.52f, player.velocity / 1.5f, Color.Fuchsia, new Vector2(1f, 2f), player.velocity.ToRotation(), 0.82f, 0.32f, 60);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
Particle pulse2 = new DirectionalPulseRing(player.Center - player.velocity * 0.40f, player.velocity / 1.5f * 0.9f, Color.Aqua, new Vector2(0.8f, 1.5f), player.velocity.ToRotation(), 0.58f, 0.28f, 50, false);
|
||||
Particle pulse2 = new DirectionalPulseRing(player.Center - player.velocity * 0.40f, player.velocity / 1.5f * 0.9f, Color.Aqua, new Vector2(0.8f, 1.5f), player.velocity.ToRotation(), 0.58f, 0.28f, 50);
|
||||
GeneralParticleHandler.SpawnParticle(pulse2);
|
||||
Time = 111;
|
||||
}
|
||||
|
||||
@@ -5413,7 +5413,7 @@ namespace CalamityMod.NPCs
|
||||
Vector2 npcSize = npc.Center + new Vector2(Main.rand.NextFloat(-npc.width / 2, npc.width / 2), Main.rand.NextFloat(-npc.height / 2, npc.height / 2));
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(npcSize, Vector2.Zero, Main.rand.NextBool(3) ? Color.LimeGreen : Color.Green, new Vector2(1, 1), 0, Main.rand.NextFloat(0.07f, 0.18f), 0f, 35, false);
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(npcSize, Vector2.Zero, Main.rand.NextBool(3) ? Color.LimeGreen : Color.Green, new Vector2(1, 1), 0, Main.rand.NextFloat(0.07f, 0.18f), 0f, 35);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
@@ -5443,7 +5443,7 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
Vector2 npcSize = npc.Center + new Vector2(Main.rand.NextFloat(-npc.width / 2, npc.width / 2), Main.rand.NextFloat(-npc.height / 2, npc.height / 2));
|
||||
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(npcSize, Vector2.Zero, Main.rand.NextBool(3) ? Color.PaleGreen : Color.DarkSeaGreen, new Vector2(Main.rand.NextFloat(0.5f, 1.5f), Main.rand.NextFloat(0.5f, 1.5f)), 0, Main.rand.NextFloat(0.03f, 0.17f), 0f, 35, false);
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(npcSize, Vector2.Zero, Main.rand.NextBool(3) ? Color.PaleGreen : Color.DarkSeaGreen, new Vector2(Main.rand.NextFloat(0.5f, 1.5f), Main.rand.NextFloat(0.5f, 1.5f)), 0, Main.rand.NextFloat(0.03f, 0.17f), 0f, 35);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
|
||||
if (Main.rand.Next(5) >= 0)
|
||||
@@ -5493,7 +5493,7 @@ namespace CalamityMod.NPCs
|
||||
break;
|
||||
}
|
||||
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(npcSize, Vector2.Zero, sparkColor, new Vector2(1, 1), 0, 0.1f + (0.000004f * npc.width * npc.height), 0f, 25, false);
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(npcSize, Vector2.Zero, sparkColor, new Vector2(1, 1), 0, 0.1f + (0.000004f * npc.width * npc.height), 0f, 25);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
|
||||
float numberOfDusts = 2f;
|
||||
@@ -5538,7 +5538,7 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
Vector2 npcSize = npc.Center + new Vector2(Main.rand.NextFloat(-npc.width / 2, npc.width / 2), Main.rand.NextFloat(-npc.height / 2, npc.height / 2));
|
||||
Vector2 npcSize2 = npc.Center + new Vector2(Main.rand.NextFloat(-npc.width / 2, npc.width / 2), Main.rand.NextFloat(-npc.height / 2, npc.height / 2));
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(npcSize, Vector2.Zero, Main.rand.NextBool(2) ? Color.DarkTurquoise : Color.Coral, new Vector2(1, 1), 0, 0.08f + (0.000003f * npc.width * npc.height), 0f, 20, false);
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(npcSize, Vector2.Zero, Main.rand.NextBool(2) ? Color.DarkTurquoise : Color.Coral, new Vector2(1, 1), 0, 0.08f + (0.000003f * npc.width * npc.height), 0f, 20);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
Particle orb = new GenericBloom(npcSize2, Vector2.Zero, Main.rand.NextBool(2) ? Color.DarkTurquoise : Color.Coral, 0.055f + (0.000003f * npc.width * npc.height), 8);
|
||||
GeneralParticleHandler.SpawnParticle(orb);
|
||||
@@ -5643,7 +5643,7 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
DirectionalPulseRing pulse = new DirectionalPulseRing(npcSize, new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-4.5f, -6f)), Main.rand.NextBool(2) ? Color.OliveDrab : Color.GreenYellow, new Vector2(0.8f, 1), 0, 0.09f + (0.000003f * npc.width * npc.height), 0f, 45, false);
|
||||
PlayerCenteredPulseRing pulse = new DirectionalPulseRing(npcSize, new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-4.5f, -6f)), Main.rand.NextBool(2) ? Color.OliveDrab : Color.GreenYellow, new Vector2(0.8f, 1), 0, 0.09f + (0.000003f * npc.width * npc.height), 0f, 45);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using static CalamityMod.CalamityUtils;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using rail;
|
||||
using CalamityMod.CalPlayer;
|
||||
using static CalamityMod.CalamityUtils;
|
||||
|
||||
namespace CalamityMod.Particles
|
||||
{
|
||||
@@ -16,16 +14,13 @@ namespace CalamityMod.Particles
|
||||
public override bool SetLifetime => true;
|
||||
public override bool UseCustomDraw => true;
|
||||
|
||||
public Player player = Main.player[Main.myPlayer];
|
||||
|
||||
private float OriginalScale;
|
||||
private float FinalScale;
|
||||
private float opacity;
|
||||
private Vector2 Squish;
|
||||
private Color BaseColor;
|
||||
private bool LockToPlayerPosition;
|
||||
|
||||
public DirectionalPulseRing(Vector2 position, Vector2 velocity, Color color, Vector2 squish, float rotation, float originalScale, float finalScale, int lifeTime, bool lockToPlayerPosition)
|
||||
public DirectionalPulseRing(Vector2 position, Vector2 velocity, Color color, Vector2 squish, float rotation, float originalScale, float finalScale, int lifeTime)
|
||||
{
|
||||
Position = position;
|
||||
Velocity = velocity;
|
||||
@@ -36,7 +31,6 @@ namespace CalamityMod.Particles
|
||||
Lifetime = lifeTime;
|
||||
Squish = squish;
|
||||
Rotation = rotation;
|
||||
LockToPlayerPosition = lockToPlayerPosition;
|
||||
}
|
||||
|
||||
public override void Update()
|
||||
@@ -49,9 +43,6 @@ namespace CalamityMod.Particles
|
||||
Color = BaseColor * opacity;
|
||||
Lighting.AddLight(Position, Color.R / 255f, Color.G / 255f, Color.B / 255f);
|
||||
Velocity *= 0.95f;
|
||||
|
||||
if (LockToPlayerPosition)
|
||||
Position = player.MountedCenter;
|
||||
}
|
||||
|
||||
public override void CustomDraw(SpriteBatch spriteBatch)
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using static CalamityMod.CalamityUtils;
|
||||
|
||||
namespace CalamityMod.Particles
|
||||
{
|
||||
public class PlayerCenteredPulseRing : Particle
|
||||
{
|
||||
public override string Texture => "CalamityMod/Particles/HollowCircleHardEdge";
|
||||
public override bool UseAdditiveBlend => true;
|
||||
public override bool SetLifetime => true;
|
||||
public override bool UseCustomDraw => true;
|
||||
|
||||
public Player player = Main.player[Main.myPlayer];
|
||||
private float OriginalScale;
|
||||
private float FinalScale;
|
||||
private float opacity;
|
||||
private Vector2 Squish;
|
||||
private Color BaseColor;
|
||||
|
||||
public PlayerCenteredPulseRing(Player p, Vector2 velocity, Color color, Vector2 squish, float rotation, float originalScale, float finalScale, int lifeTime)
|
||||
{
|
||||
player = p;
|
||||
Position = p.MountedCenter;
|
||||
Velocity = velocity;
|
||||
BaseColor = color;
|
||||
OriginalScale = originalScale;
|
||||
FinalScale = finalScale;
|
||||
Scale = originalScale;
|
||||
Lifetime = lifeTime;
|
||||
Squish = squish;
|
||||
Rotation = rotation;
|
||||
}
|
||||
|
||||
public override void Update()
|
||||
{
|
||||
float pulseProgress = PiecewiseAnimation(LifetimeCompletion, new CurveSegment[] { new CurveSegment(EasingType.PolyOut, 0f, 0f, 1f, 4) });
|
||||
Scale = MathHelper.Lerp(OriginalScale, FinalScale, pulseProgress);
|
||||
|
||||
opacity = (float)Math.Sin(MathHelper.PiOver2 + LifetimeCompletion * MathHelper.PiOver2);
|
||||
|
||||
Color = BaseColor * opacity;
|
||||
Lighting.AddLight(Position, Color.R / 255f, Color.G / 255f, Color.B / 255f);
|
||||
Velocity *= 0.95f;
|
||||
Position = player.MountedCenter;
|
||||
}
|
||||
|
||||
public override void CustomDraw(SpriteBatch spriteBatch)
|
||||
{
|
||||
Texture2D tex = ModContent.Request<Texture2D>(Texture).Value;
|
||||
spriteBatch.Draw(tex, Position - Main.screenPosition, null, Color * opacity, Rotation, tex.Size() / 2f, Scale * Squish, SpriteEffects.None, 0);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -121,7 +121,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
TargetRecoil = recoil;
|
||||
|
||||
// Shooty ring
|
||||
Particle pulse = new DirectionalPulseRing(Owner.MountedCenter + direction * GunLength, Vector2.Zero, Color.DeepSkyBlue, new Vector2(0.5f, 1f), direction.ToRotation(), 0.2f, 1f, 30, false);
|
||||
Particle pulse = new DirectionalPulseRing(Owner.MountedCenter + direction * GunLength, Vector2.Zero, Color.DeepSkyBlue, new Vector2(0.5f, 1f), direction.ToRotation(), 0.2f, 1f, 30);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
int step = 10;
|
||||
while (step < LaserLength)
|
||||
{
|
||||
Particle pulse = new DirectionalPulseRing(Projectile.Center + MathHelper.WrapAngle(Projectile.rotation + MathHelper.PiOver2).ToRotationVector2() * step, Vector2.Zero, Color.Red, new Vector2(0.5f, 1f), MathHelper.WrapAngle(Projectile.rotation + MathHelper.PiOver2), 0.1f, 1f, 12, false);
|
||||
Particle pulse = new DirectionalPulseRing(Projectile.Center + MathHelper.WrapAngle(Projectile.rotation + MathHelper.PiOver2).ToRotationVector2() * step, Vector2.Zero, Color.Red, new Vector2(0.5f, 1f), MathHelper.WrapAngle(Projectile.rotation + MathHelper.PiOver2), 0.1f, 1f, 12);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
step += 100;
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
boomDust.noGravity = true;
|
||||
}
|
||||
|
||||
Particle boom = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.White, Vector2.One, 0f, 0.05f, 1f + Main.rand.NextFloat(0.2f), 20, false);
|
||||
Particle boom = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.White, Vector2.One, 0f, 0.05f, 1f + Main.rand.NextFloat(0.2f), 20);
|
||||
GeneralParticleHandler.SpawnParticle(boom);
|
||||
|
||||
SoundEngine.PlaySound(SoundID.Item14, Projectile.Center);
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
// Random flavor pulse.
|
||||
if (Main.rand.NextBool(100))
|
||||
{
|
||||
Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.DarkCyan, Vector2.One, 0f, 0.05f, 0.4f + Main.rand.NextFloat(0.2f), 30, false);
|
||||
Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.DarkCyan, Vector2.One, 0f, 0.05f, 0.4f + Main.rand.NextFloat(0.2f), 30);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
pulseDust.noGravity = true;
|
||||
}
|
||||
|
||||
Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, empowered ? Color.White : Color.DarkCyan * 1.2f, Vector2.One, 0f, 0.05f, 0.5f + Main.rand.NextFloat(0.2f), 20, false);
|
||||
Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, empowered ? Color.White : Color.DarkCyan * 1.2f, Vector2.One, 0f, 0.05f, 0.5f + Main.rand.NextFloat(0.2f), 20);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
}
|
||||
|
||||
Color pulseColor = Main.rand.NextBool() ? Color.Coral : Color.DeepSkyBlue;
|
||||
Particle pulse = new DirectionalPulseRing(Owner.MountedCenter + direction * 44f, Vector2.Zero, pulseColor, new Vector2(0.5f, 1f), direction.ToRotation(), 0.04f, 0.2f, 30, false);
|
||||
Particle pulse = new DirectionalPulseRing(Owner.MountedCenter + direction * 44f, Vector2.Zero, pulseColor, new Vector2(0.5f, 1f), direction.ToRotation(), 0.04f, 0.2f, 30);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
}
|
||||
|
||||
Color pulseColor = Main.rand.NextBool() ? Color.Coral : Color.DeepSkyBlue;
|
||||
Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, pulseColor, new Vector2(0.5f, 1f), direction.ToRotation(), 0.05f, 0.34f + Main.rand.NextFloat(0.3f), 30, false);
|
||||
Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, pulseColor, new Vector2(0.5f, 1f), direction.ToRotation(), 0.05f, 0.34f + Main.rand.NextFloat(0.3f), 30);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,9 +131,9 @@ namespace CalamityMod.Projectiles.Melee
|
||||
else
|
||||
SoundEngine.PlaySound(SlamHamSound, Projectile.Center);
|
||||
|
||||
Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.Violet, new Vector2(2f, 2f), Main.rand.NextFloat(12f, 25f), 0.2f, 4f, 12, false);
|
||||
Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.Violet, new Vector2(2f, 2f), Main.rand.NextFloat(12f, 25f), 0.2f, 4f, 12);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
Particle pulse2 = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.Aqua, new Vector2(2f, 2f), Main.rand.NextFloat(12f, 25f), 0.1f, 1.5f, 11, false);
|
||||
Particle pulse2 = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.Aqua, new Vector2(2f, 2f), Main.rand.NextFloat(12f, 25f), 0.1f, 1.5f, 11);
|
||||
GeneralParticleHandler.SpawnParticle(pulse2);
|
||||
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity * 0f, ModContent.ProjectileType<GalaxySmasherBlast>(), Projectile.damage / 2, Projectile.knockBack, Projectile.owner, 0f);
|
||||
|
||||
@@ -153,7 +153,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
if (InPulse == 0)
|
||||
{
|
||||
SoundEngine.PlaySound(RedHamSound, Projectile.Center);
|
||||
Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.Aqua, new Vector2(1f, 1f), Main.rand.NextFloat(12f, 25f), 0.1f, 1.95f, 120, false);
|
||||
Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.Aqua, new Vector2(1f, 1f), Main.rand.NextFloat(12f, 25f), 0.1f, 1.95f, 120);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
InPulse = 1;
|
||||
}
|
||||
@@ -244,7 +244,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
}
|
||||
if (PulseCooldown >= 15);
|
||||
{
|
||||
Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.Violet, new Vector2(0.5f, 0.5f), Main.rand.NextFloat(12f, 25f), 0.2f, 1.4f + (EmpoweredHammer * 0.1f), 14, false);
|
||||
Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.Violet, new Vector2(0.5f, 0.5f), Main.rand.NextFloat(12f, 25f), 0.2f, 1.4f + (EmpoweredHammer * 0.1f), 14);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
PulseCooldown = 0;
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
SoundEngine.PlaySound(SoundID.Item92, NuzzlePosition);
|
||||
SoundEngine.PlaySound(SoundID.Item60, NuzzlePosition);
|
||||
|
||||
Particle pulse = new DirectionalPulseRing(NuzzlePosition + Projectile.rotation.ToRotationVector2() * 5f, Vector2.Zero, color, new Vector2(0.5f, 1f), Projectile.rotation, 0.05f, 0.34f + Main.rand.NextFloat(0.3f), 30, false);
|
||||
Particle pulse = new DirectionalPulseRing(NuzzlePosition + Projectile.rotation.ToRotationVector2() * 5f, Vector2.Zero, color, new Vector2(0.5f, 1f), Projectile.rotation, 0.05f, 0.34f + Main.rand.NextFloat(0.3f), 30);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
|
||||
if (Owner == Main.LocalPlayer && Owner.Calamity().GeneralScreenShakePower < 5)
|
||||
|
||||
@@ -74,9 +74,9 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
dust2.scale = Main.rand.NextFloat(0.8f, 1.5f);
|
||||
}
|
||||
SoundEngine.PlaySound(ChargeImpact, Projectile.position);
|
||||
Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.Lime, new Vector2(2f, 2f), Main.rand.NextFloat(12f, 25f), 0.1f, 0.6f, 20, false);
|
||||
Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.Lime, new Vector2(2f, 2f), Main.rand.NextFloat(12f, 25f), 0.1f, 0.6f, 20);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
Particle pulse2 = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.Chartreuse, new Vector2(2f, 2f), Main.rand.NextFloat(12f, 25f), 0.1f, 0.5f, 16, false);
|
||||
Particle pulse2 = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.Chartreuse, new Vector2(2f, 2f), Main.rand.NextFloat(12f, 25f), 0.1f, 0.5f, 16);
|
||||
GeneralParticleHandler.SpawnParticle(pulse2);
|
||||
|
||||
for (int i = 0; i < 25; ++i)
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
PulseTimer = PrevPulseTimer * 2f;
|
||||
|
||||
Color pulseColor = Main.rand.NextBool() ? (Main.rand.NextBool() ? Color.SkyBlue : Color.LightSkyBlue) : (Main.rand.NextBool() ? Color.LightBlue : Color.DeepSkyBlue);
|
||||
Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, pulseColor, new Vector2(0.5f, 1f), Projectile.velocity.ToRotation(), 0.05f, 0.2f + 0.3f * (1 - Progress), 30, false);
|
||||
Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, pulseColor, new Vector2(0.5f, 1f), Projectile.velocity.ToRotation(), 0.05f, 0.2f + 0.3f * (1 - Progress), 30);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
|
||||
int numDust = 18;
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
// Spawn a ring particle based off charge percent to emphasize the impact
|
||||
float originalScale = 0.2f * ChargePercent;
|
||||
float maxScale = 1f * ChargePercent;
|
||||
Particle pulse = new DirectionalPulseRing(Owner.MountedCenter + direction * WeaponLength, Vector2.Zero, Color.White, new Vector2(0.5f, 1f), direction.ToRotation(), originalScale, maxScale, 30, false);
|
||||
Particle pulse = new DirectionalPulseRing(Owner.MountedCenter + direction * WeaponLength, Vector2.Zero, Color.White, new Vector2(0.5f, 1f), direction.ToRotation(), originalScale, maxScale, 30);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
|
||||
// Play a sound with volume scaling with charge percent
|
||||
|
||||
@@ -95,7 +95,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, 272, Projectile.oldVelocity.X * 0.3f, Projectile.oldVelocity.Y * 0.3f, 0, default, Main.rand.NextFloat(1.7f, 2.1f));
|
||||
}
|
||||
Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.Plum, new Vector2(2f, 2f), Main.rand.NextFloat(12f, 25f), 0.1f, 1f, 13, false);
|
||||
Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.Plum, new Vector2(2f, 2f), Main.rand.NextFloat(12f, 25f), 0.1f, 1f, 13);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,9 +37,9 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
{
|
||||
target.AddBuff(BuffID.OnFire3, 240);
|
||||
|
||||
Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.OrangeRed, new Vector2(2f, 2f), Main.rand.NextFloat(12f, 25f), 0f, Main.rand.NextFloat(0.8f, 1.1f), 20, false);
|
||||
Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.OrangeRed, new Vector2(2f, 2f), Main.rand.NextFloat(12f, 25f), 0f, Main.rand.NextFloat(0.8f, 1.1f), 20);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
Particle pulse2 = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.DarkOrange, new Vector2(2f, 2f), Main.rand.NextFloat(12f, 25f), 0f, Main.rand.NextFloat(0.6f, 0.9f), 20, false);
|
||||
Particle pulse2 = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, Color.DarkOrange, new Vector2(2f, 2f), Main.rand.NextFloat(12f, 25f), 0f, Main.rand.NextFloat(0.6f, 0.9f), 20);
|
||||
GeneralParticleHandler.SpawnParticle(pulse2);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user