diff options
author | metamuffin <metamuffin@disroot.org> | 2024-06-19 13:40:26 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-06-23 19:21:49 +0200 |
commit | 945a3f45adbf509ef5e7986d55121a4899e0a1b3 (patch) | |
tree | 7dc19ac475dcc21ef53933d9743e4527f07db0dd /test-client | |
parent | c55d90768a9336436238dd93ae1706e23e281e84 (diff) | |
download | hurrycurry-945a3f45adbf509ef5e7986d55121a4899e0a1b3.tar hurrycurry-945a3f45adbf509ef5e7986d55121a4899e0a1b3.tar.bz2 hurrycurry-945a3f45adbf509ef5e7986d55121a4899e0a1b3.tar.zst |
customer pathfinding
Diffstat (limited to 'test-client')
-rw-r--r-- | test-client/main.ts | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test-client/main.ts b/test-client/main.ts index f208eb34..b189f08b 100644 --- a/test-client/main.ts +++ b/test-client/main.ts @@ -70,7 +70,7 @@ let data: Gamedata = { item_names: [], tile_names: [], spawn: [0, 0] } let my_id: PlayerID = -1 const camera: V2 = { x: 0, y: 0 } -const camera_zoom = 0.05 +let camera_zoom = 0.1 const interact_target_anim: V2 = { x: 0, y: 0 } let interacting: V2 | undefined; let scale = 0 @@ -327,6 +327,15 @@ function draw_ingame() { draw_interact_target() ctx.restore() + + if (keys_down.has("KeyP")) { + camera_zoom = 0.05 + ctx.fillStyle = "white" + ctx.textAlign = "left" + ctx.textBaseline = "bottom" + ctx.font = "20px sans-serif" + ctx.fillText(`interact = ${JSON.stringify(get_interact_target())}`, 10, 30) + } else { camera_zoom = 0.1 } } function draw_item(item: ItemData) { |