Hi all. I know Marte Engine is discontinued but I already started a project with it and its too late for me to switch to another engine before I finish this project. My question is about the ParticlesEntity class - I create a class that extends it and then I add the entity in the level World but its not showing anywhere. Do I have to use the old way to build particle systems like in slick2d?
here is my code:
public class Effect extends ParticlesEntity {
public Effect(float x, float y, Image particle, ConfigurableEmitter emitter) {
super(x, y, particle, emitter);
// TODO Auto-generated constructor stub
this.depth = 150;
}
@Override
public void update(GameContainer container, int delta)
throws SlickException {
// TODO Auto-generated method stub
super.update(container, delta);
}
@Override
public void render(GameContainer container, Graphics g)
throws SlickException {
// TODO Auto-generated method stub
super.render(container, g);
}
}
=========
in the level class (extends World)=================
// PARTICLES
File xmlFile = new File("data/healing.xml");
try {
ConfigurableEmitter emitter = ParticleIO.loadEmitter(xmlFile);
emitter.setEnabled(true);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
System.out.println("particle config file not found/ cant be accessed");
}
particle = new Image("data/plus.png");
add(new Effect(200, 200, particle, emitter));