2D vectors and damage scripts
Vector3 handles depth and transforms in 2D games, while damage architecture splits dealing and receiving damage across attacker and receiver scripts.
- Vector3 is used in 2D games when setting transforms or managing depth, as cameras require objects to sit in front to render
- Unity sorts 2D sprites deterministically using sorting layer, sorting order, and sorting axis rather than relying solely on physical Z-depth
- When designing damage systems, the attacker calls a method to deal damage while the receiver contains the method to process incoming damage and modify health


