World:newEntity

A shortcut for Concord.entity(World)
This commit is contained in:
Pablo Ariel Mayobre 2021-02-17 15:26:04 -03:00
parent f9f475ce48
commit f78811337a
No known key found for this signature in database
GPG key ID: 5ACD9E6858BEB0A9

View file

@ -65,6 +65,12 @@ function World:addEntity(e)
return self
end
--- Creates a new Entity and adds it to the World.
-- @treturn Entity e the new Entity
function World:newEntity()
return Entity(self)
end
--- Removes an Entity from the World.
-- @tparam Entity e Entity to remove
-- @treturn World self