예제 #1
0
 public void updateFPS() {
   if (getTime() - lastFPS > 1000) {
     Display.setTitle(
         "Particle World, FPS: " + fps + " Particles: " + particleSystem.getParticlesAmount());
     fps = 0;
     lastFPS += 1000;
   }
   fps++;
 }
예제 #2
0
  public void start() {
    createDisplay();
    lastFPS = getTime();

    particleSystem = CurrentSystem.currentSystem;
    particleSystem.init();

    loop();
  }
예제 #3
0
 private void removeParticles(int amount) {
   particleSystem.requestRemoveParticles(amount);
 }
예제 #4
0
 private void run() {
   keyboardHandler();
   drawBackground();
   particleSystem.update();
 }
예제 #5
0
 private void addParticles(int amount) {
   particleSystem.requestNewParticles(amount);
 }