示例#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();
    }
  }
示例#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();
    }
  }
示例#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");
  }
示例#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();
   }
 }