mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
examples: fix v build-examples
This commit is contained in:
@ -137,7 +137,7 @@ struct Game {
|
||||
const ( fpath = os.resource_abs_path('../assets/fonts/RobotoMono-Regular.ttf') )
|
||||
|
||||
[if showfps]
|
||||
fn (game &Game) showfps() {
|
||||
fn (mut game Game) showfps() {
|
||||
game.frame++
|
||||
last_frame_ms := f64(game.frame_sw.elapsed().microseconds())/1000.0
|
||||
ticks := f64(game.second_sw.elapsed().microseconds())/1000.0
|
||||
@ -149,7 +149,7 @@ fn (game &Game) showfps() {
|
||||
}
|
||||
}
|
||||
|
||||
fn frame(game &Game) {
|
||||
fn frame(mut game Game) {
|
||||
game.frame_sw.restart()
|
||||
game.gg.begin()
|
||||
game.draw_scene()
|
||||
@ -301,7 +301,7 @@ fn (mut g Game) get_tetro() {
|
||||
}
|
||||
|
||||
// TODO mut
|
||||
fn (g &Game) drop_tetro() {
|
||||
fn (mut g Game) drop_tetro() {
|
||||
for i in 0..tetro_size{
|
||||
tetro := g.tetro[i]
|
||||
x := tetro.x + g.pos_x
|
||||
|
Reference in New Issue
Block a user