Gets the id of the state.
The id of a state is the same as the index of the state in the projector's state list.