From a4ae392341b49c32740ae5efffc5966c2ccb307c Mon Sep 17 00:00:00 2001 From: Pablo Ariel Mayobre Date: Tue, 14 Feb 2023 18:14:24 -0300 Subject: [PATCH] World:newEntity A shortcut for Concord.entity(World) --- concord/world.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/concord/world.lua b/concord/world.lua index 71b3485..efc5a23 100644 --- a/concord/world.lua +++ b/concord/world.lua @@ -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