@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(); }
public BossD() { entityType = EntityType.BOSS; width = 20; height = 20; attackPower = 400; lifeStart = 170000; scriptInterpreter = new ScriptInterpreter(); scriptInterpreter.entity = this; rotationSpeedZ = new SmoothJoin(); rotationY = new SmoothJoin(); rotYShakeAmplitude = new SmoothJoin(); }
@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); }