ad a bunch of update methods

This commit is contained in:
David Markowitz
2024-11-02 21:31:54 -07:00
parent af943278fb
commit 06897eb2ae
10 changed files with 48 additions and 0 deletions

View File

@@ -66,6 +66,10 @@ void ModelComponent::Serialize(RakNet::BitStream& outBitStream, bool bIsInitialU
if (bIsInitialUpdate) outBitStream.Write0(); // We are not writing model editing info
}
void ModelComponent::Update(float deltaTime) {
for (auto& behavior : m_Behaviors) behavior.Update(deltaTime);
}
void ModelComponent::UpdatePendingBehaviorId(const int32_t newId) {
for (auto& behavior : m_Behaviors) if (behavior.GetBehaviorId() == -1) behavior.SetBehaviorId(newId);
}

View File

@@ -29,6 +29,8 @@ public:
ModelComponent(Entity* parent);
void Update(float deltaTime) override;
void LoadBehaviors();
void Serialize(RakNet::BitStream& outBitStream, bool bIsInitialUpdate) override;