| 487 | } |
| 488 | |
| 489 | void ActorMovementController::loadState(Json const& state) { |
| 490 | setPosition(jsonToVec2F(state.get("position"))); |
| 491 | setVelocity(jsonToVec2F(state.get("velocity"))); |
| 492 | setRotation(state.getFloat("rotation")); |
| 493 | m_movingDirection.set(DirectionNames.getLeft(state.getString("movingDirection"))); |
| 494 | m_facingDirection.set(DirectionNames.getLeft(state.getString("facingDirection"))); |
| 495 | m_crouching.set(state.getBool("crouching")); |
| 496 | } |
| 497 | |
| 498 | void ActorMovementController::setAnchorState(EntityAnchorState anchorState) { |
| 499 | doSetAnchorState(anchorState); |