Open nighca opened 1 month ago
Related: goplus/spx#314, goplus/spx#315
In Scratch and SPX, the initial instance of a sprite is the prototype (somewhat similar to JavaScript). The prototype instance cannot be destroyed, so the 'die' function behaves differently for prototype instances and cloned instances.
Ideally
die
should stop all behaviors of current sprite, which includes:Game.Stop
Now the coroutine will be aborted for cloned sprites, while not aborted for prototype sprites.