diff options
author | Julien Dessaux | 2022-09-23 19:09:28 +0200 |
---|---|---|
committer | Julien Dessaux | 2022-09-23 19:09:28 +0200 |
commit | 63029a3a27eb3ae44d802cb17b0c453e84595ade (patch) | |
tree | 9c5ad6c4fc077448d172bb30df90494665bae73a /src/game.zig | |
parent | Added brothers jumping (diff) | |
download | grenade-brothers-63029a3a27eb3ae44d802cb17b0c453e84595ade.tar.gz grenade-brothers-63029a3a27eb3ae44d802cb17b0c453e84595ade.tar.bz2 grenade-brothers-63029a3a27eb3ae44d802cb17b0c453e84595ade.zip |
Added ball physics
Diffstat (limited to '')
-rw-r--r-- | src/game.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game.zig b/src/game.zig index 2f3dfcd..01e3dc4 100644 --- a/src/game.zig +++ b/src/game.zig @@ -12,9 +12,9 @@ pub const Game = struct { playerSide: utils.side = undefined, pub fn draw(self: *Game) void { - self.ball.draw(); self.brothers[0].draw(); self.brothers[1].draw(); + self.ball.draw(); // draw the net w4.DRAW_COLORS.* = 0x42; w4.rect(78, 100, 4, 61); @@ -34,5 +34,6 @@ pub const Game = struct { self.gamepads[1].update(w4.GAMEPAD2.*); self.brothers[0].update(self.gamepads[0]); self.brothers[1].update(self.gamepads[1]); + self.ball.update(); } }; |