From 20ed15b3a008fcc4f90c2bd32cc2e36e49072554 Mon Sep 17 00:00:00 2001 From: Aki Date: Sat, 14 May 2016 16:54:53 +0200 Subject: Revert "Revert "Marked Issue #8"" This reverts commit 3308a3d15e9b06529d5093d8551d4868e7fc7eff. --- cloud.lua | 21 +++++++++++++++++++++ player.lua | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 cloud.lua diff --git a/cloud.lua b/cloud.lua new file mode 100644 index 0000000..d825eda --- /dev/null +++ b/cloud.lua @@ -0,0 +1,21 @@ +-- `Cloud` +-- That white thing moving in the background. + +-- WHOLE CODE HAS FLAG OF "need a cleanup" + +-- Metatable of `Cloud` +Cloud = { + x = 0, + y = 0, + sprite = love.graphics.newImage("assets/clouds.png") +} + +-- Constructor of `Cloud` +function Cloud:new() + -- Meta + local o = {} + setmetatable(o, self) + self.__index = self + -- Misc + return o +end \ No newline at end of file diff --git a/player.lua b/player.lua index 8e216f2..099001f 100644 --- a/player.lua +++ b/player.lua @@ -214,7 +214,7 @@ function Player:changeAnimation(animation) end -- Punch of `Player` --- REWORK NEEDED +-- REWORK NEEDED Issue #8 function Player:hit (horizontal, vertical) if vertical == -1 then self:changeAnimation("attack_up") -- cgit v1.1