aboutsummaryrefslogtreecommitdiff
path: root/examples/game/player.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-08 20:25:06 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-08 20:25:06 -0400
commitf33b7048d7f1255a4f9c04057340f2c71d6fb982 (patch)
tree8b7ea09409eef75696ba60a8ff5f60b8af1ec83d /examples/game/player.tm
parent9f7f4eb858d723b0d4fc954b1575feb05f0f8134 (diff)
Turn into map
Diffstat (limited to 'examples/game/player.tm')
-rw-r--r--examples/game/player.tm4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/game/player.tm b/examples/game/player.tm
index 5aff9ea5..3461c6ae 100644
--- a/examples/game/player.tm
+++ b/examples/game/player.tm
@@ -10,7 +10,7 @@ struct Player(pos,prev_pos:Vec2):
WALK_SPEED := 500.
ACCEL := 0.3
FRICTION := 0.99
- SIZE := Vec2(50, 50)
+ SIZE := Vec2(30, 30)
func update(p:&Player):
target_x := inline C (
@@ -28,4 +28,4 @@ struct Player(pos,prev_pos:Vec2):
p.prev_pos, p.pos = p.pos, p.pos + World.DT*vel
func draw(p:&Player):
- Color.RED:draw_rectangle(p.pos, Player.SIZE)
+ Color.PLAYER:draw_rectangle(p.pos, Player.SIZE)