1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-09-17 15:38:52 +00:00

cool funny light

This commit is contained in:
Cameron Taylor 2021-12-06 00:41:10 -05:00
parent 0b1bac9db4
commit 5c14a5e5e3
2 changed files with 43 additions and 12 deletions

View file

@ -222,7 +222,7 @@ class FreeplayState extends MusicBeatSubstate
{
fnfFreeplay.visible = true;
fp.visible = true;
fp.updateScore(0);
fp.updateScore(FlxG.random.int(0, 1000));
new FlxTimer().start(1.5 / 24, function(bold)
{
@ -388,6 +388,8 @@ class FreeplayState extends MusicBeatSubstate
lerpScore = CoolUtil.coolLerp(lerpScore, intendedScore, 0.4);
fp.scoreShit = Std.int(lerpScore);
scoreText.text = "PERSONAL BEST:" + Math.round(lerpScore);
positionHighscore();
@ -566,7 +568,8 @@ class FreeplayState extends MusicBeatSubstate
if (curDifficulty > 2)
curDifficulty = 0;
intendedScore = Highscore.getScore(songs[curSelected].songName, curDifficulty);
// intendedScore = Highscore.getScore(songs[curSelected].songName, curDifficulty);
intendedScore = FlxG.random.int(0, 100000);
PlayState.storyDifficulty = curDifficulty;
@ -589,7 +592,7 @@ class FreeplayState extends MusicBeatSubstate
function changeSelection(change:Int = 0)
{
fp.updateScore(0);
// fp.updateScore(12345);
NGio.logEvent('Fresh');
@ -605,7 +608,8 @@ class FreeplayState extends MusicBeatSubstate
// selector.y = (70 * curSelected) + 30;
intendedScore = Highscore.getScore(songs[curSelected].songName, curDifficulty);
// intendedScore = Highscore.getScore(songs[curSelected].songName, curDifficulty);
intendedScore = FlxG.random.int(0, 1000000);
// lerpScore = 0;
#if PRELOAD_ALL

View file

@ -3,28 +3,52 @@ package freeplayStuff;
import flixel.FlxSprite;
import flixel.group.FlxSpriteGroup.FlxTypedSpriteGroup;
using StringTools;
class FreeplayScore extends FlxTypedSpriteGroup<ScoreNum>
{
public var scoreShit:Int = 0;
public var scoreShit(default, set):Int = 0;
function set_scoreShit(val):Int
{
var loopNum:Int = group.members.length - 1;
var dumbNumb = Std.parseInt(Std.string(val));
while (dumbNumb > 0)
{
trace(dumbNumb);
group.members[loopNum].digit = dumbNumb % 10;
dumbNumb = Math.floor(dumbNumb / 10);
loopNum--;
}
while (loopNum > 0)
{
group.members[loopNum].digit = 0;
loopNum--;
}
trace(val);
return val;
}
public function new(x:Float, y:Float, scoreShit:Int = 100)
{
super(x, y);
this.scoreShit = scoreShit;
for (i in 0...7)
{
add(new ScoreNum(x + (45 * i), y, 0));
}
this.scoreShit = scoreShit;
}
public function updateScore(scoreNew:Int)
{
forEach(function(numScore)
{
numScore.digit = 8;
});
scoreShit = scoreNew;
}
}
@ -34,7 +58,10 @@ class ScoreNum extends FlxSprite
function set_digit(val):Int
{
animation.play(Std.string(FlxG.random.int(0, 9)), true, false, 0);
if (animation.curAnim != null && animation.curAnim.name != Std.string(val))
{
animation.play(Std.string(val), true, false, 0);
}
return val;
}