Class: Yuki::Animation::Command

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

Overview

Note:

This class inherit from TimedAnimation to allow composition with it but it overwrite some components

Note:

Animation inheriting from this class has a update_internal with no parameters!

Class executing commands for animations (takes 0 seconds to proceed and then needs no time information)

Instance Attribute Summary

Attributes inherited from TimedAnimation

#begin_time, #end_time, #time_source

Attributes included from Yuki::AnimationMixin

#player, #resolver

Instance Method Summary collapse

Methods inherited from TimedAnimation

#done?, #parallel_add, #play_before

Methods included from Yuki::AnimationMixin

#begin_offset_for_next_animation, #done?

Constructor Details

#initialize ⇒ Command

Create a new Command



579
580
# File 'docs/4_Systems_005_Animation.rb', line 579

def initialize
end

Instance Method Details

#duration ⇒ Float

Get the animation duration in seconds

Returns:

  • (Float)


593
594
# File 'docs/4_Systems_005_Animation.rb', line 593

def duration
end

#start(_begin_offset = 0) ⇒ self

Start the animation (initialize it)

Parameters:

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

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

Returns:

  • (self)


584
585
# File 'docs/4_Systems_005_Animation.rb', line 584

def start(_begin_offset = 0)
end

#update ⇒ self

Note:

should always be called after start

Update the animation internal time and call update_internal with no parameter

Returns:

  • (self)


589
590
# File 'docs/4_Systems_005_Animation.rb', line 589

def update
end