Create StateMachine.cs