mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-01-14 08:37:49 +00:00
Rename combo milestone
This commit is contained in:
parent
b783271451
commit
6ac4db48d9
|
@ -5,14 +5,14 @@ import flixel.group.FlxGroup.FlxTypedGroup;
|
||||||
import flixel.group.FlxSpriteGroup.FlxTypedSpriteGroup;
|
import flixel.group.FlxSpriteGroup.FlxTypedSpriteGroup;
|
||||||
import flixel.util.FlxTimer;
|
import flixel.util.FlxTimer;
|
||||||
|
|
||||||
class ComboCounter extends FlxTypedSpriteGroup<FlxSprite>
|
class ComboMilestone extends FlxTypedSpriteGroup<FlxSprite>
|
||||||
{
|
{
|
||||||
var effectStuff:FlxSprite;
|
var effectStuff:FlxSprite;
|
||||||
|
|
||||||
var wasComboSetup:Bool = false;
|
var wasComboSetup:Bool = false;
|
||||||
var daCombo:Int = 0;
|
var daCombo:Int = 0;
|
||||||
|
|
||||||
var grpNumbers:FlxTypedGroup<ComboNumber>;
|
var grpNumbers:FlxTypedGroup<ComboMilestoneNumber>;
|
||||||
|
|
||||||
var onScreenTime:Float = 0;
|
var onScreenTime:Float = 0;
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ class ComboCounter extends FlxTypedSpriteGroup<FlxSprite>
|
||||||
this.daCombo = daCombo;
|
this.daCombo = daCombo;
|
||||||
|
|
||||||
effectStuff = new FlxSprite(0, 0);
|
effectStuff = new FlxSprite(0, 0);
|
||||||
effectStuff.frames = Paths.getSparrowAtlas('noteCombo');
|
effectStuff.frames = Paths.getSparrowAtlas('comboMilestone');
|
||||||
effectStuff.animation.addByPrefix('funny', 'NOTE COMBO animation', 24, false);
|
effectStuff.animation.addByPrefix('funny', 'NOTE COMBO animation', 24, false);
|
||||||
effectStuff.animation.play('funny');
|
effectStuff.animation.play('funny');
|
||||||
effectStuff.antialiasing = true;
|
effectStuff.antialiasing = true;
|
||||||
|
@ -33,7 +33,7 @@ class ComboCounter extends FlxTypedSpriteGroup<FlxSprite>
|
||||||
effectStuff.setGraphicSize(Std.int(effectStuff.width * 0.7));
|
effectStuff.setGraphicSize(Std.int(effectStuff.width * 0.7));
|
||||||
add(effectStuff);
|
add(effectStuff);
|
||||||
|
|
||||||
grpNumbers = new FlxTypedGroup<ComboNumber>();
|
grpNumbers = new FlxTypedGroup<ComboMilestoneNumber>();
|
||||||
// add(grpNumbers);
|
// add(grpNumbers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ class ComboCounter extends FlxTypedSpriteGroup<FlxSprite>
|
||||||
{
|
{
|
||||||
if (onScreenTime < 0.9)
|
if (onScreenTime < 0.9)
|
||||||
{
|
{
|
||||||
new FlxTimer().start((Conductor.crochet / 1000) * 0.25, function(tmr) {
|
new FlxTimer().start((Conductor.beatLengthMs / 1000) * 0.25, function(tmr) {
|
||||||
forceFinish();
|
forceFinish();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -62,14 +62,14 @@ class ComboCounter extends FlxTypedSpriteGroup<FlxSprite>
|
||||||
|
|
||||||
if (effectStuff.animation.curAnim.curFrame == 18)
|
if (effectStuff.animation.curAnim.curFrame == 18)
|
||||||
{
|
{
|
||||||
grpNumbers.forEach(function(spr:ComboNumber) {
|
grpNumbers.forEach(function(spr:ComboMilestoneNumber) {
|
||||||
spr.animation.reset();
|
spr.animation.reset();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (effectStuff.animation.curAnim.curFrame == 20)
|
if (effectStuff.animation.curAnim.curFrame == 20)
|
||||||
{
|
{
|
||||||
grpNumbers.forEach(function(spr:ComboNumber) {
|
grpNumbers.forEach(function(spr:ComboMilestoneNumber) {
|
||||||
spr.kill();
|
spr.kill();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ class ComboCounter extends FlxTypedSpriteGroup<FlxSprite>
|
||||||
|
|
||||||
while (daCombo > 0)
|
while (daCombo > 0)
|
||||||
{
|
{
|
||||||
var comboNumber:ComboNumber = new ComboNumber(450 - (100 * loopNum), 20 + 14 * loopNum, daCombo % 10);
|
var comboNumber:ComboMilestoneNumber = new ComboMilestoneNumber(450 - (100 * loopNum), 20 + 14 * loopNum, daCombo % 10);
|
||||||
comboNumber.setGraphicSize(Std.int(comboNumber.width * 0.7));
|
comboNumber.setGraphicSize(Std.int(comboNumber.width * 0.7));
|
||||||
grpNumbers.add(comboNumber);
|
grpNumbers.add(comboNumber);
|
||||||
add(comboNumber);
|
add(comboNumber);
|
||||||
|
@ -95,27 +95,17 @@ class ComboCounter extends FlxTypedSpriteGroup<FlxSprite>
|
||||||
|
|
||||||
daCombo = Math.floor(daCombo / 10);
|
daCombo = Math.floor(daCombo / 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
// var comboNumber:ComboNumber = new ComboNumber(420, 0, 0);
|
|
||||||
|
|
||||||
// add to both, in the group just for ez organize/accessing
|
|
||||||
// grpNumbers.add(comboNumber);
|
|
||||||
// add(comboNumber);
|
|
||||||
|
|
||||||
// var comboNumber2:ComboNumber = new ComboNumber(420 - 134, 44, 0);
|
|
||||||
// grpNumbers.add(comboNumber2);
|
|
||||||
// add(comboNumber2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ComboNumber extends FlxSprite
|
class ComboMilestoneNumber extends FlxSprite
|
||||||
{
|
{
|
||||||
public function new(x:Float, y:Float, digit:Int)
|
public function new(x:Float, y:Float, digit:Int)
|
||||||
{
|
{
|
||||||
super(x - 20, y);
|
super(x - 20, y);
|
||||||
|
|
||||||
var stringNum:String = Std.string(digit);
|
var stringNum:String = Std.string(digit);
|
||||||
frames = Paths.getSparrowAtlas('noteComboNumbers');
|
frames = Paths.getSparrowAtlas('comboMilestoneNumbers');
|
||||||
animation.addByPrefix(stringNum, stringNum, 24, false);
|
animation.addByPrefix(stringNum, stringNum, 24, false);
|
||||||
animation.play(stringNum);
|
animation.play(stringNum);
|
||||||
antialiasing = true;
|
antialiasing = true;
|
||||||
|
|
Loading…
Reference in a new issue