diff --git a/code/entity.lua b/code/entity.lua index b43df21..339ad2e 100644 --- a/code/entity.lua +++ b/code/entity.lua @@ -2,7 +2,8 @@ Entity = {class = "Entity"} LoadedObjects.Entities = {} function Entity:New(x,y) - o = {} + local o = {} + o.pos = {x = x, y = y} o.vel = {x = 0, y = 0} diff --git a/code/ui/dialog.lua b/code/ui/dialog.lua index 35f2396..2d6d74b 100644 --- a/code/ui/dialog.lua +++ b/code/ui/dialog.lua @@ -2,7 +2,7 @@ interfaceDialog = {type = "Dialog"} -- dialog boxes function interfaceDialog:New(style) local o = {} - + o.pos = { x = 0, y = game.height*80/100 @@ -10,7 +10,6 @@ function interfaceDialog:New(style) o.size = { w = game.width, h = game.height*20/100 - } o.value = 0 @@ -34,7 +33,6 @@ function interfaceDialog:New(style) setmetatable(o, self) self.__index = self - return o end