ardazishvili / Sota

Editable generator of discrete structures for Godot 4
MIT License
31 stars 2 forks source link

Make tiles children of grids #24

Closed ardazishvili closed 2 months ago

ardazishvili commented 2 months ago

Because of inner logic of godot we can't rely on destructors/constructors to manage liveness of objects: they obey rules of enter_tree and exit_tree. If child/parent relations are mixed with relations of aggregation(or composition) we may end up in situation inside dtor of grid class when child objects are not destroyed and grid object has no access to them via its children.

Cherry-picked from #22