From 9b75ea38f0194dfffc89c0144c1ab0efb8b4f392 Mon Sep 17 00:00:00 2001 From: Aki Date: Tue, 18 Jul 2017 16:54:14 +0200 Subject: Resized 16px effects frames to 24px --- assets/effects.png | Bin 1440 -> 1456 bytes config/animations/effects.lua | 74 +++++++++++++++++++++--------------------- not/Hero.lua | 5 +-- 3 files changed, 38 insertions(+), 41 deletions(-) diff --git a/assets/effects.png b/assets/effects.png index 90bc456..1a80fc9 100644 Binary files a/assets/effects.png and b/assets/effects.png differ diff --git a/config/animations/effects.lua b/config/animations/effects.lua index dd6d55e..a0c9f47 100644 --- a/config/animations/effects.lua +++ b/config/animations/effects.lua @@ -1,5 +1,5 @@ -- Animations spritesheet array for `Effect` --- Size of sprie atlas is 168px x 120px +-- Size of sprie atlas is 168px x 144px -- NAME :POSITION :SIZE :FRAMES -- jump :x 0 y 0: 24px: 4 @@ -7,70 +7,70 @@ -- land :x 0 y 48: 24px: 5 -- respawn :x 0 y 72: 24px: 7 -- clash :x 0 y 96: 24px: 6 --- trail :x104 y 0: 16px: 4 --- hit :x106 y 18: 16px: 3 +-- trail :x 0 y120: 24px: 4 +-- hit :x 96 y 0: 24px: 3 local quads = { jump = { - [1] = love.graphics.newQuad( 0, 0, 24,24, 168,120), - [2] = love.graphics.newQuad( 24, 0, 24,24, 168,120), - [3] = love.graphics.newQuad( 48, 0, 24,24, 168,120), - [4] = love.graphics.newQuad( 72, 0, 24,24, 168,120), + [1] = love.graphics.newQuad( 0, 0, 24,24, 168,144), + [2] = love.graphics.newQuad( 24, 0, 24,24, 168,144), + [3] = love.graphics.newQuad( 48, 0, 24,24, 168,144), + [4] = love.graphics.newQuad( 72, 0, 24,24, 168,144), frames = 4, repeated = false }, doublejump = { - [1] = love.graphics.newQuad( 0, 24, 24,24, 168,120), - [2] = love.graphics.newQuad( 24, 24, 24,24, 168,120), - [3] = love.graphics.newQuad( 48, 24, 24,24, 168,120), - [4] = love.graphics.newQuad( 72, 24, 24,24, 168,120), + [1] = love.graphics.newQuad( 0, 24, 24,24, 168,144), + [2] = love.graphics.newQuad( 24, 24, 24,24, 168,144), + [3] = love.graphics.newQuad( 48, 24, 24,24, 168,144), + [4] = love.graphics.newQuad( 72, 24, 24,24, 168,144), frames = 4, repeated = false }, land = { - [1] = love.graphics.newQuad( 0, 48, 24,24, 168,120), - [2] = love.graphics.newQuad( 24, 48, 24,24, 168,120), - [3] = love.graphics.newQuad( 48, 48, 24,24, 168,120), - [4] = love.graphics.newQuad( 72, 48, 24,24, 168,120), - [5] = love.graphics.newQuad( 96, 48, 24,24, 168,120), + [1] = love.graphics.newQuad( 0, 48, 24,24, 168,144), + [2] = love.graphics.newQuad( 24, 48, 24,24, 168,144), + [3] = love.graphics.newQuad( 48, 48, 24,24, 168,144), + [4] = love.graphics.newQuad( 72, 48, 24,24, 168,144), + [5] = love.graphics.newQuad( 96, 48, 24,24, 168,144), frames = 5, repeated = false }, respawn = { - [1] = love.graphics.newQuad( 0, 72, 24,24, 168,120), - [2] = love.graphics.newQuad( 24, 72, 24,24, 168,120), - [3] = love.graphics.newQuad( 48, 72, 24,24, 168,120), - [4] = love.graphics.newQuad( 72, 72, 24,24, 168,120), - [5] = love.graphics.newQuad( 96, 72, 24,24, 168,120), - [6] = love.graphics.newQuad(120, 72, 24,24, 168,120), - [7] = love.graphics.newQuad(144, 72, 24,24, 168,120), + [1] = love.graphics.newQuad( 0, 72, 24,24, 168,144), + [2] = love.graphics.newQuad( 24, 72, 24,24, 168,144), + [3] = love.graphics.newQuad( 48, 72, 24,24, 168,144), + [4] = love.graphics.newQuad( 72, 72, 24,24, 168,144), + [5] = love.graphics.newQuad( 96, 72, 24,24, 168,144), + [6] = love.graphics.newQuad(120, 72, 24,24, 168,144), + [7] = love.graphics.newQuad(144, 72, 24,24, 168,144), frames = 7, repeated = false }, clash = { - [1] = love.graphics.newQuad( 0, 96, 24,24, 168,120), - [2] = love.graphics.newQuad( 24, 96, 24,24, 168,120), - [3] = love.graphics.newQuad( 48, 96, 24,24, 168,120), - [4] = love.graphics.newQuad( 72, 96, 24,24, 168,120), - [5] = love.graphics.newQuad( 96, 96, 24,24, 168,120), - [6] = love.graphics.newQuad(120, 96, 24,24, 168,120), + [1] = love.graphics.newQuad( 0, 96, 24,24, 168,144), + [2] = love.graphics.newQuad( 24, 96, 24,24, 168,144), + [3] = love.graphics.newQuad( 48, 96, 24,24, 168,144), + [4] = love.graphics.newQuad( 72, 96, 24,24, 168,144), + [5] = love.graphics.newQuad( 96, 96, 24,24, 168,144), + [6] = love.graphics.newQuad(120, 96, 24,24, 168,144), frames = 6, repeated = false }, trail = { - [1] = love.graphics.newQuad(104, 0, 16,16, 168,120), - [2] = love.graphics.newQuad(120, 0, 16,16, 168,120), - [3] = love.graphics.newQuad(136, 0, 16,16, 168,120), - [4] = love.graphics.newQuad(152, 0, 16,16, 168,120), + [1] = love.graphics.newQuad( 0,120, 24,24, 168,144), + [2] = love.graphics.newQuad( 24,120, 24,24, 168,144), + [3] = love.graphics.newQuad( 48,120, 24,24, 168,144), + [4] = love.graphics.newQuad( 72,120, 24,24, 168,144), frames = 4, repeated = false }, hit = { - [1] = love.graphics.newQuad(106, 18, 16,16, 168,120), - [2] = love.graphics.newQuad(122, 18, 16,16, 168,120), - [3] = love.graphics.newQuad(138, 18, 16,16, 168,120), + [1] = love.graphics.newQuad( 96, 0, 24,24, 168,144), + [2] = love.graphics.newQuad(120, 0, 24,24, 168,144), + [3] = love.graphics.newQuad(144, 0, 24,24, 168,144), frames = 3, repeated = false } } -return quads \ No newline at end of file +return quads diff --git a/not/Hero.lua b/not/Hero.lua index 1c15588..13ab3dd 100644 --- a/not/Hero.lua +++ b/not/Hero.lua @@ -200,10 +200,7 @@ end -- Spawn `Effect` relative to `Hero` function Hero:createEffect (name, dx, dy) - local x, y = self.body:getX()-8, self.body:getY()-8 -- 16px effect: -7 -7 - if not (name == "trail") and not (name == "hit") then - x, y = x-4, y-7 -- 24px effect: -12 -15 - end + local x, y = self.body:getX()-12, self.body:getY()-15 if dx then x = x + dx end -- cgit v1.1