Hello,
The current questionable design:
I have lava that kills the player when it hits it.
The logic to play the death explosion is in the object the player hits.
When I did this I was influenced by what I read about Sims object design.
By placing the logic in the object it's easy to add more objects with different logic.
The downside is that responses are distributed in all the objects.
The upside is that I don't have to write code for handling damage events and responses, and mapping damage types to death animations etc.
I do feel this would be inappropriate for things like projectiles, and enemy attacks.
However because the object it hits is Static I figured it'd be ok.
The Ask:
So, what are your thoughts and what would you consider a good design?