From bd22a09dc862ac5480426bfd5e0311a97b6cfa77 Mon Sep 17 00:00:00 2001 From: Aki Date: Wed, 1 Mar 2017 21:31:11 +0100 Subject: Rename: Animated -> Sprite Rename: getSprite, setSprite -> getImage, setImage --- platform.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'platform.lua') diff --git a/platform.lua b/platform.lua index 908cf73..9d75e66 100644 --- a/platform.lua +++ b/platform.lua @@ -3,7 +3,7 @@ -- Collision category: [1] -- WHOLE CODE HAS FLAG OF "need a cleanup" -require "animated" +require "sprite" -- Metatable of `Platform` -- nils initialized in constructor @@ -14,7 +14,7 @@ Platform = { world = nil, } Platform.__index = Platform -setmetatable(Platform, Animated) +setmetatable(Platform, Sprite) -- Constructor of `Platform` function Platform:new (game, world, x, y, shape, sprite, animations) @@ -39,7 +39,7 @@ function Platform:new (game, world, x, y, shape, sprite, animations) end end -- END HERE - o:setSprite(love.graphics.newImage(sprite)) + o:setImage(love.graphics.newImage(sprite)) o:setAnimationsList(animations) o.world = game return o @@ -62,7 +62,7 @@ function Platform:draw (offset_x, offset_y, scale, debug) local draw_x = (math.floor(x) + offset_x) * scale local draw_y = (math.floor(y) + offset_y) * scale -- sprite draw - Animated.draw(self, draw_x, draw_y, 0, scale, scale) + Sprite.draw(self, draw_x, draw_y, 0, scale, scale) -- debug draw if debug then love.graphics.setColor(255, 69, 0, 140) -- cgit v1.1