Clean up all projectile code.
This commit is contained in:
@@ -40,11 +40,10 @@ public class TheSpinningRainbow : ModProjectile
|
||||
SoundEngine.PlaySound(SoundID.Dig, Projectile.position);
|
||||
Vector2 position = Projectile.position;
|
||||
Vector2 rotVector = Utils.ToRotationVector2(Projectile.rotation - MathHelper.ToRadians(90f));
|
||||
_ = position + rotVector * 16f;
|
||||
int item = 0;
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient && item >= 0)
|
||||
{
|
||||
NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0);
|
||||
NetMessage.SendData(MessageID.KillProjectile);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,20 +51,19 @@ public class TheSpinningRainbow : ModProjectile
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>(), 0f, 0f, 0, default, 1f);
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>(), 0f, 0f, 0, default, 1f);
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>(), 0f, 0f, 0, default, 1f);
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust>());
|
||||
Main.dust[dust1].scale = 1f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
|
||||
int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust2>());
|
||||
Main.dust[dust2].scale = 1f;
|
||||
Dust obj2 = Main.dust[dust2];
|
||||
obj2.velocity *= 0.1f;
|
||||
Main.dust[dust2].velocity *= 0.1f;
|
||||
Main.dust[dust2].noGravity = true;
|
||||
|
||||
int dust3 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.RainbowDust3>());
|
||||
Main.dust[dust3].scale = 1f;
|
||||
Dust obj3 = Main.dust[dust3];
|
||||
obj3.velocity *= 0.1f;
|
||||
Main.dust[dust3].velocity *= 0.1f;
|
||||
Main.dust[dust3].noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user