Fix main loop, add example and cleanup
This commit is contained in:
+6
-2
@@ -1,4 +1,4 @@
|
||||
app = App.new 400, 400, title: "Button Test"
|
||||
App.run 400, 400, title: "Button Test"
|
||||
|
||||
main_scene = Scene.new
|
||||
|
||||
@@ -15,7 +15,11 @@ rect.on_click do
|
||||
0xFF0000
|
||||
end
|
||||
|
||||
main_scene.update do |dt|
|
||||
puts "Delta time: #{dt}ms"
|
||||
end
|
||||
|
||||
main_scene << text
|
||||
main_scene << rect
|
||||
|
||||
app.start main_scene
|
||||
App.start main_scene
|
||||
Reference in New Issue
Block a user