Class: Yuki::Animation::SignalWaiter

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

Overview

Animation that wait for a signal in order to start the sub animation

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 Command

#update

Methods inherited from TimedAnimation

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

Constructor Details

#initialize(name = nil, *args, &block) ⇒ SignalWaiter

Create a new SignalWaiter

Parameters:

  • name (Symbol) (defaults to: nil)

    name of the block in resolver to call to know if the signal is there

  • args (Array)

    optional arguments to the block

  • block (Proc)

    if provided, name will be ignored and this block will be used (it prevents this animation from being savable!)



627
628
# File 'docs/4_Systems_005_Animation.rb', line 627

def initialize(name = nil, *args, &block)
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



631
632
# File 'docs/4_Systems_005_Animation.rb', line 631

def start(begin_offset = 0)
end