Cursor animations10/17/2023 Store a duration time used in this example (for defining how long the cursor animation should take) in self reference.ģ. Any input will be received in the `on_input()` function.Ģ. Tell the engine that this object ("." is shorthand for the current game object) should listen to input. Go.animate("#sprite", "cursor", go.PLAYBACK_LOOP_FORWARD, 1, go.EASING_LINEAR, self.duration) - ġ. ![]() Go.cancel_animations("#sprite", "cursor"). t_text("#info", "Cursor animation duration: ".self.duration). If action_id = hash("touch") and action.pressed then. Get the current value on component "sprite"įunction on_input(self, action_id, action) The game object contains the script that sets and animates the normalized cursor value making the sprite’s animation progress and shows the duration value on the label: ![]() The example uses one game object with a sprite component and a label (to show the duration).
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |