adding sprite renderer to the pickups
This commit is contained in:
@@ -14,7 +14,7 @@ public class BulletFreezeRemove : Pickup
|
||||
public override void OnPickup()
|
||||
{
|
||||
//hide renderer
|
||||
GetComponent<MeshRenderer>().enabled = false;
|
||||
GetComponent<SpriteRenderer>().enabled = false;
|
||||
GetComponent<Collider>().enabled = false;
|
||||
Debug.Log("Start thingy");
|
||||
//find all particles in the scene and freeze them
|
||||
|
||||
@@ -12,12 +12,15 @@ public class Extinguisher : Pickup
|
||||
|
||||
public override void OnPickup()
|
||||
{
|
||||
//hide renderer
|
||||
GetComponent<SpriteRenderer>().enabled = false;
|
||||
GetComponent<Collider>().enabled = false;
|
||||
|
||||
ParticleSystem particleSystem = player.trail.GetComponent<ParticleSystem>();
|
||||
|
||||
int particleCount = particleSystem.particleCount;
|
||||
ParticleSystem.Particle[] particles = new ParticleSystem.Particle[particleCount];
|
||||
particleSystem.GetParticles(particles);
|
||||
|
||||
|
||||
for (int i = 0; i < particleCount; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user