local basegen = {} function basegen:new(game,x,y,w,h) local Base = {} Base.rect = game.rect:new(x or 0, y or 0, w or 0, h or 0) Base.spriteoffx = 0 Base.spriteoffy = 0 Base.sprite = game:newImage("grid/tile.png") Base.game = game Base.depth = 0 Base.classes = {"Base"} function Base:step(dt) end function Base:MouseCallback(x,y,presses) end function Base:register(name) table.insert(self.classes,name) end function Base:draw() lg.draw(self.sprite,self.rect[1]-self.game.camerax-self.spriteoffx,self.rect[2]-self.game.cameray-self.spriteoffy) end return Base end return basegen