feud.testgame.view
Class ParticleManager

java.lang.Object
  extended byfeud.testgame.view.ParticleManager

public class ParticleManager
extends java.lang.Object

A simple manager for particles. I wouldn't call it a "system" for now...


Constructor Summary
ParticleManager(com.threed.jpct.World level)
          Creates a new particle manager with a default number of particles (100).
ParticleManager(com.threed.jpct.World level, int max)
          Creates a new particle manager for a number of particles.
 
Method Summary
 void addParticle(com.threed.jpct.SimpleVector pos, com.threed.jpct.SimpleVector vel, float limit, long time, java.lang.String texture)
          Adds a new particle to the manager.
 void addParticle(com.threed.jpct.SimpleVector pos, com.threed.jpct.SimpleVector vel, float limit, java.lang.String texture)
          Adds a new particle to the manager.
 void addParticle(com.threed.jpct.SimpleVector pos, com.threed.jpct.SimpleVector vel, long time, java.lang.String texture)
          Adds a new particle to the manager.
 void move(long ticks)
          Moves all particles manmaged by this manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParticleManager

public ParticleManager(com.threed.jpct.World level)
Creates a new particle manager with a default number of particles (100).

Parameters:
level - World the world

ParticleManager

public ParticleManager(com.threed.jpct.World level,
                       int max)
Creates a new particle manager for a number of particles.

Parameters:
level - World the world
max - int the number of particles
Method Detail

move

public void move(long ticks)
Moves all particles manmaged by this manager.

Parameters:
ticks - long the number of ticks passed since the last call

addParticle

public void addParticle(com.threed.jpct.SimpleVector pos,
                        com.threed.jpct.SimpleVector vel,
                        float limit,
                        java.lang.String texture)
Adds a new particle to the manager. If the maximum number of active, visible particles have been reached, nothing happens. This method is for adding a particle that it limited in y-direction but not in time.

Parameters:
pos - SimpleVector the position
vel - SimpleVector the velocity
limit - float the y-limit
texture - String the texture's name

addParticle

public void addParticle(com.threed.jpct.SimpleVector pos,
                        com.threed.jpct.SimpleVector vel,
                        long time,
                        java.lang.String texture)
Adds a new particle to the manager. If the maximum number of active, visible particles have been reached, nothing happens. This method is for adding a particle that it in time but not in y-direction.

Parameters:
pos - SimpleVector the position
vel - SimpleVector the velocity
time - long the life time
texture - String the texture's name

addParticle

public void addParticle(com.threed.jpct.SimpleVector pos,
                        com.threed.jpct.SimpleVector vel,
                        float limit,
                        long time,
                        java.lang.String texture)
Adds a new particle to the manager. If the maximum number of active, visible particles have been reached, nothing happens. The particle will be limited in time and y-direction.

Parameters:
pos - SimpleVector the position
vel - SimpleVector the velocity
limit - float the y-limit
time - long the time-limit
texture - String the texture's name