| 225 | } |
| 226 | |
| 227 | Json MovementController::storeState() const { |
| 228 | return JsonObject{ |
| 229 | {"position", jsonFromVec2F(position())}, |
| 230 | {"velocity", jsonFromVec2F(velocity())}, |
| 231 | {"rotation", rotation()} |
| 232 | }; |
| 233 | } |
| 234 | |
| 235 | void MovementController::loadState(Json const& state) { |
| 236 | setPosition(jsonToVec2F(state.get("position"))); |
no test coverage detected