From b1bb77e1398b2f73623ef8c1e9cb2d7adbdea139 Mon Sep 17 00:00:00 2001 From: jussi Date: Tue, 31 May 2022 00:31:39 +0300 Subject: Windows Lua build instructions. --- examples/pong/main.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'examples/pong') 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 -- cgit v1.2.3