builder
builder copied to clipboard
Enable sprite instantiation in the editor
In the editor, we may support sprite instantiation, allowing users to create multiple instances from a single sprite definition.
- These instances would share some information, like code, costumes, and animations
- but have independent information, like positions, scales, and headings
We need to define precisely which properties are shared and which are configurable per instance.
An open question remains: how should the instance list be exposed to game code? Potential solutions (for sprite "A") include:
var As []*A
func (a *A) List() []*A
func listOf[T](spriteName) []*T
func listOf[T](sprite *T) []*T
This issue may be related to #2375.
We may introduce a new concept for "a set some sprite instances" and allow the user to name a set.