public void playScene(int sceneNumber) { Scene scene = scenes.get(sceneNumber); if (scene != null) { scene.setupScene(); processScene(scene); } }
public void nextScene() { if (currentSceneIndex < scenes.size() - 1) { currentSceneIndex++; Scene scene = scenes.get(currentSceneIndex); scene.setupScene(); processScene(scene); } else { // do it accurately! // may be I should add loopback mode? // after the last scene there should be the first? } }
public void previousScene() { if (currentSceneIndex > 0) { currentSceneIndex--; Scene scene = scenes.get(currentSceneIndex); scene.setupScene(); processScene(scene); } else { // we try to think what to do // some kind of exception or something? // how would it be in the javascript? } }