mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-06 18:54:13 +00:00
Add loading from database
yahoo
This commit is contained in:
@@ -94,3 +94,15 @@ void Strip::Serialize(tinyxml2::XMLElement& strip) const {
|
||||
action.Serialize(*actionElement);
|
||||
}
|
||||
}
|
||||
|
||||
void Strip::Deserialize(const tinyxml2::XMLElement& strip) {
|
||||
const auto* positionElement = strip.FirstChildElement("Position");
|
||||
if (positionElement) {
|
||||
m_Position.Deserialize(*positionElement);
|
||||
}
|
||||
|
||||
for (const auto* actionElement = strip.FirstChildElement("Action"); actionElement; actionElement = actionElement->NextSiblingElement("Action")) {
|
||||
auto& action = m_Actions.emplace_back();
|
||||
action.Deserialize(*actionElement);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user