MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / storeState

Method storeState

source/game/StarMovementController.cpp:227–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 4

diskStoreMethod · 0.45
diskStoreMethod · 0.45
diskStoreMethod · 0.45
diskStoreMethod · 0.45

Calls 1

jsonFromVec2FFunction · 0.85

Tested by

no test coverage detected