public final void startLevel() throws Exception { state = STATE_PLAY_LEVEL; for (int idx = 0; idx < myGameObjects.size; idx++) { final GameObject gameObject = (GameObject) myGameObjects.objects[idx]; gameObject.onStartLevel(); } }
public final void startGame() throws Exception { // #if DEBUG Log.debug("startGame"); // #endif state = STATE_SHOW_LEVEL_INFO; for (int idx = 0; idx < myGameObjects.size; idx++) { final GameObject gameObject = (GameObject) myGameObjects.objects[idx]; gameObject.onStartGame(); } }
public final void onInitialize(final GameSystem aGameSystem) throws Exception { state = STATE_INITIALIZED; EnemyBehavior.model = EnemyWeapon.model = Enemy.model = this; EnemyBehavior.engine = EnemyWeapon.engine = aGameSystem.engine; Enemy.timing = EnemyWeapon.timing = aGameSystem.timing; for (int idx = 0; idx < myGameObjects.size; idx++) { final GameObject gameObject = (GameObject) myGameObjects.objects[idx]; gameObject.onInitialize(aGameSystem, this); } soundExtra = aGameSystem.audio.loadSound("extra"); soundDebris = aGameSystem.audio.loadSound("debris"); }
public final void onControlTick() throws Exception { for (int idx = 0; idx < myGameObjects.size; idx++) { final GameObject gameObject = (GameObject) myGameObjects.objects[idx]; gameObject.onControlTick(); } }