Fixed Note class function calls

This commit is contained in:
entar 2025-06-30 00:07:19 +07:00
parent f0e9943e67
commit 6a6e6cc4a5

View File

@ -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