Hi, I was wondering what some best practices are for designing your code in a 2D combat game. Here is an example of by problem:
Do I use a game manager object to detect collisions and calculate damage and amount of health subtraction to apply from there?
Or
Do I use local scripts on a certain player, enemy, boss, entity or even level to run collision detections and essentially have objects with scripts that detect damage and destroy that object it is on if it receives too much?
Maybe there is even a third option using damage scripts run on the attacking player, entity or weapon - not sure how I would do that.
The reason this is a problem for me is because it is not simple damage or health reduction, but my game will involve elemental damage and different stat resistances.