示例#1
0
 @Override
 public void toInitValues() {
   super.toInitValues();
   scale = 4.0f;
   scriptInterpreter.resetState();
   rotationSpeedZ.init(0f);
   rotationY.init(0f);
   rotYShakeAmplitude.init(0f);
   rotationY.setInterpolator(Interpolator.ASYMPTOTIC);
   elapsed = 0f;
   reflectAttack = false;
   setReflectAttack(false);
 }
示例#2
0
  @Override
  public void update() {
    rotationSpeedZ.update();
    rotationY.update();
    rotYShakeAmplitude.update();

    // rotationSpeedZ.setTarget(0, 2f);

    rotationSpeed = rotationSpeedZ.get();

    super.update();
    elapsed += Timer.delta;
    scriptInterpreter.updateRunScript();

    // rotZ  = 30f;
    rotY =
        rotationY.get()
            + MathUtil.getCyclicValue(
                -rotYShakeAmplitude.get(), rotYShakeAmplitude.get(), 2f * elapsed);

    if (rotY > 45) {
      width = 25;
      height = 40;
    } else {
      width = height = 40;
    }
    this.bakeDimensions();
  }
示例#3
0
 public void setInitialConfig() {
   rotationSpeedZ.setTarget(0, 1f);
   rotationSpeed = 0f;
   rotZ = 90;
 }