Module: MSK::Actions::Rotation
- Included in:
- MSK::ActionDSL
- Defined in:
- lib/project/actions/rotation.rb
Instance Method Summary collapse
- #rotate(angle, duration = 0.25) ⇒ Object
- #rotate_by(angle, duration = 0.25) ⇒ Object
- #rotate_shortest(angle, duration = 0.25, shortest = true) ⇒ Object
Instance Method Details
#rotate(angle, duration = 0.25) ⇒ Object
8 9 10 |
# File 'lib/project/actions/rotation.rb', line 8 def rotate(angle, duration=0.25) SKAction.rotateToAngle(angle, duration: duration) end |
#rotate_by(angle, duration = 0.25) ⇒ Object
4 5 6 |
# File 'lib/project/actions/rotation.rb', line 4 def rotate_by(angle, duration=0.25) SKAction.rotateBy(angle, duration: duration) end |
#rotate_shortest(angle, duration = 0.25, shortest = true) ⇒ Object
12 13 14 |
# File 'lib/project/actions/rotation.rb', line 12 def rotate_shortest(angle, duration=0.25, shortest=true) SKAction.rotateToAngle(angle, duration: duration, shortestUnitArc: shortest) end |