Animating the menu screen
Let's now discuss what we are actually going to animate in the menu screen. Basically, the first two bits of our animated menu involve the gold coins and the large bunny head.
Take a look at the following screenshot:
In this screenshot, you can see a rough sketch of the final animation divided into four essential steps. The following actions need to be taken for the shown steps:
- The gold coins and bunny head are invisible at the beginning.
- The gold coins fade in and scale up from 0 percent to 100 percent from the center screen as if they were jumping out of the water.
- After a short pause, the bunny head appears in the top-right corner, which moves slightly until it reaches the edge of the rock that is visible in the background.
- The bunny head moves as if it was jumping over to the other rock in front of it.
Animating the gold coins and bunny head actors
Add the following (static) import lines to the MenuScreen
class:
import static com.badlogic.gdx.scenes.scene2d.actions...