mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-03-22 09:59:25 +00:00
does notesplash
This commit is contained in:
parent
4b500f78e1
commit
e462b04b59
|
@ -141,7 +141,7 @@ class HitNoteScriptEvent extends NoteScriptEvent
|
|||
public var score:Int;
|
||||
|
||||
/**
|
||||
* Whether the judgement caused a combo break.
|
||||
* If the hit causes a combo break.
|
||||
*/
|
||||
public var isComboBreak:Bool = false;
|
||||
|
||||
|
@ -150,19 +150,26 @@ class HitNoteScriptEvent extends NoteScriptEvent
|
|||
*/
|
||||
public var hitDiff:Float = 0;
|
||||
|
||||
public function new(note:NoteSprite, healthChange:Float, score:Int, judgement:String, isComboBreak:Bool, comboCount:Int = 0, hitDiff:Float = 0):Void
|
||||
/**
|
||||
* If the hit causes a notesplash
|
||||
*/
|
||||
public var doesNotesplash:Bool = false;
|
||||
|
||||
public function new(note:NoteSprite, healthChange:Float, score:Int, judgement:String, isComboBreak:Bool, comboCount:Int = 0, hitDiff:Float = 0,
|
||||
doesNotesplash:Bool = false):Void
|
||||
{
|
||||
super(NOTE_HIT, note, healthChange, comboCount, true);
|
||||
this.score = score;
|
||||
this.judgement = judgement;
|
||||
this.isComboBreak = isComboBreak;
|
||||
this.doesNotesplash = doesNotesplash;
|
||||
this.hitDiff = hitDiff;
|
||||
}
|
||||
|
||||
public override function toString():String
|
||||
{
|
||||
return 'HitNoteScriptEvent(note=' + note + ', comboCount=' + comboCount + ', judgement=' + judgement + ', score=' + score + ', isComboBreak='
|
||||
+ isComboBreak + ', hitDiff=' + hitDiff + ')';
|
||||
+ isComboBreak + ', hitDiff=' + hitDiff + ', doesNotesplash=' + doesNotesplash + ')';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2400,7 +2400,8 @@ class PlayState extends MusicBeatSubState
|
|||
}
|
||||
|
||||
// Send the note hit event.
|
||||
var event:HitNoteScriptEvent = new HitNoteScriptEvent(note, healthChange, score, daRating, isComboBreak, Highscore.tallies.combo + 1, noteDiff);
|
||||
var event:HitNoteScriptEvent = new HitNoteScriptEvent(note, healthChange, score, daRating, isComboBreak, Highscore.tallies.combo + 1, noteDiff,
|
||||
daRating == 'sick');
|
||||
dispatchEvent(event);
|
||||
|
||||
// Calling event.cancelEvent() skips all the other logic! Neat!
|
||||
|
@ -2409,7 +2410,7 @@ class PlayState extends MusicBeatSubState
|
|||
Highscore.tallies.totalNotesHit++;
|
||||
// Display the hit on the strums
|
||||
playerStrumline.hitNote(note, !isComboBreak);
|
||||
if (daRating == 'sick') playerStrumline.playNoteSplash(note.noteData.getDirection());
|
||||
if (event.doesNotesplash) playerStrumline.playNoteSplash(note.noteData.getDirection());
|
||||
if (note.isHoldNote && note.holdNoteSprite != null) playerStrumline.playNoteHoldCover(note.holdNoteSprite);
|
||||
vocals.playerVolume = 1;
|
||||
|
||||
|
|
Loading…
Reference in a new issue