feat: Property behaviors partially functional (#1759)

* most of gameplay tab works

* smash unsmash and wait working

* Add pausing of models and behaviors

* working basic behaviors

* play sound functioning

* add resetting

* Fix asynchronous actions executing other strips actions

* Add comments, remove dead code etc.

* Skip Smashes if they coincide with a UnSmash

Remove debug logs

Comment on return
This commit is contained in:
David Markowitz
2025-05-05 00:17:39 -07:00
committed by GitHub
parent 841b754b01
commit 3ebc6709db
13 changed files with 465 additions and 64 deletions

View File

@@ -117,6 +117,16 @@ void State::HandleMsg(MigrateActionsMessage& msg) {
}
};
template<>
void State::HandleMsg(GameMessages::RequestUse& msg) {
for (auto& strip : m_Strips) strip.HandleMsg(msg);
}
template<>
void State::HandleMsg(GameMessages::ResetModelToDefaults& msg) {
for (auto& strip : m_Strips) strip.HandleMsg(msg);
}
bool State::IsEmpty() const {
for (const auto& strip : m_Strips) {
if (!strip.IsEmpty()) return false;
@@ -152,3 +162,7 @@ void State::Deserialize(const tinyxml2::XMLElement& state) {
strip.Deserialize(*stripElement);
}
}
void State::Update(float deltaTime, ModelComponent& modelComponent) {
for (auto& strip : m_Strips) strip.Update(deltaTime, modelComponent);
}