Class: Chingu::AsyncTasks::Move
- Inherits:
-
Tween
- Object
- Chingu::Async::BasicTask
- Tween
- Chingu::AsyncTasks::Move
- Defined in:
- lib/chingu/async_tasks/move.rb
Overview
Syntactic sugar for tween(duration, :x => x, :y => y, :angle => angle)
Instance Method Summary collapse
-
#initialize(duration, x, y, angle = nil) ⇒ Move
constructor
A new instance of Move.
Methods inherited from Tween
Methods inherited from Chingu::Async::BasicTask
Constructor Details
#initialize(duration, x, y, angle = nil) ⇒ Move
Returns a new instance of Move
32 33 34 35 36 37 38 39 40 |
# File 'lib/chingu/async_tasks/move.rb', line 32 def initialize(duration, x, y, angle = nil) properties = { } properties[:x] = x unless x.nil? properties[:y] = y unless y.nil? properties[:angle] = angle unless angle.nil? super(duration, properties) end |