diff options
author | Aki <nthirtyone@gmail.com> | 2017-03-01 21:31:11 +0100 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2017-03-01 21:33:23 +0100 |
commit | bd22a09dc862ac5480426bfd5e0311a97b6cfa77 (patch) | |
tree | 971b467b2612a0b195a38ea5450b32399810c951 /decoration.lua | |
parent | 55b0cf1a22e4a7e41fe00aa693445d6c4bd0652d (diff) | |
download | roflnauts-bd22a09dc862ac5480426bfd5e0311a97b6cfa77.zip roflnauts-bd22a09dc862ac5480426bfd5e0311a97b6cfa77.tar.gz roflnauts-bd22a09dc862ac5480426bfd5e0311a97b6cfa77.tar.bz2 |
Rename: Animated -> Sprite
Rename: getSprite, setSprite -> getImage, setImage
Diffstat (limited to 'decoration.lua')
-rw-r--r-- | decoration.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/decoration.lua b/decoration.lua index 3ca6f76..ffb007d 100644 --- a/decoration.lua +++ b/decoration.lua @@ -5,11 +5,11 @@ Decoration = { y = 0 } Decoration.__index = Decoration -setmetatable(Decoration, Animated) +setmetatable(Decoration, Sprite) function Decoration:new(x, y, sprite) local o = {} setmetatable(o, self) - o.sprite = love.graphics.newImage(sprite) + o:setImage(love.graphics.newImage(sprite)) o:setPosition(x,y) return o end @@ -29,5 +29,5 @@ function Decoration:draw(offset_x, offset_y, scale) local draw_x = (math.floor(x) + offset_x) * scale local draw_y = (math.floor(y) + offset_y) * scale -- draw - Animated.draw(self, draw_x, draw_y, 0, scale, scale) + Sprite.draw(self, draw_x, draw_y, 0, scale, scale) end
\ No newline at end of file |