Class: Yuki::Animation::ResolverObjectCommand

Inherits:
Command show all
Defined in:
scripts/01100 Yuki/00100 Animation/00101 Commands.rb

Overview

Animation command that sends a message to an object in the resolver

Example :

ResolverObjectCommand.new(:star1, :set_position, 0, 0)
# This will call set_position(0, 0) on the star1 object in the resolver

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

#start, #update

Methods inherited from TimedAnimation

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

Constructor Details

#initialize(name, command, *args) ⇒ ResolverObjectCommand

Create a new ResolverObjectCommand

Parameters:

  • name (Symbol)

    name of the object in the resolver

  • command (Symbol)

    name of the method to call

  • args (Array)

    arguments to send to the method



194
195
196
197
198
199
# File 'scripts/01100 Yuki/00100 Animation/00101 Commands.rb', line 194

def initialize(name, command, *args)
  super()
  @name = name
  @command = command
  @args = args
end