I am still working a really basic stuff, so far I am working on a puzzle game.
I have two families :
- pieces (where I store puzzle pieces)
- placeholder (where I store the placeholder where the piece should be placed)
When I had one puzzle it was fine, but as I want to have multiple puzzle, i'd like to only have the pieces and the placeholder of the puzzle the user is playing with.
My idea was to empty both families on layer start then add the pieces and placeholders of the current puzzle only.
So that way I could keep only one Events page to deal with the logic of the drag and drop of pieces into placeholder.
Now I am working on making it work with a family instance variable isActive for pieces and also one isActive for placeholders families.
I am still on my way and I am not sure I'll be able to finalize all.
So far it's fine for pieces, but I am still struggling with the 'set active' of placeholders of my current puzzle only.
What I feel now is that it's a quite chaotic work around and that having action to add and remove items from families would be clearer and a more structured way to go