goplus / builder

Go+ Builder
https://builder.goplus.org
27 stars 24 forks source link

spx: behavior of Sprite `die` #734

Open nighca opened 1 month ago

nighca commented 1 month ago

Ideally die should stop all behaviors of current sprite, which includes:

Now the coroutine will be aborted for cloned sprites, while not aborted for prototype sprites.

nighca commented 3 weeks ago

Related: goplus/spx#314, goplus/spx#315

xushiwei commented 2 weeks ago

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.