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

/**
  * Example class to show a custom progressbar
  * Works with or without Java.
  * See the comments in the example project.
  *
  */
public class Example implements Cult3DScript, Runnable
{
	private Texture texture;

	public Example()
	{
		new Thread(this).start();
	}

	public void run()
	{
		System.out.println("Loading Data, please wait...");
		// Tell the project that Java is installed and happy....
		new CultEvent("JavaStarted").trigger();

		texture = new Texture("BigTexture");
		
		// -- For demonstrating purpose only. Start
		try
		{
			Thread.currentThread().sleep(3000);
		}
		catch (InterruptedException e)
		{
		}
		// -- For demonstrating purpose only. End

		// Tell the project that Java is done loading.....
		System.out.println("Notifying about finished loading");
		new CultEvent("JavaFinishedLoading").trigger();
		System.out.println("Finished loading");
	}

	public void cult3dDestroy()
	{
	}
}


