From db9d4974606182c757010046c844f877d509c5b3 Mon Sep 17 00:00:00 2001 From: MtH Date: Fri, 19 Mar 2021 19:02:42 +0100 Subject: [PATCH] hair blowing idle loop for week4 --- source/Character.hx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source/Character.hx b/source/Character.hx index 1547b2c4a..e48f2b84e 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -109,9 +109,11 @@ class Character extends FlxSprite animation.addByIndices('danceLeft', 'GF Dancing Beat Hair blowing CAR', [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false); animation.addByIndices('danceRight', 'GF Dancing Beat Hair blowing CAR', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, false); + animation.addByIndices('idleHair', 'GF Dancing Beat Hair blowing CAR', [10, 11, 12, 25, 26, 27], "", 24, true); addOffset('danceLeft', 0); addOffset('danceRight', 0); + addOffset('idleHair', 0); playAnim('danceRight'); @@ -198,12 +200,14 @@ class Character extends FlxSprite // ANIMATION IS CALLED MOM LEFT POSE BUT ITS FOR THE RIGHT // CUZ DAVE IS DUMB! quickAnimAdd('singRIGHT', 'Mom Pose Left'); + animation.addByIndices('idleHair', "Mom Idle", [10, 11, 12, 13], "", 24, true); addOffset('idle'); addOffset("singUP", 14, 71); addOffset("singRIGHT", 10, -60); addOffset("singLEFT", 250, -23); addOffset("singDOWN", 20, -160); + addOffset('idleHair'); playAnim('idle'); case 'monster': @@ -355,6 +359,7 @@ class Character extends FlxSprite quickAnimAdd('singLEFTmiss', 'BF NOTE LEFT MISS'); quickAnimAdd('singRIGHTmiss', 'BF NOTE RIGHT MISS'); quickAnimAdd('singDOWNmiss', 'BF NOTE DOWN MISS'); + animation.addByIndices('idleHair', 'BF idle dance', [10, 11, 12, 13], "", 24, true); addOffset('idle', -5); addOffset("singUP", -29, 27); @@ -365,6 +370,7 @@ class Character extends FlxSprite addOffset("singRIGHTmiss", -30, 21); addOffset("singLEFTmiss", 12, 24); addOffset("singDOWNmiss", -11, -19); + addOffset('idleHair', -5); playAnim('idle'); flipX = true; @@ -605,6 +611,13 @@ class Character extends FlxSprite } } + if (curCharacter.endsWith('-car')) + { + // looping hair anims after idle finished + if (!animation.curAnim.name.startsWith('sing') && animation.curAnim.finished) + playAnim('idleHair'); + } + switch (curCharacter) { case 'gf':