1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2025-11-25 13:45:49 +00:00

tinkering shit

This commit is contained in:
CheemsAndFriends 2024-09-12 01:37:32 +02:00
parent 70ab000be4
commit 3553d008cf
6 changed files with 21 additions and 7 deletions

2
assets

@ -1 +1 @@
Subproject commit f1813c9e4f88426554293b68d8a46f5baa5b6228 Subproject commit 6b84e5b4830cbdb21f0e92bd8def16b1446f2d84

View file

@ -154,6 +154,10 @@ class FlxAtlasSprite extends FlxAnimate
{ {
if (!anim.isPlaying) if (!anim.isPlaying)
{ {
if (fr != null) anim.curFrame = fr.index + startFrame;
else
anim.curFrame = startFrame;
// Resume animation if it's paused. // Resume animation if it's paused.
anim.resume(); anim.resume();
} }
@ -183,7 +187,9 @@ class FlxAtlasSprite extends FlxAnimate
trace('Playing animation $id'); trace('Playing animation $id');
if (this.anim.symbolDictionary.exists(id) || (this.anim.getByName(id) != null)) if (this.anim.symbolDictionary.exists(id) || (this.anim.getByName(id) != null))
{ {
this.anim.play(id, true, false, startFrame); this.anim.play(id, restart, false, startFrame);
if (id == "Boyfriend DJ fist pump" || startFrame == 4) trace("PUMP COMMAND: " + anim.curFrame);
fr = null; fr = null;
} }
// Only call goToFrameLabel if there is a frame label with that name. This prevents annoying warnings! // Only call goToFrameLabel if there is a frame label with that name. This prevents annoying warnings!
@ -296,7 +302,7 @@ class FlxAtlasSprite extends FlxAnimate
anim.curFrame = (fr != null) ? fr.index : 0; anim.curFrame = (fr != null) ? fr.index : 0;
anim.resume(); anim.resume();
} }
else if (fr != null) else if (fr != null && anim.curFrame != anim.length - 1)
{ {
anim.curFrame--; anim.curFrame--;
} }

View file

@ -194,6 +194,7 @@ class ResultState extends MusicBeatSubState
{ {
// Animation is not looped. // Animation is not looped.
animation.onAnimationComplete.add((_name:String) -> { animation.onAnimationComplete.add((_name:String) -> {
trace("AHAHAH 2");
if (animation != null) if (animation != null)
{ {
animation.anim.pause(); animation.anim.pause();
@ -203,9 +204,10 @@ class ResultState extends MusicBeatSubState
else if (animData.loopFrameLabel != null) else if (animData.loopFrameLabel != null)
{ {
animation.onAnimationComplete.add((_name:String) -> { animation.onAnimationComplete.add((_name:String) -> {
trace("AHAHAH 2");
if (animation != null) if (animation != null)
{ {
animation.playAnimation(animData.loopFrameLabel ?? ''); // unpauses this anim, since it's on PlayOnce! animation.playAnimation(animData.loopFrameLabel ?? '', true, false, true); // unpauses this anim, since it's on PlayOnce!
} }
}); });
} }
@ -214,6 +216,7 @@ class ResultState extends MusicBeatSubState
animation.onAnimationComplete.add((_name:String) -> { animation.onAnimationComplete.add((_name:String) -> {
if (animation != null) if (animation != null)
{ {
trace("AHAHAH");
animation.anim.curFrame = animData.loopFrame ?? 0; animation.anim.curFrame = animData.loopFrame ?? 0;
animation.anim.play(); // unpauses this anim, since it's on PlayOnce! animation.anim.play(); // unpauses this anim, since it's on PlayOnce!
} }

View file

@ -27,7 +27,7 @@ class CharSelectPlayer extends FlxAtlasSprite implements IBPMSyncedScriptedClass
case "deselect": case "deselect":
playAnimation("deselect loop start", true, false, true); playAnimation("deselect loop start", true, false, true);
case "slidein idle point", "cannot select", "unlock": case "slidein idle point", "cannot select Label", "unlock":
playAnimation("idle", true, false, false); playAnimation("idle", true, false, false);
case "idle": case "idle":
trace('Waiting for onBeatHit'); trace('Waiting for onBeatHit');

View file

@ -141,6 +141,7 @@ class FreeplayDJ extends FlxAtlasSprite
} }
else if (getCurrentAnimation() == animPrefixB) else if (getCurrentAnimation() == animPrefixB)
{ {
trace("Loss Intro");
var endFrame = playableCharData.getFistPumpIntroBadEndFrame(); var endFrame = playableCharData.getFistPumpIntroBadEndFrame();
if (endFrame > -1 && anim.curFrame >= endFrame) if (endFrame > -1 && anim.curFrame >= endFrame)
{ {
@ -166,6 +167,7 @@ class FreeplayDJ extends FlxAtlasSprite
} }
else if (getCurrentAnimation() == animPrefixB) else if (getCurrentAnimation() == animPrefixB)
{ {
trace("Loss GYATT");
var endFrame = playableCharData.getFistPumpLoopBadEndFrame(); var endFrame = playableCharData.getFistPumpLoopBadEndFrame();
if (endFrame > -1 && anim.curFrame >= endFrame) if (endFrame > -1 && anim.curFrame >= endFrame)
{ {

View file

@ -273,8 +273,11 @@ class TitleState extends MusicBeatState
} }
#end #end
if (Save.instance.charactersSeen.contains("pico")) Save.instance.charactersSeen.remove("pico"); if (Save.instance.charactersSeen.contains("pico"))
{
Save.instance.charactersSeen.remove("pico");
Save.instance.oldChar = false;
}
Conductor.instance.update(); Conductor.instance.update();
/* if (FlxG.onMobile) /* if (FlxG.onMobile)