Kaboooom!

Got home pretty late tonight but really wanted to make SOME kind of progress on the game so quickly I added health/damage to cars and a little particle effect explosion when they are destroyed.

I created ObjectHealth and DamageInfo classes that send/receive damage to objects that can be destroyed (I could easily blow up trees right now if I threw the scripts onto them for example). DamageInfo has the amount, type and source of damage being dealt. When a desctructable reached 0 health it triggers a UnityEvent that I can assign to whatever I want to happen when something is destroyed. For cars it triggers a function in another script that instantiates an explosion and removes the car from the race. For trees I could just trigger a 'tree explosion' (wood bits flying everywhere) or whatever I want.

Nothing fancy but it works great and it's fun blowing up cars now!