mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-23 15:26:06 +00:00
scores in progress
This commit is contained in:
parent
cb11c78c26
commit
97ba544409
|
@ -1,14 +1,16 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
All notable changes will be documented in this file.
|
All notable changes will be documented in this file.
|
||||||
|
|
||||||
## [Unreleased]
|
## [1.1.0]
|
||||||
### Added
|
### Added
|
||||||
- 32bit support
|
- 32bit support
|
||||||
- Controller (dancepads) support
|
- Controller (dancepads) support
|
||||||
- Pause screen
|
- Pause screen
|
||||||
- Main Menu overhaul
|
- Main Menu overhaul
|
||||||
- Cool intro screen thing
|
- Cool intro screen thing
|
||||||
|
- Uh lots of bullshit
|
||||||
|
- Remind me to actually add this later lmaooo
|
||||||
|
|
||||||
## [0.1.0] - 2020-10-05
|
## [1.0.0] - 2020-10-05
|
||||||
### Added
|
### Added
|
||||||
- Uh, everything. This the game's initial gamejam release. We put it out
|
- Uh, everything. This the game's initial gamejam release. We put it out
|
|
@ -95,5 +95,5 @@
|
||||||
<!--Place custom nodes like icons here (higher priority to override the HaxeFlixel icon)-->
|
<!--Place custom nodes like icons here (higher priority to override the HaxeFlixel icon)-->
|
||||||
<icon path="art/icon.png"/>
|
<icon path="art/icon.png"/>
|
||||||
<!-- <haxedef name="SKIP_TO_PLAYSTATE" if="debug" /> -->
|
<!-- <haxedef name="SKIP_TO_PLAYSTATE" if="debug" /> -->
|
||||||
<!-- <haxedef name="NG_LOGIN" /> -->
|
<haxedef name="NG_LOGIN" />
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -12,6 +12,8 @@ class GameOverSubstate extends MusicBeatSubstate
|
||||||
var bf:Boyfriend;
|
var bf:Boyfriend;
|
||||||
var camFollow:FlxObject;
|
var camFollow:FlxObject;
|
||||||
|
|
||||||
|
// var
|
||||||
|
|
||||||
public function new(x:Float, y:Float)
|
public function new(x:Float, y:Float)
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
|
|
|
@ -73,7 +73,11 @@ class MainMenuState extends MusicBeatState
|
||||||
super.create();
|
super.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var selectedSomethin:Bool = false;
|
||||||
|
|
||||||
override function update(elapsed:Float)
|
override function update(elapsed:Float)
|
||||||
|
{
|
||||||
|
if (!selectedSomethin)
|
||||||
{
|
{
|
||||||
if (controls.UP_P)
|
if (controls.UP_P)
|
||||||
{
|
{
|
||||||
|
@ -92,8 +96,6 @@ class MainMenuState extends MusicBeatState
|
||||||
FlxG.switchState(new TitleState());
|
FlxG.switchState(new TitleState());
|
||||||
}
|
}
|
||||||
|
|
||||||
super.update(elapsed);
|
|
||||||
|
|
||||||
if (controls.ACCEPT)
|
if (controls.ACCEPT)
|
||||||
{
|
{
|
||||||
if (optionShit[curSelected] == 'donate')
|
if (optionShit[curSelected] == 'donate')
|
||||||
|
@ -102,6 +104,7 @@ class MainMenuState extends MusicBeatState
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
selectedSomethin = true;
|
||||||
FlxG.sound.play('assets/sounds/confirmMenu' + TitleState.soundExt);
|
FlxG.sound.play('assets/sounds/confirmMenu' + TitleState.soundExt);
|
||||||
|
|
||||||
FlxFlicker.flicker(magenta, 1.1, 0.15, false);
|
FlxFlicker.flicker(magenta, 1.1, 0.15, false);
|
||||||
|
@ -136,6 +139,9 @@ class MainMenuState extends MusicBeatState
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
super.update(elapsed);
|
||||||
|
|
||||||
menuItems.forEach(function(spr:FlxSprite)
|
menuItems.forEach(function(spr:FlxSprite)
|
||||||
{
|
{
|
||||||
|
|
|
@ -109,6 +109,24 @@ class NGio
|
||||||
// more info on scores --- http://www.newgrounds.io/help/components/#scoreboard-getscores
|
// more info on scores --- http://www.newgrounds.io/help/components/#scoreboard-getscores
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline static public function postScore(score:Int = 0, song:String)
|
||||||
|
{
|
||||||
|
if (isLoggedIn)
|
||||||
|
{
|
||||||
|
for (id in NG.core.scoreBoards.keys())
|
||||||
|
{
|
||||||
|
var board = NG.core.scoreBoards.get(id);
|
||||||
|
|
||||||
|
if (song == board.name)
|
||||||
|
{
|
||||||
|
board.postScore(score, "Uhh meow?");
|
||||||
|
}
|
||||||
|
|
||||||
|
// trace('loaded scoreboard id:$id, name:${board.name}');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function onNGScoresFetch():Void
|
function onNGScoresFetch():Void
|
||||||
{
|
{
|
||||||
scoreboardsLoaded = true;
|
scoreboardsLoaded = true;
|
||||||
|
|
|
@ -80,6 +80,7 @@ class PlayState extends MusicBeatState
|
||||||
var halloweenBG:FlxSprite;
|
var halloweenBG:FlxSprite;
|
||||||
|
|
||||||
var talking:Bool = true;
|
var talking:Bool = true;
|
||||||
|
var songScore:Int = 0;
|
||||||
|
|
||||||
override public function create()
|
override public function create()
|
||||||
{
|
{
|
||||||
|
@ -808,6 +809,8 @@ class PlayState extends MusicBeatState
|
||||||
{
|
{
|
||||||
trace('SONG DONE' + isStoryMode);
|
trace('SONG DONE' + isStoryMode);
|
||||||
|
|
||||||
|
NGio.postScore(songScore, SONG.song);
|
||||||
|
|
||||||
if (isStoryMode)
|
if (isStoryMode)
|
||||||
{
|
{
|
||||||
storyPlaylist.remove(storyPlaylist[0]);
|
storyPlaylist.remove(storyPlaylist[0]);
|
||||||
|
@ -819,6 +822,11 @@ class PlayState extends MusicBeatState
|
||||||
FlxG.switchState(new StoryMenuState());
|
FlxG.switchState(new StoryMenuState());
|
||||||
|
|
||||||
StoryMenuState.weekUnlocked[1] = true;
|
StoryMenuState.weekUnlocked[1] = true;
|
||||||
|
|
||||||
|
NGio.unlockMedal(60961);
|
||||||
|
|
||||||
|
FlxG.save.data.weekUnlocked = StoryMenuState.weekUnlocked;
|
||||||
|
FlxG.save.flush();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -856,22 +864,28 @@ class PlayState extends MusicBeatState
|
||||||
//
|
//
|
||||||
|
|
||||||
var rating:FlxSprite = new FlxSprite();
|
var rating:FlxSprite = new FlxSprite();
|
||||||
|
var score:Int = 350;
|
||||||
|
|
||||||
var daRating:String = "sick";
|
var daRating:String = "sick";
|
||||||
|
|
||||||
if (noteDiff > Conductor.safeZoneOffset * 0.9)
|
if (noteDiff > Conductor.safeZoneOffset * 0.9)
|
||||||
{
|
{
|
||||||
daRating = 'shit';
|
daRating = 'shit';
|
||||||
|
score = 50;
|
||||||
}
|
}
|
||||||
else if (noteDiff > Conductor.safeZoneOffset * 0.75)
|
else if (noteDiff > Conductor.safeZoneOffset * 0.75)
|
||||||
{
|
{
|
||||||
daRating = 'bad';
|
daRating = 'bad';
|
||||||
|
score = 100;
|
||||||
}
|
}
|
||||||
else if (noteDiff > Conductor.safeZoneOffset * 0.2)
|
else if (noteDiff > Conductor.safeZoneOffset * 0.2)
|
||||||
{
|
{
|
||||||
daRating = 'good';
|
daRating = 'good';
|
||||||
|
score = 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
songScore += score;
|
||||||
|
|
||||||
/* if (combo > 60)
|
/* if (combo > 60)
|
||||||
daRating = 'sick';
|
daRating = 'sick';
|
||||||
else if (combo > 12)
|
else if (combo > 12)
|
||||||
|
@ -921,6 +935,8 @@ class PlayState extends MusicBeatState
|
||||||
numScore.acceleration.y = FlxG.random.int(200, 300);
|
numScore.acceleration.y = FlxG.random.int(200, 300);
|
||||||
numScore.velocity.y -= FlxG.random.int(140, 160);
|
numScore.velocity.y -= FlxG.random.int(140, 160);
|
||||||
numScore.velocity.x = FlxG.random.float(-5, 5);
|
numScore.velocity.x = FlxG.random.float(-5, 5);
|
||||||
|
|
||||||
|
if (combo >= 10 || combo == 0)
|
||||||
add(numScore);
|
add(numScore);
|
||||||
|
|
||||||
FlxTween.tween(numScore, {alpha: 0}, 0.2, {
|
FlxTween.tween(numScore, {alpha: 0}, 0.2, {
|
||||||
|
@ -1107,6 +1123,8 @@ class PlayState extends MusicBeatState
|
||||||
}
|
}
|
||||||
combo = 0;
|
combo = 0;
|
||||||
|
|
||||||
|
songScore -= 10;
|
||||||
|
|
||||||
FlxG.sound.play('assets/sounds/missnote' + FlxG.random.int(1, 3) + TitleState.soundExt, FlxG.random.float(0.1, 0.2));
|
FlxG.sound.play('assets/sounds/missnote' + FlxG.random.int(1, 3) + TitleState.soundExt, FlxG.random.float(0.1, 0.2));
|
||||||
// FlxG.sound.play('assets/sounds/missnote1' + TitleState.soundExt, 1, false);
|
// FlxG.sound.play('assets/sounds/missnote1' + TitleState.soundExt, 1, false);
|
||||||
// FlxG.log.add('played imss note');
|
// FlxG.log.add('played imss note');
|
||||||
|
|
|
@ -92,6 +92,13 @@ class TitleState extends MusicBeatState
|
||||||
FlxG.sound.playMusic('assets/music/freakyMenu' + TitleState.soundExt, 0);
|
FlxG.sound.playMusic('assets/music/freakyMenu' + TitleState.soundExt, 0);
|
||||||
|
|
||||||
FlxG.sound.music.fadeIn(4, 0, 0.7);
|
FlxG.sound.music.fadeIn(4, 0, 0.7);
|
||||||
|
|
||||||
|
FlxG.save.bind('funkin', 'ninjamuffin99');
|
||||||
|
|
||||||
|
if (FlxG.save.data.weekUnlocked != null)
|
||||||
|
{
|
||||||
|
StoryMenuState.weekUnlocked = FlxG.save.data.weekUnlocked;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Conductor.changeBPM(102);
|
Conductor.changeBPM(102);
|
||||||
|
|
Loading…
Reference in a new issue