Class: Yuki::Animation::FullyResolvedAnimation

Inherits:
TimedAnimation show all
Defined in:
docs/01500_Yuki.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

root_anim = Yuki::Animation.create_sprite(:viewport, :sprite, Sprite)
resolved_animation = Yuki::Animation.resolved
root_anim.play_before(resolved_animation)
resolved_animation.play_before(...)
resolved_animation.play_before(...)
resolved_animation.parallel_play(...)
root_anim.play_before(Yuki::Animation.dispose_sprite(:sprite))

Instance Attribute Summary

Attributes inherited from TimedAnimation

#begin_time, #end_time, #parallel_animations, #root, #sub_animation, #time_source

Instance Method Summary collapse

Methods inherited from TimedAnimation

#in_parallel_of, #parallel_add, #play_before, #resolver=

Constructor Details

#initializeFullyResolvedAnimation

Create a new fully resolved animation



1570
1571
# File 'docs/01500_Yuki.rb', line 1570

def initialize
end

Instance Method Details

#done?Boolean

Tell if the animation is done

Returns:

  • (Boolean)


1579
1580
# File 'docs/01500_Yuki.rb', line 1579

def done?
end

#start(begin_offset = 0)

Start the animation (initialize it)

Parameters:

  • begin_offset (Float) (defaults to: 0)

    offset that prevents the animation from starting before now + begin_offset seconds



1575
1576
# File 'docs/01500_Yuki.rb', line 1575

def start(begin_offset = 0)
end

#timed_animation_start



1572
# File 'docs/01500_Yuki.rb', line 1572

alias timed_animation_start start

#update

Note:

should always be called after start

Update the animation internal time and call update_internal with a parameter between 0 & 1 indicating the progression of the animation



1584
1585
# File 'docs/01500_Yuki.rb', line 1584

def update
end