From 851a3d98043858eae8181ae907f9b39ada3a9e8d Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Mon, 19 Aug 2019 16:39:23 +0200 Subject: [PATCH] improvement: make sure that the hit gfx appear *when* the attack connect --- .../gamedata/characters/sonic/sprites.lua | 33 +++++++++++++++---- .../datas/gamedata/skills/attack.lua | 9 +++-- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/sonic-radiance.love/datas/gamedata/characters/sonic/sprites.lua b/sonic-radiance.love/datas/gamedata/characters/sonic/sprites.lua index ce7771f..bf81223 100644 --- a/sonic-radiance.love/datas/gamedata/characters/sonic/sprites.lua +++ b/sonic-radiance.love/datas/gamedata/characters/sonic/sprites.lua @@ -35,22 +35,43 @@ return { speed = 10, pauseAtEnd = true, }, - ["hit1"] = { + ["hit1start"] = { startAt = 22, + endAt = 24, + loop = 24, + speed = 15, + pauseAtEnd = true, + }, + ["hit1end"] = { + startAt = 24, endAt = 26, loop = 26, speed = 15, pauseAtEnd = true, }, - ["hit2"] = { + ["hit2start"] = { startAt = 28, - endAt = 31, - loop = 31, + endAt = 30, + loop = 30, speed = 15, pauseAtEnd = true, }, - ["hit3"] = { - startAt = 32, + ["hit2end"] = { + startAt = 30, + endAt = 32, + loop = 32, + speed = 15, + pauseAtEnd = true, + }, + ["hit3start"] = { + startAt = 33, + endAt = 35, + loop = 35, + speed = 15, + pauseAtEnd = true, + }, + ["hit3end"] = { + startAt = 36, endAt = 36, loop = 36, speed = 15, diff --git a/sonic-radiance.love/datas/gamedata/skills/attack.lua b/sonic-radiance.love/datas/gamedata/skills/attack.lua index 9503c77..c02d84a 100644 --- a/sonic-radiance.love/datas/gamedata/skills/attack.lua +++ b/sonic-radiance.love/datas/gamedata/skills/attack.lua @@ -17,15 +17,18 @@ return { -- if not nil : {ox, oy, shape, size, affectedByDirection} choregraphy = { -- the main attack choregraphy - {'setAnimation', "none", 'hit1', true}, + {'setAnimation', "none", 'hit1start', true}, {'sendDamage', "none", 33, 100, false, false}, {'addGFX',"sentDamage", 'hitGFX', 0.75, 0, true, false}, - {'setAnimation', "none", 'hit2', true}, + {'setAnimation', "none", 'hit1end', true}, + {'setAnimation', "none", 'hit2start', true}, {'sendDamage', "none", 33, 100, false, false}, {'addGFX',"sentDamage", 'hitGFX', 0.75, 0, true, false}, - {'setAnimation', "none", 'hit3', true}, + {'setAnimation', "none", 'hit2end', true}, + {'setAnimation', "none", 'hit3start', true}, {'sendDamage', "none", 33, 100, false, false}, {'addGFX',"sentDamage", 'hitGFX', 0.75, 0, true, false}, + {'setAnimation', "none", 'hit3end', true}, {'setAnimation', "none", 'idle', false}, {'wait', "none", 0.5} },