Created
January 6, 2015 02:14
-
-
Save shawn42/429f702089c835ff3282 to your computer and use it in GitHub Desktop.
tween usage in gamebox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define_stage :demo do | |
requires :tween_manager | |
curtain_up do | |
@player = spawn :player, x: 10, y:30 | |
tween = tween_manager.tween_properties @player, {x: 600, y:750}, 6_000, Tween::Sine::InOut | |
# tweens can be canceled if need be, or they will clean themselves up when finished | |
timer_manager.add_timer :foo, 3_000, false do | |
tween.cancel! | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment