return GameObject in emmylua
This commit is contained in:
parent
829d35c2ca
commit
4e06585f12
1 changed files with 1 additions and 0 deletions
|
|
@ -49,6 +49,7 @@ end
|
||||||
---@param x number|nil horizontal position
|
---@param x number|nil horizontal position
|
||||||
---@param y number|nil vertical position
|
---@param y number|nil vertical position
|
||||||
---@param opts table|nil additional arguments
|
---@param opts table|nil additional arguments
|
||||||
|
---@return GameObject
|
||||||
function Area:addGameObject(game_object_type, x, y, opts)
|
function Area:addGameObject(game_object_type, x, y, opts)
|
||||||
local game_object = _G[game_object_type](self, x or 0, y or 0, opts or {})
|
local game_object = _G[game_object_type](self, x or 0, y or 0, opts or {})
|
||||||
table.insert(self.game_objects, game_object)
|
table.insert(self.game_objects, game_object)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue