Skip to content

Instantly share code, notes, and snippets.

@russelarms
Created May 28, 2017 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save russelarms/9d50b6fb60e7208b699500719b092be2 to your computer and use it in GitHub Desktop.
Save russelarms/9d50b6fb60e7208b699500719b092be2 to your computer and use it in GitHub Desktop.
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