import com.cult3d.*;
import com.cult3d.world.*;

public class JavaPS implements Cult3DScript
{
	private ParticleSystem ps;
	
	private static final String TEXTURE_NAME = "Banana";
	private static final String PARTICLE_NAME = "Particle";
	
	public JavaPS()
	{
		System.out.println("Will construct the Particle system class");
		ps = new ParticleSystem(PARTICLE_NAME);
		System.out.println("Successfully constructed the particle system");
	}
	
	public void setActive(String s)
	{
		ps.setActive(true);
	}
	
	public void setDeactive(String s)
	{
		ps.setActive(false);
	}
	
	public void isActive(String s)
	{
		System.out.println("is particle system active (true == yes): "+ps.isActive());
	}

	public void killParticle(String s)
	{
		ps.kill();
	}
	
	public void setTexture(String s)
	{
		System.out.println("Making a texture with name of "+TEXTURE_NAME);
		Texture tex = new Texture(TEXTURE_NAME);
		System.out.println("applies the texture on the particle system");
		ps.setTexture(tex);
	}
	
	public void getTexture(String s)
	{
		Texture tex = ps.getTexture();
		
		if (tex == null)
		{
			System.out.println("The texture on the particle system is null");
			return;
		}
		
		System.out.println("the texture on the particle system are "+tex.getName());
	}
	
	public void cult3dDestroy()
	{
	}
}
