示例#1
0
 @Override
 public void update(float deltaTime) {
   super.update(deltaTime);
   if (lineIndex == 0 && !missionLine.isPlaying()) {
     missionLine.play(mediaPlayer);
     lineIndex++;
   }
   if (cougar != null) {
     dance(deltaTime);
   }
 }
示例#2
0
 @Override
 public void activate() {
   initGl();
   missionText =
       computeTextDisplay(
           game.getGraphics(),
           missionLine.getText(),
           50,
           200,
           800,
           40,
           AliteColors.get().mainText(),
           Assets.regularFont,
           false);
   targetDeltaX =
       Math.random() < 0.5
           ? (float) Math.random() * 2.0f + 2.0f
           : -(float) Math.random() * 2.0f - 2.0f;
   targetDeltaY =
       Math.random() < 0.5
           ? (float) Math.random() * 2.0f + 2.0f
           : -(float) Math.random() * 2.0f - 2.0f;
   targetDeltaZ =
       Math.random() < 0.5
           ? (float) Math.random() * 2.0f + 2.0f
           : -(float) Math.random() * 2.0f - 2.0f;
   lastChangeTime = System.nanoTime();
 }