mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-27 17:33:03 +00:00
cool note thingies
This commit is contained in:
parent
85e181bc80
commit
45652399c3
38
source/NoteSplash.hx
Normal file
38
source/NoteSplash.hx
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
package;
|
||||||
|
|
||||||
|
import flixel.FlxG;
|
||||||
|
import flixel.FlxSprite;
|
||||||
|
import haxe.io.Path;
|
||||||
|
|
||||||
|
class NoteSplash extends FlxSprite
|
||||||
|
{
|
||||||
|
public function new(x:Float, y:Float, noteData:Int = 0):Void
|
||||||
|
{
|
||||||
|
super(x, y);
|
||||||
|
|
||||||
|
frames = Paths.getSparrowAtlas('noteSplashes');
|
||||||
|
|
||||||
|
animation.addByPrefix('note1-0', 'note impact 1 blue', 24, false);
|
||||||
|
animation.addByPrefix('note2-0', 'note impact 1 green', 24, false);
|
||||||
|
animation.addByPrefix('note0-0', 'note impact 1 purple', 24, false);
|
||||||
|
animation.addByPrefix('note3-0', 'note impact 1 red', 24, false);
|
||||||
|
animation.addByPrefix('note1-1', 'note impact 2 blue', 24, false);
|
||||||
|
animation.addByPrefix('note2-1', 'note impact 2 green', 24, false);
|
||||||
|
animation.addByPrefix('note0-1', 'note impact 2 purple', 24, false);
|
||||||
|
animation.addByPrefix('note3-1', 'note impact 2 red', 24, false);
|
||||||
|
|
||||||
|
animation.play('note' + noteData + '-' + FlxG.random.int(0, 1));
|
||||||
|
animation.curAnim.frameRate += FlxG.random.int(-2, 2);
|
||||||
|
updateHitbox();
|
||||||
|
|
||||||
|
offset.set(width * 0.3, height * 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
override function update(elapsed:Float)
|
||||||
|
{
|
||||||
|
if (animation.curAnim.finished)
|
||||||
|
kill();
|
||||||
|
|
||||||
|
super.update(elapsed);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1792,7 +1792,7 @@ class PlayState extends MusicBeatState
|
||||||
|
|
||||||
var endingSong:Bool = false;
|
var endingSong:Bool = false;
|
||||||
|
|
||||||
private function popUpScore(strumtime:Float):Void
|
private function popUpScore(strumtime:Float, daNote:Note):Void
|
||||||
{
|
{
|
||||||
var noteDiff:Float = Math.abs(strumtime - Conductor.songPosition);
|
var noteDiff:Float = Math.abs(strumtime - Conductor.songPosition);
|
||||||
// boyfriend.playAnim('hey');
|
// boyfriend.playAnim('hey');
|
||||||
|
@ -1810,20 +1810,33 @@ class PlayState extends MusicBeatState
|
||||||
|
|
||||||
var daRating:String = "sick";
|
var daRating:String = "sick";
|
||||||
|
|
||||||
|
var isSick:Bool = true;
|
||||||
|
|
||||||
if (noteDiff > Conductor.safeZoneOffset * 0.9)
|
if (noteDiff > Conductor.safeZoneOffset * 0.9)
|
||||||
{
|
{
|
||||||
daRating = 'shit';
|
daRating = 'shit';
|
||||||
score = 50;
|
score = 50;
|
||||||
|
isSick = false; // shitty copypaste on this literally just because im lazy and tired lol!
|
||||||
}
|
}
|
||||||
else if (noteDiff > Conductor.safeZoneOffset * 0.75)
|
else if (noteDiff > Conductor.safeZoneOffset * 0.75)
|
||||||
{
|
{
|
||||||
daRating = 'bad';
|
daRating = 'bad';
|
||||||
score = 100;
|
score = 100;
|
||||||
|
isSick = false;
|
||||||
}
|
}
|
||||||
else if (noteDiff > Conductor.safeZoneOffset * 0.2)
|
else if (noteDiff > Conductor.safeZoneOffset * 0.2)
|
||||||
{
|
{
|
||||||
daRating = 'good';
|
daRating = 'good';
|
||||||
score = 200;
|
score = 200;
|
||||||
|
isSick = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isSick)
|
||||||
|
{
|
||||||
|
var noteSplash:NoteSplash = new NoteSplash(daNote.x, daNote.y, daNote.noteData);
|
||||||
|
add(noteSplash);
|
||||||
|
|
||||||
|
noteSplash.cameras = [camHUD];
|
||||||
}
|
}
|
||||||
|
|
||||||
songScore += score;
|
songScore += score;
|
||||||
|
@ -2272,7 +2285,7 @@ class PlayState extends MusicBeatState
|
||||||
{
|
{
|
||||||
if (!note.isSustainNote)
|
if (!note.isSustainNote)
|
||||||
{
|
{
|
||||||
popUpScore(note.strumTime);
|
popUpScore(note.strumTime, note);
|
||||||
combo += 1;
|
combo += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
9
source/ui/SettingsMenu.hx
Normal file
9
source/ui/SettingsMenu.hx
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
package ui;
|
||||||
|
|
||||||
|
class SettingsMenu extends ui.OptionsState.Page
|
||||||
|
{
|
||||||
|
public function new()
|
||||||
|
{
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue