diff options
author | Aki <nthirtyone@gmail.com> | 2016-05-15 22:29:01 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2016-05-15 22:29:01 +0200 |
commit | 861d6e0736346c4aa80c35d7f0b6f2841d64404f (patch) | |
tree | 356a4c427dda8706c8e693b942199b04cdbc973e /cloud.lua | |
parent | 22f19497805c0ee4f4e5cfb6606673a9983dc191 (diff) | |
download | roflnauts-861d6e0736346c4aa80c35d7f0b6f2841d64404f.zip roflnauts-861d6e0736346c4aa80c35d7f0b6f2841d64404f.tar.gz roflnauts-861d6e0736346c4aa80c35d7f0b6f2841d64404f.tar.bz2 |
Draw & update
Diffstat (limited to 'cloud.lua')
-rw-r--r-- | cloud.lua | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -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 |