Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/poec987/FNF-V3
Browse files Browse the repository at this point in the history
  • Loading branch information
x8c8r committed Jun 26, 2024
2 parents a0f6ae7 + 49f7763 commit 8b06418
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
Binary file added assets/shared/images/noteTypes/Play Animation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion source/ChartingState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,8 @@ class ChartingState extends MusicBeatState

var noteTypes:Array<String> = [
"Normal",
// "Test",
"No Animation",
"Play Animation",
"Laugh",
"Kill Santa",
"Kill"
Expand Down
16 changes: 12 additions & 4 deletions source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,7 @@ class PlayState extends MusicBeatState
var daStrumTime:Float = songNotes[0];
var daNoteData:Int = Std.int(songNotes[1] % 4);
var noteType = songNotes[3];
var noteTypeParam = songNotes[4];

var gottaHitNote:Bool = section.mustHitSection;

Expand All @@ -1192,7 +1193,7 @@ class PlayState extends MusicBeatState
else
oldNote = null;

var swagNote:Note = new Note(daStrumTime, daNoteData, oldNote, false, noteType);
var swagNote:Note = new Note(daStrumTime, daNoteData, oldNote, false, noteType, noteTypeParam);
swagNote.sustainLength = songNotes[2];
swagNote.scrollFactor.set(0, 0);

Expand All @@ -1205,7 +1206,7 @@ class PlayState extends MusicBeatState
{
oldNote = unspawnNotes[Std.int(unspawnNotes.length - 1)];

var sustainNote:Note = new Note(daStrumTime + (Conductor.stepCrochet * susNote) + Conductor.stepCrochet, daNoteData, oldNote, true, noteType);
var sustainNote:Note = new Note(daStrumTime + (Conductor.stepCrochet * susNote) + Conductor.stepCrochet, daNoteData, oldNote, true, noteType, noteTypeParam);
sustainNote.scrollFactor.set();
unspawnNotes.push(sustainNote);

Expand Down Expand Up @@ -1785,7 +1786,7 @@ class PlayState extends MusicBeatState

noteTypeCheck(daNote, true, true);

if (daNote.noteType != "No Animation" && daNote.noteType != "Laugh") {
if (daNote.noteType != "No Animation" && daNote.noteType != "Laugh" && daNote.noteType != "Play Animation") {
switch (Math.abs(daNote.noteData))
{
case 2:
Expand Down Expand Up @@ -2452,7 +2453,7 @@ class PlayState extends MusicBeatState
else
health += 0.004;

if (note.noteType != "No Animation") {
if (note.noteType != "No Animation" && note.noteType != "Play Animation") {
switch (note.noteData)
{
case 2:
Expand Down Expand Up @@ -2491,6 +2492,8 @@ class PlayState extends MusicBeatState
var zeNoteType:String = notezzz.noteType;
var noteTypeParam:String = notezzz.noteTypeParam; // Funny little silly parameter in chart editor :P

//trace("NTParam: "+noteTypeParam);

if (zeNoteType == null)
zeNoteType = "Normal";

Expand All @@ -2516,6 +2519,11 @@ class PlayState extends MusicBeatState
// trace("Test Note POST HIT");
case "Laugh":
dad.animation.play('laugh', true);
case "Play Animation":
if (dadHit)
dad.animation.play(noteTypeParam, true);
else
boyfriend.animation.play(noteTypeParam, true);
case "Kill Santa":
santa.animation.play('DIE', true);
case "Kill":
Expand Down

0 comments on commit 8b06418

Please sign in to comment.