Created userdata metatable

This commit is contained in:
Kayne Ruse
2015-03-27 20:29:16 +11:00
parent 0efb541074
commit 29ccb982e6
4 changed files with 84 additions and 1 deletions
+8 -1
View File
@@ -15,7 +15,10 @@ roomManagerAPI.SetOnCreate(function(room, index)
roomAPI.SetOnTick(room, function(room)
roomAPI.ForEachCharacter(room, function(character)
--
--testing the metatables
local meta = getmetatable(character)
print("", "userdata metatable: ", meta)
print(character["trying"])
end)
end)
end)
@@ -33,4 +36,8 @@ roomAPI.Initialize(underworld, mapSaver.Load, mapSaver.Save, mapMaker.DebugGrass
--call the monstrosity
doorUtility.createDoorPair("pair 1", overworld, 0, -64, underworld, 0, 0)
--testing the metatables
local meta = getmetatable(underworld)
print("", "userdata metatable: ", meta)
print("Finished the lua script")