Clean up all projectile code.
This commit is contained in:
@@ -42,8 +42,7 @@ public class SorcerousStaffProj : ModProjectile
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
{
|
||||
Projectile projectile = Projectile;
|
||||
projectile.penetrate--;
|
||||
Projectile.penetrate--;
|
||||
if (Projectile.penetrate <= 0)
|
||||
{
|
||||
Projectile.Kill();
|
||||
@@ -59,8 +58,7 @@ public class SorcerousStaffProj : ModProjectile
|
||||
{
|
||||
Projectile.velocity.Y = 0f - oldVelocity.Y;
|
||||
}
|
||||
Projectile projectile2 = Projectile;
|
||||
projectile2.velocity *= 0.75f;
|
||||
Projectile.velocity *= 0.75f;
|
||||
SoundEngine.PlaySound(SoundID.Item27, Projectile.position);
|
||||
}
|
||||
return false;
|
||||
@@ -70,11 +68,10 @@ public class SorcerousStaffProj : ModProjectile
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
int dust1 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.SorcerousDust>(), 0f, 0f, 0, default, 1f);
|
||||
Main.dust[dust1].scale = 0.9f;
|
||||
Dust obj = Main.dust[dust1];
|
||||
obj.velocity *= 0.1f;
|
||||
Main.dust[dust1].noGravity = true;
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, ModContent.DustType<Dusts.SorcerousDust>());
|
||||
Main.dust[dust].scale = 0.9f;
|
||||
Main.dust[dust].velocity *= 0.1f;
|
||||
Main.dust[dust].noGravity = true;
|
||||
}
|
||||
SoundEngine.PlaySound(SoundID.Item27, Projectile.position);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user