Working on stuff
This commit is contained in:
1 parent
17d903fd52
commit
07f45ad1e1
11 files changed
+176
-70
No files matched your search
@@ -21,6 +21,7 @@ void CharacterState::stopInPlace() {
|
||||
pathWaypoints.clear();
|
||||
currentWaypointIndex = 0;
|
||||
onArrivedCallback = nullptr;
|
||||
onArrivedCallbackName.clear();
|
||||
}
|
||||
|
||||
void CharacterState::setHp(float newHp) {
|
||||
@@ -52,6 +53,8 @@ void CharacterState::save(nlohmann::json& out) const
|
||||
out["pathWaypoints"] = std::move(wpArr);
|
||||
out["currentWaypointIndex"] = currentWaypointIndex;
|
||||
out["homeDriftCheckTimer"] = homeDriftCheckTimer;
|
||||
if (!onArrivedCallbackName.empty())
|
||||
out["onArrivedCallbackName"] = onArrivedCallbackName;
|
||||
}
|
||||
|
||||
void CharacterState::load(const nlohmann::json& in)
|
||||
@@ -84,6 +87,7 @@ void CharacterState::load(const nlohmann::json& in)
|
||||
}
|
||||
currentWaypointIndex = in.value("currentWaypointIndex", currentWaypointIndex);
|
||||
homeDriftCheckTimer = in.value("homeDriftCheckTimer", homeDriftCheckTimer);
|
||||
onArrivedCallbackName = in.value("onArrivedCallbackName", std::string());
|
||||
}
|
||||
|
||||
} // namespace ZL
|
||||
Reference in new issue
Block a user