mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-09-12 05:07:06 +00:00
min timing shit in progres
This commit is contained in:
parent
f314fe3a4b
commit
471ffd7989
|
@ -3,6 +3,7 @@ package;
|
||||||
import flixel.FlxSprite;
|
import flixel.FlxSprite;
|
||||||
import flixel.group.FlxGroup.FlxTypedGroup;
|
import flixel.group.FlxGroup.FlxTypedGroup;
|
||||||
import flixel.group.FlxSpriteGroup.FlxTypedSpriteGroup;
|
import flixel.group.FlxSpriteGroup.FlxTypedSpriteGroup;
|
||||||
|
import flixel.util.FlxTimer;
|
||||||
|
|
||||||
class ComboCounter extends FlxTypedSpriteGroup<FlxSprite>
|
class ComboCounter extends FlxTypedSpriteGroup<FlxSprite>
|
||||||
{
|
{
|
||||||
|
@ -13,6 +14,8 @@ class ComboCounter extends FlxTypedSpriteGroup<FlxSprite>
|
||||||
|
|
||||||
var grpNumbers:FlxTypedGroup<ComboNumber>;
|
var grpNumbers:FlxTypedGroup<ComboNumber>;
|
||||||
|
|
||||||
|
var onScreenTime:Float = 0;
|
||||||
|
|
||||||
public function new(x:Float, y:Float, daCombo:Int = 0)
|
public function new(x:Float, y:Float, daCombo:Int = 0)
|
||||||
{
|
{
|
||||||
super(x, y);
|
super(x, y);
|
||||||
|
@ -36,11 +39,21 @@ class ComboCounter extends FlxTypedSpriteGroup<FlxSprite>
|
||||||
|
|
||||||
public function forceFinish():Void
|
public function forceFinish():Void
|
||||||
{
|
{
|
||||||
effectStuff.animation.play('funny', true, false, 18);
|
if (onScreenTime < 0.9)
|
||||||
|
{
|
||||||
|
new FlxTimer().start((Conductor.crochet / 1000) * 0.25, function(tmr)
|
||||||
|
{
|
||||||
|
forceFinish();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
effectStuff.animation.play('funny', true, false, 18);
|
||||||
}
|
}
|
||||||
|
|
||||||
override function update(elapsed:Float)
|
override function update(elapsed:Float)
|
||||||
{
|
{
|
||||||
|
onScreenTime += elapsed;
|
||||||
|
|
||||||
if (effectStuff.animation.curAnim.curFrame == 17)
|
if (effectStuff.animation.curAnim.curFrame == 17)
|
||||||
effectStuff.animation.pause();
|
effectStuff.animation.pause();
|
||||||
|
|
||||||
|
|
|
@ -3020,7 +3020,6 @@ class PlayState extends MusicBeatState
|
||||||
var frameShit:Float = (1 / 24) * 2; // equals 2 frames in the animation
|
var frameShit:Float = (1 / 24) * 2; // equals 2 frames in the animation
|
||||||
|
|
||||||
new FlxTimer().start(((Conductor.crochet / 1000) * 1.25) - frameShit, function(tmr)
|
new FlxTimer().start(((Conductor.crochet / 1000) * 1.25) - frameShit, function(tmr)
|
||||||
|
|
||||||
{
|
{
|
||||||
animShit.forceFinish();
|
animShit.forceFinish();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue