Skip to content
JulGame Docs
GitHub

force_frame_update(Animator)

Updates the sprite crop of the animator to the specified frame index.

Properties

ParameterDescription
thisThe animator object
animationsAn array of Animations.

Example

    animations = [Animation([Math.Vector4(0,0,16,16), Math.Vector4(0,17,16,16)], 60)] # creating an animation with two `Vector4` frames, running at 60 fps
    animator = Animator(animations) # creating an animator, and associating the previously created animation with it
    force_frame_update(animator, 1) # forces the animation to be at frame 1