Trying to implement a State Machine system in Unity3d