Unity Strategy Pattern Example


No promises this is perfect because it’s a shot in the dark but since unity has it’s structure and design patternes might not be completely obvious within Unity, I’ve started to implement a few from the classic gang of four book. This is an example of the strategy pattern. Any weapon can work with any character and any character can been your current character. If added to a state machine, this would be pretty strong stuff.

Have fun and feel free to leave me feedback.