end of lifetime fix

This commit is contained in:
Martin 2023-01-02 13:31:06 +01:00
parent 9ebeeddb8c
commit af4dd8ecbd

View File

@ -143,6 +143,8 @@ export class Enemy extends Component {
this.sprite.node.active = false; this.sprite.node.active = false;
await delay(200); await delay(200);
if (this.sprite == null) break;
this.sprite.node.active = true; this.sprite.node.active = true;
await delay(200); await delay(200);
} }