Implemented stateStack for GameObjects. This allows an entity to revert back to a previous state after exiting a battleState