If you have something like a single bingo card(ticket), it consists of 25 hand placed text or sprites representing the numbers, plus back ground images, daubed state etc.
If you have a variable number of cards, it makes sense to create one card,then clone it at runtime (depending on how many they purchased) and put them in different locations.
I.e. you are making a new object (the bingo card) out of lots of smaller objects.
Is there a way to do this?
I tried using families, but this fails because:
1) you can only put the same type of object in a family. e.g. only sprites
2) you cant seem to clone a family and change its position (at least i could not work out how.
I saw you can put objects into a container, but:
a) I dont know what the container object should be (there dont seem to be any container type objects)
b) Once you have a container object, I dont know if you can clone it to create complete copies, and access their sub objects.
Even nicer would be if you could associate events/behaviour with this composite object, like you would in an object oriented language. E.g. so you could say something like "foreach (bingocard) {bingocard.generateRandomNumbers()}.