Module: Metro::HasAnimations
- Included in:
- Scene
- Defined in:
- lib/metro/animation/has_animations.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
-
#animate(actor_or_actor_name, options, &block) ⇒ Object
(also: #change)
Define an animation from within another animation block, an event block or a method.
Class Method Details
.included(base) ⇒ Object
6 7 8 |
# File 'lib/metro/animation/has_animations.rb', line 6 def self.included(base) base.extend ClassMethods end |
Instance Method Details
#animate(actor_or_actor_name, options, &block) ⇒ Object Also known as: change
Define an animation from within another animation block, an event block or a method.
30 31 32 33 34 35 |
# File 'lib/metro/animation/has_animations.rb', line 30 def animate(actor_or_actor_name,,&block) [:actor] = actor(actor_or_actor_name) [:context] = self animation_group = SceneAnimation.build , &block enqueue animation_group end |