Theater
Method Details
play
public static void play(Scene[] scene)
Plays a 1D array of Scene
objects, generating an animation and presenting it in Java Lab. There can be only one call to play()
or playScenes()
per execution of a program.
Parameters
Name | Type | Description |
---|---|---|
scene | Scene[] | the |
Examples
Scene[] myScenes = {firstScene, secondScene};
Theater.play(myScenes);
playScenes
public static void playScenes(Scene scene)
Plays the Scene
object provided, generating an animation and displaying it in Java Lab. There can be only one call to play()
or playScenes()
per execution of a program.
Parameters
Name | Type | Description |
---|---|---|
scenes | Scene | a |
Examples
Scene myScene = new Scene();
Theater.playScenes(myScene);
playScenes
public static void playScenes(Scene... scenes)
Plays all Scene
objects provided as parameters to this call. This method uses a special feature of Java that allows for any number of Scene
objects to be passed to the method without requiring an array to be created. There can be only one call to play()
or playScenes()
per execution of a program.
Parameters
Name | Type | Description |
---|---|---|
scenes | Scene | one or more |
Examples
Theater.playScenes(myFirstScene, mySecondScene, myThirdScene);