From 9598d72b8b9ea038ba80eaa46e04fe25000fe101 Mon Sep 17 00:00:00 2001 From: jussi Date: Sun, 5 Jun 2022 12:24:06 +0300 Subject: Rest of input functions and camera system functions. --- examples/pong_vec/main.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/pong_vec/main.lua') diff --git a/examples/pong_vec/main.lua b/examples/pong_vec/main.lua index ed406e1..705e68f 100644 --- a/examples/pong_vec/main.lua +++ b/examples/pong_vec/main.lua @@ -70,9 +70,9 @@ end function process( delta ) -- Left player controls. - if RL_IsKeyDown( string.byte( "W" ) ) and 0 < playerLeft.pos.y then + if RL_IsKeyDown( KEY_W ) and 0 < playerLeft.pos.y then playerLeft.pos.y = playerLeft.pos.y - PLAYER_SPEED * delta - elseif RL_IsKeyDown( string.byte( "S" ) ) and playerLeft.pos.y + playerLeft.size.y < winSize.y then + elseif RL_IsKeyDown( KEY_S ) and playerLeft.pos.y + playerLeft.size.y < winSize.y then playerLeft.pos.y = playerLeft.pos.y + PLAYER_SPEED * delta end -- cgit v1.2.3