summaryrefslogtreecommitdiff
path: root/examples/pong
diff options
context:
space:
mode:
authorjussi2022-05-31 00:31:39 +0300
committerjussi2022-05-31 00:31:39 +0300
commitb1bb77e1398b2f73623ef8c1e9cb2d7adbdea139 (patch)
tree4bdab9a8c45ac18bc95168e36252f2aa707fb782 /examples/pong
parent381adb3ba2e1c668bf29f95b8356ac8a859e0f3e (diff)
downloadreilua-enhanced-b1bb77e1398b2f73623ef8c1e9cb2d7adbdea139.tar.gz
reilua-enhanced-b1bb77e1398b2f73623ef8c1e9cb2d7adbdea139.tar.bz2
reilua-enhanced-b1bb77e1398b2f73623ef8c1e9cb2d7adbdea139.zip
Windows Lua build instructions.
Diffstat (limited to 'examples/pong')
-rw-r--r--examples/pong/main.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/pong/main.lua b/examples/pong/main.lua
index ae3c321..b3f3f99 100644
--- a/examples/pong/main.lua
+++ b/examples/pong/main.lua
@@ -34,6 +34,7 @@ local function reset()
-- Set ball to center.
ball.pos = { winSize[1] / 2, winSize[2] / 2 }
-- Short for if math random result 1, set BALL_SPEED otherwise set -BALL_SPEED.
+ -- Could be replaced by normal if statement for easier readability.
ball.vel[1] = math.random( 0, 1 ) == 1 and BALL_SPEED or -BALL_SPEED
-- Start slow.
ball.vel[2] = 0