games.rednblack.editor.renderer.data.ParticleEffectVO Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of runtime-libgdx Show documentation
Show all versions of runtime-libgdx Show documentation
HyperLap2D libGDX runtime to render exported scenes
The newest version!
package games.rednblack.editor.renderer.data;
import com.artemis.World;
import games.rednblack.editor.renderer.components.particle.ParticleComponent;
import games.rednblack.editor.renderer.factory.EntityFactory;
import games.rednblack.editor.renderer.utils.ComponentRetriever;
public class ParticleEffectVO extends MainItemVO {
public String particleName = "";
public boolean transform = true;
public boolean autoStart = true;
public ParticleEffectVO() {
super();
}
public ParticleEffectVO(ParticleEffectVO vo) {
super(vo);
particleName = vo.particleName;
transform = vo.transform;
autoStart = vo.autoStart;
}
@Override
public void loadFromEntity(int entity, World engine, EntityFactory entityFactory) {
super.loadFromEntity(entity, engine, entityFactory);
ParticleComponent particleComponent = ComponentRetriever.get(entity, ParticleComponent.class, engine);
particleName = particleComponent.particleName;
transform = particleComponent.transform;
autoStart = particleComponent.autoStart;
}
@Override
public String getResourceName() {
return particleName;
}
}