Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
private void initSteps() {
scene.page(0).step(0)
.createAnimation(ocean.getY(), ocean.getY() - dipToPx(120))
.setDuration(0.8f)
.setListener(value -> ocean.setY(value));
scene.page(0).step(1)
.createAnimation(fishLeft.getX(), fishLeft.getX() + dipToPx(160))
.setDuration(0.3f)
.setStartThreshold(0.5f)
.setListener(value -> fishLeft.setX(value));
scene.page(0).step(2)
.createAnimation(fishRight.getX(), fishRight.getX() - dipToPx(160))
.setDuration(0.5f)
.setStartThreshold(0.3f)
.setListener(value -> fishRight.setX(value));
scene.page(0).step(3)
.createAnimation(fishLeftBottom.getY(), fishLeftBottom.getY() - screenDimensions.y / 2)
.setListener(value -> fishLeftBottom.setY(value));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.