Create class - type objects
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
I've just discover new feature !
Looking into thyme config I saw strange string:
That "alloc" is a stub for class-type object so you can create your own classes like obj.some.property.tree = true
Unfortunatly, Algodoo could not serialize and save it, so you should be aware, all internal objects will be stored (and ruin) in root scope.
That means you can't save it with scene and should only use it as temporary structure (or re-create it every time onSpawn)
Example:
![Surprised :o](./images/smilies/icon_e_surprised.gif)
Looking into thyme config I saw strange string:
- Code: Select all
math.vec := alloc;
That "alloc" is a stub for class-type object so you can create your own classes like obj.some.property.tree = true
Unfortunatly, Algodoo could not serialize and save it, so you should be aware, all internal objects will be stored (and ruin) in root scope.
That means you can't save it with scene and should only use it as temporary structure (or re-create it every time onSpawn)
![Sad :(](./images/smilies/icon_e_sad.gif)
Example:
- Code: Select all
Scene.AddBox({
pos := [0,0];
onSpawn := (e) => {
e.this.aTree := alloc;
aTree.root := 1;
aTree.branch := 2;
aTree.leaf := 10
}
})