Tweener Sample Level
Tweener Sample Level
You can use the Samples Project to see an example level that uses tweeners.
To see example Scripted Entity Tweeners in action
In Lumberyard Editor, in the Samples Project, open the level
Samples\ScriptedEntityTweenerSample\SampleFullscreenAnimation
.To switch to gameplay mode, press Ctrl+G. The header, list items, earth, stars, and spaceship use tweeners for their animation.
Press Esc to exit.
To view the sample UI canvas
Open the UI Editor.
Choose File, Open Canvas.
Navigate to the
lumberyard_version\dev\SamplesProject\UI\Canvases\ScriptedEntityTweenerSample
directory and then selectMenuAnimateInSample.uicanvas
.
To view the sample Lua Script with the tweener code
In the Hierarchy pane, select MenuSample.
In the Properties pane, under the Lua Script component, for Script, click the { } icon. This opens the
samplescreenanimation
script in the Lua Editor.See how the script uses the listed parameters. For a complete list of parameters, see Tweener Parameters.
Try the following:
- Modify the value of the
easeMethod
parameter, especially on the blocks that includeid = self.Properties.CharacterImage
, which represent the spaceship. - Increase or decrease the
duration
parameter. - Change the starting position [“x”] and [“y”].
- Modify the value of the
Save your changes and close the Lua Editor.
In the UI Editor, click Preview in the upper right to see how your changes affect the game UI.