mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-02 12:24:11 -04:00
Add helper functions to container. Allow name to be gotten
This commit is contained in:
parent
6cd66e6737
commit
55ae5fd987
8 changed files with 97 additions and 2 deletions
|
@ -33,6 +33,7 @@ function World.new()
|
|||
|
||||
__systemLookup = {},
|
||||
|
||||
__name = nil,
|
||||
__isWorld = true,
|
||||
}, World.__mt)
|
||||
|
||||
|
@ -316,6 +317,18 @@ function World:deserialize(data, append)
|
|||
self:__flush()
|
||||
end
|
||||
|
||||
--- Returns true if the World has a name.
|
||||
-- @return True if the World has a name, false otherwise
|
||||
function World:hasName()
|
||||
return self.__name and true or false
|
||||
end
|
||||
|
||||
--- Returns the name of the World.
|
||||
-- @return Name of the World
|
||||
function World:getName()
|
||||
return self.__name
|
||||
end
|
||||
|
||||
--- Callback for when an Entity is added to the World.
|
||||
-- @param e The Entity that was added
|
||||
function World:onEntityAdded(e) -- luacheck: ignore
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue