1
0
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:
Delyan Angelov
2020-07-24 13:29:47 +03:00
parent 5acc437367
commit bfca55b87a
8 changed files with 38 additions and 39 deletions

View File

@ -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