From dc74bf54245ac0286941ac7671d41eb8eb4009d1 Mon Sep 17 00:00:00 2001 From: OfficialCHenry Date: Fri, 15 Apr 2022 17:16:30 -0400 Subject: [PATCH] fixed attack animation to match with range buffs --- .../spritesheets/slice.png | Bin 208 -> 213 bytes .../GameSystems/items/WeaponTypes/Slice.ts | 12 ++++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dist/shattered_sword_assets/spritesheets/slice.png b/dist/shattered_sword_assets/spritesheets/slice.png index 5308b534c60949324fab35c568df54534c7fee68..8c0e5ec149e4ac6383d0fa6c9e7088be7162ca3b 100644 GIT binary patch delta 185 zcmV;q07n1N0o4JJB!8SqL_t(oN9~qT3cxT3L+kwy?eIe=rGj;lI^4dy)I5WhM)QxF z`yWsM%*-=TA`0oFbUe)s6}S_YqQx+>c%+sE0|vmlK*4yrVSz=Y>KcHk@%g{ZB%~(* z0YEfn2+`THtK|oP>QJ^$>jbo(0h#6{wWVi(*ZiARTL!>t!ZK@KXOEsg-4JB}tgB9q nofwKhCHljkuB^cC=iEg_8n&n-Q-)YD285Lx0c%>PI1 i<)n8+WK7G^<$Jspzd#Lqn21~e0000attacker).invertX? .5* Math.PI : 1.5 * Math.PI; + sliceSprite.invertX = (attacker).invertX; + //TODO- //4 to scale up the default sprite - may be different later depending on atk anim sliceSprite.scaleX = 2*(1+extraRange); //might have to add extra range to y as well sliceSprite.scaleY = 2; - // Rotate this with the game node - // TODO - need to rotate the anim properly - sliceSprite.rotation = attacker.rotation; - sliceSprite.rotation = (attacker).invertX? .5* Math.PI : 1.5 * Math.PI; + // Move the slice out from the player //scale = num of pixels between center of sprite and atk anim sliceSprite.position = attacker.position.clone().add(direction.scaled(32));