summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorjussi2024-02-10 21:06:09 +0200
committerjussi2024-02-10 21:06:09 +0200
commit6557a2ebca62c6670736b4ec2914a2aca60dbdba (patch)
tree03a839d7eb4b9bddf3a694a163724ca8d59c819e /examples
parenteda4eacfce4f62ca09fb4f6559f9b7aeabe3cc31 (diff)
downloadreilua-enhanced-6557a2ebca62c6670736b4ec2914a2aca60dbdba.tar.gz
reilua-enhanced-6557a2ebca62c6670736b4ec2914a2aca60dbdba.tar.bz2
reilua-enhanced-6557a2ebca62c6670736b4ec2914a2aca60dbdba.zip
Build option for Lua events that is off by default.
Diffstat (limited to 'examples')
-rw-r--r--examples/resources/lib/color.lua4
-rw-r--r--examples/resources/lib/quaternion.lua4
-rw-r--r--examples/resources/lib/rune.lua4
-rw-r--r--examples/resources/lib/vector2.lua4
-rw-r--r--examples/resources/lib/vector3.lua4
5 files changed, 10 insertions, 10 deletions
diff --git a/examples/resources/lib/color.lua b/examples/resources/lib/color.lua
index 1344dba..9369a34 100644
--- a/examples/resources/lib/color.lua
+++ b/examples/resources/lib/color.lua
@@ -6,7 +6,7 @@ end
local Vector3 = require( "vector3" )
local Color = {}
-Color.meta = {
+local metatable = {
__index = Color,
__tostring = function( c )
return "{"..math.floor( c.r )..", "..math.floor( c.g )..", "..math.floor( c.b )..", "..math.floor( c.a ).."}"
@@ -57,7 +57,7 @@ function Color:new( r, g, b, a )
a = 255
end
- local object = setmetatable( {}, Color.meta )
+ local object = setmetatable( {}, metatable )
object.r = r
object.g = g
diff --git a/examples/resources/lib/quaternion.lua b/examples/resources/lib/quaternion.lua
index e85415c..56b5c49 100644
--- a/examples/resources/lib/quaternion.lua
+++ b/examples/resources/lib/quaternion.lua
@@ -7,7 +7,7 @@ local Vector3 = require( "vector3" )
local Matrix = require( "matrix" )
local Quaternion = {}
-Quaternion.meta = {
+local metatable = {
__index = Quaternion,
__tostring = function( q )
return "{"..tostring( q.x )..", "..tostring( q.y )..", "..tostring( q.z )..", "..tostring( q.w ).."}"
@@ -45,7 +45,7 @@ function Quaternion:new( x, y, z, w )
x, y, z, w = 0, 0, 0, 1 -- QuaternionIdentity.
end
- local object = setmetatable( {}, Quaternion.meta )
+ local object = setmetatable( {}, metatable )
object.x = x
object.y = y
diff --git a/examples/resources/lib/rune.lua b/examples/resources/lib/rune.lua
index 5809da3..fa9f59d 100644
--- a/examples/resources/lib/rune.lua
+++ b/examples/resources/lib/rune.lua
@@ -4,7 +4,7 @@ if table.unpack == nil then
end
local Rune = {}
-Rune.meta = {
+local metatable = {
__index = Rune,
__tostring = function( r )
return r.string
@@ -27,7 +27,7 @@ function Rune:new( string )
string = ""
end
- local object = setmetatable( {}, Rune.meta )
+ local object = setmetatable( {}, metatable )
object.string = string
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
diff --git a/examples/resources/lib/vector3.lua b/examples/resources/lib/vector3.lua
index 9b77881..037e440 100644
--- a/examples/resources/lib/vector3.lua
+++ b/examples/resources/lib/vector3.lua
@@ -6,7 +6,7 @@ end
local Vector2 = require( "vector2" )
local Vector3 = {}
-Vector3.meta = {
+local metatable = {
__index = Vector3,
__tostring = function( v )
return "{"..tostring( v.x )..", "..tostring( v.y )..", "..tostring( v.z ).."}"
@@ -50,7 +50,7 @@ function Vector3:new( x, y, z )
x, y, z = 0, 0, 0
end
- local object = setmetatable( {}, Vector3.meta )
+ local object = setmetatable( {}, metatable )
object.x = x
object.y = y