Skip to content

Commit

Permalink
respawn on game start to give off particles
Browse files Browse the repository at this point in the history
  • Loading branch information
Arinerron committed Mar 31, 2017
1 parent 7f061ec commit e4015e3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/game/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,8 @@ else if(yacceleration < -speed)

particlecount = particles.size();
}}, 1000, 1000);

respawn();
}

// sets a spawn point and logs it
Expand Down Expand Up @@ -604,9 +606,9 @@ public void respawn() {
java.util.List<Particle> particles = Particle.randomlySpread(this, x + half, y + half, Color.GREEN, 600, 80);

for(Particle particle : particles) {
particle.xacceleration = (Math.random() - 0.5) / 10;
particle.yacceleration = (Math.random() - 0.5) / 10;
particle.lifetime = (int)(Math.random() * 400);
particle.xacceleration = (Math.random() - 0.5) / 4;
particle.yacceleration = (Math.random() - 0.5) / 4;
particle.lifetime = (int)(Math.random() * 150);
particle.front = random.nextBoolean();

this.particles.add(particle);
Expand Down

0 comments on commit e4015e3

Please sign in to comment.