mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-01-02 10:19:48 +00:00
cool funny light
This commit is contained in:
parent
0b1bac9db4
commit
5c14a5e5e3
|
@ -222,7 +222,7 @@ class FreeplayState extends MusicBeatSubstate
|
||||||
{
|
{
|
||||||
fnfFreeplay.visible = true;
|
fnfFreeplay.visible = true;
|
||||||
fp.visible = true;
|
fp.visible = true;
|
||||||
fp.updateScore(0);
|
fp.updateScore(FlxG.random.int(0, 1000));
|
||||||
|
|
||||||
new FlxTimer().start(1.5 / 24, function(bold)
|
new FlxTimer().start(1.5 / 24, function(bold)
|
||||||
{
|
{
|
||||||
|
@ -388,6 +388,8 @@ class FreeplayState extends MusicBeatSubstate
|
||||||
|
|
||||||
lerpScore = CoolUtil.coolLerp(lerpScore, intendedScore, 0.4);
|
lerpScore = CoolUtil.coolLerp(lerpScore, intendedScore, 0.4);
|
||||||
|
|
||||||
|
fp.scoreShit = Std.int(lerpScore);
|
||||||
|
|
||||||
scoreText.text = "PERSONAL BEST:" + Math.round(lerpScore);
|
scoreText.text = "PERSONAL BEST:" + Math.round(lerpScore);
|
||||||
|
|
||||||
positionHighscore();
|
positionHighscore();
|
||||||
|
@ -566,7 +568,8 @@ class FreeplayState extends MusicBeatSubstate
|
||||||
if (curDifficulty > 2)
|
if (curDifficulty > 2)
|
||||||
curDifficulty = 0;
|
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;
|
PlayState.storyDifficulty = curDifficulty;
|
||||||
|
|
||||||
|
@ -589,7 +592,7 @@ class FreeplayState extends MusicBeatSubstate
|
||||||
|
|
||||||
function changeSelection(change:Int = 0)
|
function changeSelection(change:Int = 0)
|
||||||
{
|
{
|
||||||
fp.updateScore(0);
|
// fp.updateScore(12345);
|
||||||
|
|
||||||
NGio.logEvent('Fresh');
|
NGio.logEvent('Fresh');
|
||||||
|
|
||||||
|
@ -605,7 +608,8 @@ class FreeplayState extends MusicBeatSubstate
|
||||||
|
|
||||||
// selector.y = (70 * curSelected) + 30;
|
// 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;
|
// lerpScore = 0;
|
||||||
|
|
||||||
#if PRELOAD_ALL
|
#if PRELOAD_ALL
|
||||||
|
|
|
@ -3,28 +3,52 @@ package freeplayStuff;
|
||||||
import flixel.FlxSprite;
|
import flixel.FlxSprite;
|
||||||
import flixel.group.FlxSpriteGroup.FlxTypedSpriteGroup;
|
import flixel.group.FlxSpriteGroup.FlxTypedSpriteGroup;
|
||||||
|
|
||||||
|
using StringTools;
|
||||||
|
|
||||||
class FreeplayScore extends FlxTypedSpriteGroup<ScoreNum>
|
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)
|
public function new(x:Float, y:Float, scoreShit:Int = 100)
|
||||||
{
|
{
|
||||||
super(x, y);
|
super(x, y);
|
||||||
|
|
||||||
this.scoreShit = scoreShit;
|
|
||||||
|
|
||||||
for (i in 0...7)
|
for (i in 0...7)
|
||||||
{
|
{
|
||||||
add(new ScoreNum(x + (45 * i), y, 0));
|
add(new ScoreNum(x + (45 * i), y, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.scoreShit = scoreShit;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateScore(scoreNew:Int)
|
public function updateScore(scoreNew:Int)
|
||||||
{
|
{
|
||||||
forEach(function(numScore)
|
scoreShit = scoreNew;
|
||||||
{
|
|
||||||
numScore.digit = 8;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +58,10 @@ class ScoreNum extends FlxSprite
|
||||||
|
|
||||||
function set_digit(val):Int
|
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;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue