summaryrefslogtreecommitdiffhomepage
path: root/not/Decoration.lua
blob: 97524f583071403429a3994d89a4a541dab6839e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
require "not.Entity"

--- `Decoration`
-- Positioned sprite used to decorate maps with additional graphics.
Decoration = Entity:extends()

Decoration.x = 0
Decoration.y = 0

-- Constructor of `Decoration`.
function Decoration:new (x, y, world, imagePath)
	Decoration.__super.new(self, world, imagePath)
	self:setPosition(x, y)
end

-- Position-related methods.
function Decoration:getPosition ()
	return self.x, self.y
end
function Decoration:setPosition (x, y)
	self.x, self.y = x, y
end

return Decoration