Skip to content

Commit

Permalink
修正一个游戏销毁时的流程问题
Browse files Browse the repository at this point in the history
  • Loading branch information
MisaLiu committed Nov 3, 2022
1 parent a3ef634 commit c3fd8f3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/chart/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,12 +297,24 @@ export default class Chart
if (!judgeline.sprite) return;
judgeline.sprite.destroy();
judgeline.sprite = undefined;

if (judgeline.debugSprite)
{
judgeline.debugSprite.destroy(true);
judgeline.debugSprite = undefined;
}
});
this.notes.forEach((note) =>
{
if (!note.sprite) return;
note.sprite.destroy();
note.sprite = undefined;

if (note.debugSprite)
{
note.debugSprite.destroy(true);
note.debugSprite = undefined;
}
});

if (this.sprites.bg)
Expand Down

0 comments on commit c3fd8f3

Please sign in to comment.