diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/platformer/main.lua | 2 | ||||
| -rw-r--r-- | examples/pong_vec/main.lua | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/platformer/main.lua b/examples/platformer/main.lua index b92999d..bef5786 100644 --- a/examples/platformer/main.lua +++ b/examples/platformer/main.lua @@ -103,7 +103,7 @@ end local function tileCollision( entity ) local vPos = entity.pos + entity.vel -- Future pos with current vel. local vRect = util.tableClone( entity.colRect ) - local tinyGap = 0.001 -- Tiny slit between collisionRect and tile to prevent getting stuck on all seams. + local tinyGap = 0.001 -- Tiny gap between collisionRect and tile to prevent getting stuck on all seams. -- Move test rect to predicted position. vRect[1] = vPos.x - vRect[3] / 2 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 |
