Class: Yuki::Animation::FullyResolvedAnimation

Inherits:
Player show all
Defined in:
docs/4_Systems_005_Animation.rb

Overview

Note:

The play command of all animation played before resolved animation will be called after all previous animation were called. It's a good practice not to put something else than dispose command after a fully resolved animation.

Class that help to handle animations that depends on sprite creation commands

Examples:

Create a fully resolved animation

resolved_animation = Yuki::Animation.resolved(anim1, anim2, ...)
root_anim = Yuki::Animation.player(
   Yuki::Animation.create_sprite(:viewport, :sprite, Sprite),
   resolved_animation, # <= Will not start until update is called once
   Yuki::Animation.dispose_sprite(:sprite)
)

Instance Attribute Summary

Attributes included from Yuki::AnimationMixin

#player, #resolver

Instance Method Summary collapse

Methods inherited from Player

#animation_index, #duration, #first_start_time, #initialize, #last_end_time, #parallel_add, #play, #resolver=, #root

Methods included from Yuki::AnimationMixin

#begin_offset_for_next_animation, #duration

Constructor Details

This class inherits a constructor from Yuki::Animation::Player

Instance Method Details

#done? ⇒ Boolean

Check if the animation is done

Returns:

  • (Boolean)


848
849
# File 'docs/4_Systems_005_Animation.rb', line 848

def done?
end

#start(begin_offset = 0) ⇒ self

Start the animation

Parameters:

  • begin_offset (Float) (defaults to: 0) —

    offset for starting the animation (added to animation's clock)

Returns:

  • (self)


844
845
# File 'docs/4_Systems_005_Animation.rb', line 844

def start(begin_offset = 0)
end

#update ⇒ self

Update the animation

Returns:

  • (self)


852
853
# File 'docs/4_Systems_005_Animation.rb', line 852

def update
end