Game Development Reference
In-Depth Information
In this instance, it's an easy fix, just select the
logoAndButtons
node and change its posi-
tion to 50%x50%. Since you have the loop animation selected, this position change will
not affect the
logoAndButtons
position in the entry Timeline.
Change the Timeline duration as described earlier, and make it 2 seconds long. Then, for
both the
play
and
settings
sprites, do the following:
1.
Select the sprite node (
play
or
settings
).
2.
Move the Timeline Cursor to the far left.
3.
Press R to create a Rotation keyframe.
4.
Move the Timeline Cursor to the far right.
5.
Press R to create another Rotation keyframe.
6.
Change the value for the
Rotation
property to
360
. This applies the value to
the rightmost keyframe.
Play the animation. Notice how the sprites rotate. Also notice how the labels rotate with
their parent sprites. Argh. Perhaps, on second thought, it wasn't such a good idea to make
the labels child nodes of the play and settings sprites?
Not quite. You could still apply a trick: if you play the same animation of a parent node on
the child node, but backwards, the two animations will cancel each other out! So if you
rotate each label in the opposite direction of their parent sprites, they will stop rotating!
Try this for both labels:
1.
Select the label of the sprite node (
play
or
settings
).
2.
Move the Timeline Cursor to the far left.
3.
Press R to create a Rotation keyframe.
4.
Change the value for the
Rotation
property to
360
. This applies the value to
the leftmost keyframe.
5.
Move the Timeline Cursor to the far right.
6.
Press R to create another Rotation keyframe.
7.
Change the value for the
Rotation
property to
0
. This applies the value to the
rightmost keyframe.
The result is that the sprites now rotate clockwise while their child labels rotate counter-
clockwise. Since both animations start and stop at the same time, and both animate a full
Search WWH ::
Custom Search