summaryrefslogtreecommitdiffhomepage
path: root/cloud.lua
diff options
context:
space:
mode:
Diffstat (limited to 'cloud.lua')
-rw-r--r--cloud.lua12
1 files changed, 10 insertions, 2 deletions
diff --git a/cloud.lua b/cloud.lua
index 04ee31b..d745ba7 100644
--- a/cloud.lua
+++ b/cloud.lua
@@ -31,9 +31,17 @@ end
-- Update of `Cloud`, returns x for world to delete cloud after reaching right corner
function Cloud:update(dt)
- return x
+ self.x = self.x + 5*dt
+ return self.x
end
-- Draw `Cloud`
-function Cloud:draw()
+function Cloud:draw(offset_x, offset_y, scale)
+ -- defaults
+ local offset_x = offset_x or 0
+ local offset_y = offset_y or 0
+ local debug = debug or false
+ -- draw
+ love.graphics.setColor(255,255,255,255)
+ love.graphics.draw(self.sprite, self.quads[t], (self.x+offset_x)*scale, (self.y+offset_y)*scale, 0, scale, scale)
end \ No newline at end of file