1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-09 16:24:42 +00:00

darnell looping and sustain note holding anim stuf

This commit is contained in:
Cameron Taylor 2021-09-02 17:32:50 -04:00
parent ab501cc533
commit 2705ae3e16
2 changed files with 22 additions and 9 deletions

View file

@ -500,6 +500,16 @@ class Character extends FlxSprite
loadOffsetFile(curCharacter);
playAnim('idle');
animation.finishCallback = function(animShit:String)
{
if (animShit.startsWith('sing'))
{
// loop the anim
// this way is a little verbose, but basically sets it to the same animation, but 8 frames before finish
playAnim(animShit, true, false, animation.getByName(animShit).frames.length - 8);
}
}
}
dance();

View file

@ -2101,6 +2101,8 @@ class PlayState extends MusicBeatState
if (daNote.altNote)
altAnim = '-alt';
if (!daNote.isSustainNote)
{
switch (Math.abs(daNote.noteData))
{
case 0:
@ -2112,6 +2114,7 @@ class PlayState extends MusicBeatState
case 3:
dad.playAnim('singRIGHT' + altAnim, true);
}
}
dad.holdTimer = 0;