Skip to content

Instantly share code, notes, and snippets.

@shawn42
Created January 6, 2015 02:14
Show Gist options
  • Save shawn42/429f702089c835ff3282 to your computer and use it in GitHub Desktop.
Save shawn42/429f702089c835ff3282 to your computer and use it in GitHub Desktop.
tween usage in gamebox
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