Class: Yuki::Animation::TimedLoopAnimation

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

Overview

Note:

This kind of animation is not designed for object creation, please refrain from creating objects inside those kind of animations.

Class responsive of making “looped” animation

This class works exactly the same as TimedAnimation putting asside it’s always done and will update its sub/parallel animations. When the loop duration is reached, it restart all the animations with the apprioriate offset.

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, #initialize, #parallel_add, #play_before, #resolver=

Constructor Details

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

Instance Method Details

#done?Boolean

Looped animations are always done

Returns:

  • (Boolean)


121
122
# File 'docs/4_Systems_005_Animation.rb', line 121

def done?
end

#start(begin_offset = 0)

Start the animation but without sub_animation bug (it makes no sense that the sub animation start after a looped animation)

Parameters:

  • begin_offset (Float) (defaults to: 0)

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



118
119
# File 'docs/4_Systems_005_Animation.rb', line 118

def start(begin_offset = 0)
end

#update

Update the looped animation



113
114
# File 'docs/4_Systems_005_Animation.rb', line 113

def update
end