Esempio n. 1
0
  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();
    }
  }
Esempio n. 2
0
  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();
    }
  }
Esempio n. 3
0
  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");
  }
Esempio n. 4
0
 public final void onControlTick() throws Exception {
   for (int idx = 0; idx < myGameObjects.size; idx++) {
     final GameObject gameObject = (GameObject) myGameObjects.objects[idx];
     gameObject.onControlTick();
   }
 }