Fixed examples.

This commit is contained in:
jussi
2023-10-29 19:45:18 +02:00
parent fcd2d2d8b5
commit 992310fb90
18 changed files with 62 additions and 54 deletions

View File

@@ -126,7 +126,7 @@ function RL.draw()
RL.DrawCircle( ball.pos, ball.radius, RL.WHITE )
-- Draw score.
RL.DrawText( 0, tostring( playerLeft.score ), { 50, 10 }, 40, 2, RL.WHITE )
local rightTextSize = Vec2:new( RL.MeasureText( 0, tostring( playerRight.score ), 40, 2 ) )
RL.DrawText( 0, tostring( playerRight.score ), { winSize.x - 50 - rightTextSize.x, 10 }, 40, 2, RL.WHITE )
RL.DrawText( RL.defaultFont, tostring( playerLeft.score ), { 50, 10 }, 40, 2, RL.WHITE )
local rightTextSize = Vec2:new( RL.MeasureText( RL.defaultFont, tostring( playerRight.score ), 40, 2 ) )
RL.DrawText( RL.defaultFont, tostring( playerRight.score ), { winSize.x - 50 - rightTextSize.x, 10 }, 40, 2, RL.WHITE )
end