Ejemplo 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();
    }
  }
Ejemplo 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();
    }
  }
Ejemplo 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");
  }
Ejemplo 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();
   }
 }