We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0210567 commit 77a9e6eCopy full SHA for 77a9e6e
examples/breakout/breakout.v
@@ -2,6 +2,7 @@ import gg
2
import gx
3
import math
4
import rand
5
+import time
6
import sokol.audio
7
import os.asset
8
import sokol.sgl
@@ -295,8 +296,15 @@ fn main() {
295
296
height: g.height
297
window_title: 'V Breakout'
298
sample_count: 2
299
+ init_fn: fn (mut g Game) {
300
+ spawn fn (mut g Game) {
301
+ for {
302
+ g.update()
303
+ time.sleep(16666 * time.microsecond)
304
+ }
305
+ }(mut g)
306
307
frame_fn: fn (mut g Game) {
- g.update()
308
g.draw()
309
}
310
click_fn: fn (x f32, y f32, btn gg.MouseButton, mut g Game) {
0 commit comments