add class() for easy definition of classes
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
LoadedObjects.Entities = {}
|
||||
Entity = {}
|
||||
Entity.type = "Entity"
|
||||
Entity = class(nil, {type = "Entity"})
|
||||
|
||||
function Entity:new(x,y)
|
||||
local o = {}
|
||||
@@ -26,7 +25,6 @@ function Entity:new(x,y)
|
||||
o.sprite_flip = { x = 1, y = 1}
|
||||
|
||||
setmetatable(o, self)
|
||||
self.__index = self
|
||||
return o
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user