From 6557a2ebca62c6670736b4ec2914a2aca60dbdba Mon Sep 17 00:00:00 2001 From: jussi Date: Sat, 10 Feb 2024 21:06:09 +0200 Subject: Build option for Lua events that is off by default. --- examples/resources/lib/vector2.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/resources/lib/vector2.lua') diff --git a/examples/resources/lib/vector2.lua b/examples/resources/lib/vector2.lua index 065e556..d66cd07 100644 --- a/examples/resources/lib/vector2.lua +++ b/examples/resources/lib/vector2.lua @@ -4,7 +4,7 @@ if table.unpack == nil then end local Vector2 = {} -Vector2.meta = { +local metatable = { __index = Vector2, __tostring = function( v ) return "{"..tostring( v.x )..", "..tostring( v.y ).."}" @@ -48,7 +48,7 @@ function Vector2:new( x, y ) x, y = 0, 0 end - local object = setmetatable( {}, Vector2.meta ) + local object = setmetatable( {}, metatable ) object.x = x object.y = y -- cgit v1.2.3