World:newEntity

A shortcut for Concord.entity(World)
This commit is contained in:
Pablo Ariel Mayobre 2023-02-14 18:14:24 -03:00 committed by Pablo Mayobre
parent afc5643755
commit 238aaeca12
No known key found for this signature in database
GPG key ID: 13A2F589D013E0E7

View file

@ -65,6 +65,12 @@ function World:addEntity(e)
return self return self
end 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. --- Removes an Entity from the World.
-- @tparam Entity e Entity to remove -- @tparam Entity e Entity to remove
-- @treturn World self -- @treturn World self