Camping With Your Human
This is a school project that I done at Futuregames, it is a third person mystery exploration game where you play as a dog protecting your human. I get to work with the state machine for enemy AI, a scriptable object based event system for fire mechanism that player can interact with.
ScriptableObject Game Event System
The enemy in the game has simple logic as approaching the player, attacking and fleeing away. Thus we use state machine to implement its behaviours. Each state has two update functions, one for logic update one for physical update, corresponding to unity build in update and fixed update function. We also pass its animator parameters to each state so it automatically update its animation whenever its state change.
ScriptableObject Event System
Common scenario that we use event system will be when players interact with game objects around the world. While it's not practical if you use Unity build in event system since we want designers to play with the events instead of programmer hardcoding it. Here we modify the default events by turning them into scriptable objects so designers can wire up in the inspector. The scriptable object event is based closely on the talk "Unite Austin 2017 - Game Architecture With Scriptable Objects"