Named Events
Last updated
Last updated
Named events can be used to perform custom logic at certain times in an animation. Since named events are created in Gum, the animator can align the performance of logic visually. For example, a Gum animation may be used to move components of a title screen into view. While this animation is playing the game may need to play sound effects and music at certain times. Named events can be used to play music and sound effects at certain times.
Named events can be added to animations in Gum in the animation window. To add a named event to an existing animation:
Select the animation
Click the Add Named Event button
Enter a name for the event
Select the event
Enter a time for the event
Gum animations have an AddAction method which can be used to add custom actions at certain times: For example, if the screen were accessible in code as GameScreenGumRuntime in a Glue screen, the MakeYellow named event could be reacted to as shown in the following code: