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

Method loadState

source/game/StarMovementController.cpp:235–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233}
234
235void MovementController::loadState(Json const& state) {
236 setPosition(jsonToVec2F(state.get("position")));
237 setVelocity(jsonToVec2F(state.get("velocity")));
238 setRotation(state.getFloat("rotation"));
239}
240
241float MovementController::mass() const {
242 return m_mass.get();

Callers 4

diskLoadMethod · 0.45
diskLoadMethod · 0.45
MonsterMethod · 0.45
NpcMethod · 0.45

Calls 3

jsonToVec2FFunction · 0.85
getFloatMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected