aboutsummaryrefslogtreecommitdiff
path: root/examples/game/player.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-04-06 16:07:23 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-04-06 16:07:23 -0400
commit6782cc5570e194791ca6cdd695b88897e9145564 (patch)
treea428e9d954aca251212ec1cf15bd35e0badce630 /examples/game/player.tm
parent448e805293989b06e07878a4a87fdd378f7c6e02 (diff)
No more colons for blocks
Diffstat (limited to 'examples/game/player.tm')
-rw-r--r--examples/game/player.tm6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/game/player.tm b/examples/game/player.tm
index 7f14f51e..9f166d9e 100644
--- a/examples/game/player.tm
+++ b/examples/game/player.tm
@@ -2,14 +2,14 @@
use ./world.tm
use ./raylib.tm
-struct Player(pos,prev_pos:Vector2):
+struct Player(pos,prev_pos:Vector2)
WALK_SPEED := Num32(500.)
ACCEL := Num32(0.3)
FRICTION := Num32(0.99)
SIZE := Vector2(30, 30)
COLOR := Color(0x60, 0x60, 0xbF)
- func update(p:@Player):
+ func update(p:@Player)
target_x := inline C:Num32 {
(Num32_t)((IsKeyDown(KEY_A) ? -1 : 0) + (IsKeyDown(KEY_D) ? 1 : 0))
}
@@ -24,5 +24,5 @@ struct Player(pos,prev_pos:Vector2):
p.prev_pos, p.pos = p.pos, p.pos + World.DT*vel
- func draw(p:Player):
+ func draw(p:Player)
DrawRectangleV(p.pos, Player.SIZE, Player.COLOR)