BaseState interface and StateMachine class. In my StateMachine class I have a constructor that takes a BaseState defaultState parameter. I want it to be able to take classes that implement/inherit from the BaseState interface like IdleState or PatrolState, but I really don't have a clue how to do that.