summaryrefslogtreecommitdiff
path: root/examples/snake/main.lua
diff options
context:
space:
mode:
authorjussi2024-04-17 00:35:58 +0300
committerjussi2024-04-17 00:35:58 +0300
commit70b40f67824b3d612235c382aa83821c054fa51e (patch)
tree5d594cc457d6fed8af87e31977a0b9352677a4f5 /examples/snake/main.lua
parent41b67398247d9031aed4ca6e3ffd6799ec8b1bca (diff)
downloadreilua-enhanced-70b40f67824b3d612235c382aa83821c054fa51e.tar.gz
reilua-enhanced-70b40f67824b3d612235c382aa83821c054fa51e.tar.bz2
reilua-enhanced-70b40f67824b3d612235c382aa83821c054fa51e.zip
Object libraries like Vector2 optimizations.
Diffstat (limited to 'examples/snake/main.lua')
-rw-r--r--examples/snake/main.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/snake/main.lua b/examples/snake/main.lua
index d28901d..3e047ee 100644
--- a/examples/snake/main.lua
+++ b/examples/snake/main.lua
@@ -13,8 +13,8 @@ local STATE = { TITLE = 0, GAME = 1, OVER = 2 } -- Enum.
-- Resources
local framebuffer = nil
local monitor = 0
-local monitorPos = Vec2:new( RL.GetMonitorPosition( monitor ) )
-local monitorSize = Vec2:new( RL.GetMonitorSize( monitor ) )
+local monitorPos = Vec2:newT( RL.GetMonitorPosition( monitor ) )
+local monitorSize = Vec2:newT( RL.GetMonitorSize( monitor ) )
local winScale = 6
local winSize = Vec2:new( RESOLUTION.x * winScale, RESOLUTION.y * winScale )
local gameState = STATE.GAME
@@ -248,6 +248,4 @@ function RL.draw()
0.0,
RL.WHITE
)
-
- RL.DrawFPS( { 20, 20 } )
end