summaryrefslogtreecommitdiff
path: root/examples/pong_vec/main.lua
diff options
context:
space:
mode:
authorjussi2022-06-05 12:24:06 +0300
committerjussi2022-06-05 12:24:06 +0300
commit9598d72b8b9ea038ba80eaa46e04fe25000fe101 (patch)
tree0695b0e3a426286a6db91aa5b046ef159c5a9daf /examples/pong_vec/main.lua
parentb8d2fcd7956e0ca862745a0b8f64317664507574 (diff)
downloadreilua-enhanced-9598d72b8b9ea038ba80eaa46e04fe25000fe101.tar.gz
reilua-enhanced-9598d72b8b9ea038ba80eaa46e04fe25000fe101.tar.bz2
reilua-enhanced-9598d72b8b9ea038ba80eaa46e04fe25000fe101.zip
Rest of input functions and camera system functions.
Diffstat (limited to 'examples/pong_vec/main.lua')
-rw-r--r--examples/pong_vec/main.lua4
1 files changed, 2 insertions, 2 deletions
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