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, #parallel_animations, #root, #sub_animation, #time_source

Instance Method Summary collapse

Methods inherited from TimedAnimation

#done?, #in_parallel_of, #parallel_add, #play_before, #resolver=

Constructor Details

#initializeCommand

Create a new Command



363
364
# File 'docs/4_Systems_005_Animation.rb', line 363

def initialize
end

Instance Method Details

#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



367
368
# File 'docs/4_Systems_005_Animation.rb', line 367

def start(begin_offset = 0)
end

#update

Note:

should always be called after start

Update the animation internal time and call update_internal with no parameter



371
372
# File 'docs/4_Systems_005_Animation.rb', line 371

def update
end