From 6a6e6cc4a5e0375a32337fce5cd83c98c75f5f10 Mon Sep 17 00:00:00 2001 From: entar Date: Mon, 30 Jun 2025 00:07:19 +0700 Subject: [PATCH] Fixed Note class function calls --- src/states/playstate.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/states/playstate.lua b/src/states/playstate.lua index a873556..7c2fae3 100644 --- a/src/states/playstate.lua +++ b/src/states/playstate.lua @@ -359,7 +359,7 @@ local function state(songName, songDifficulty, show) health = health + closestNote.hitHealth notes[closestIndex] = nil - closestNote:destroy() + closestNote:Destroy() score = score + rating.score totalScore = totalScore + rankWindows[1].score @@ -548,7 +548,7 @@ local function state(songName, songDifficulty, show) -- Spawn holds before normal notes so they are below them for index, holdNote in next, unspawnedHoldNotes do if (holdNote.position - elapsed) * speed < 600 then - holdNote:spawn() + holdNote:Spawn() unspawnedHoldNotes[index] = nil holdNotes[#holdNotes+1] = holdNote end @@ -557,7 +557,7 @@ local function state(songName, songDifficulty, show) for index, note in next, unspawnedNotes do if (note.position - elapsed) * speed < 600 then - note:spawn() + note:Spawn() unspawnedNotes[index] = nil notes[#notes+1] = note end @@ -568,7 +568,7 @@ local function state(songName, songDifficulty, show) if note.mustPress then note.sprite.position = Vector2(receptors[note.direction].position.x + note.offset.x, settings.Downscroll and receptors[note.direction].position.y - (note.position-elapsed) * speed or receptors[note.direction].position.y + (note.position - elapsed) * speed) if (note.position - elapsed) * speed < -150 then - note:destroy() + note:Destroy() miss:stop() miss:play() characters.bf:PlayAnimation("sing"..directions[note.direction].."miss") @@ -601,7 +601,7 @@ local function state(songName, songDifficulty, show) else characters.dad:PlayAnimation("sing"..directions[note.direction]) end - note:destroy() + note:Destroy() note = nil end end @@ -617,11 +617,11 @@ local function state(songName, songDifficulty, show) else characters.bf:PlayAnimation("sing"..directions[hold.direction]) end - hold:destroy() + hold:Destroy() holdNotes[index] = nil health = health + hold.hitHealth * 0.2 elseif (hold.position - elapsed) * speed < -150 then - hold:destroy() + hold:Destroy() characters.bf:PlayAnimation("sing"..directions[hold.direction].."miss") holdNotes[index] = nil health = health - hold.missHealth * 0.2 @@ -635,7 +635,7 @@ local function state(songName, songDifficulty, show) else characters.dad:PlayAnimation("sing"..directions[hold.direction]) end - hold:destroy() + hold:Destroy() holdNotes[index] = nil end end