예제 #1
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");
  }