added activePlayer to StateMachine