Class: Yuki::Animation::SignalWaiter

Inherits:
Player 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 included from Yuki::AnimationMixin

#player, #resolver

Instance Method Summary collapse

Methods inherited from Player

#animation_index, #done?, #duration, #first_start_time, #last_end_time, #parallel_add, #play, #resolver=, #root

Methods included from Yuki::AnimationMixin

#begin_offset_for_next_animation, #done?, #duration

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!)



867
868
# File 'docs/4_Systems_005_Animation.rb', line 867

def initialize(name = nil, *args, &block)
end

Instance Method Details

#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)


872
873
# File 'docs/4_Systems_005_Animation.rb', line 872

def start(begin_offset = 0)
end

#update

Update the animation



875
876
# File 'docs/4_Systems_005_Animation.rb', line 875

def update
end