All Downloads are FREE. Search and download functionalities are using the official Maven repository.

games.rednblack.editor.renderer.data.ParticleEffectVO Maven / Gradle / Ivy

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;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy