|
Here's a listing of this simple class:
// Beach.java
import linguist.quickshow.*;
public class Beach extends Actor
{
Beach(Stage stage)
{
super(stage,"Beach");
}
public void run()
{
loadImage("gif/D1-Beach.gif");
show();
setReady();
}
}
The Beach class is a subclass of Actor. Since it's only the backdrop there's not much
for it to do, so it's correspondingly simple. It loads its graphic, displays it and informs the system that it's
ready. This last step is essential for the QuickShow messaging system to work,
as it prevents messages being sent too early. Unless you setReady() the whole
thing will wait forever.
|