update V game

This commit is contained in:
2024-05-11 21:12:26 +03:00
parent 18710fa443
commit a8e26be242
14 changed files with 136 additions and 16 deletions

15
projects/V/Game/update.v Normal file
View File

@@ -0,0 +1,15 @@
// import gg
fn (mut game Game) update() {
if game.bg_texture.pos_x >= game.bg_texture.image.width {
game.bg_texture.pos_x = 0
} else {
game.bg_texture.pos_x += .5
}
if game.bg_texture.pos_y >= game.bg_texture.image.height {
game.bg_texture.pos_y = 0
} else {
game.bg_texture.pos_y += .5
}
}