I'm making a craft game.
Basically, when a sprite collides with another sprite, a new sprite is created.
All elements of the crafting game are stored as animation-frames of a single sprite.
Thing is who collisions with who is relevant :
- water poored on fire = coal
- fire thrown on water = steam.
So I need to know which sprite is active and which one is passive.
So far, I have a sprite 'Element' and a family made of this unique sprite called 'Elements-fam'.
When I check:
- 'Element': on collision with "Elements-fam"
Am I sure that Element is the active one and Elements-fam the passive one ?
Note that :
- passive sprite can be in motion
- after collision, passive sprite can be considered as an active sprite if collision with active sprite sets it in motion. A chain reaction may occur