Skip to content

Instantly share code, notes, and snippets.

@ongaeshi
Last active May 13, 2021 09:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ongaeshi/5502859069317c709394f6cbc21ac002 to your computer and use it in GitHub Desktop.
Save ongaeshi/5502859069317c709394f6cbc21ac002 to your computer and use it in GitHub Desktop.
# SceneClipの例
script do |root|
draw_background
# Scene1
root.scene_script do |scene|
# SceneClipが生成される(scene)
t = scene.text(10, 10)
t.text("HI")
# SceneClipは終了時に全てのクリップが消えるので、
# until_timeを使って待ち合わせする。
# root.until_timeの場合はグローバル時間になる(どっちがいいのかな?)
scene.until_time 3
end
# SceneClipが終了するまでは次のコードは実行されない。
# Scene2
script(root) do |scene|
t = scene.text(10, 10)
t.text("HI")
end
# でもrootは消えて欲しくないなぁ
# ※ もしくはrootの最終時間をApp.end_timeにしたい
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment