mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-23 22:43:08 +00:00
refactor(component): movement AI reads its attached path in LoadConfigData
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -70,7 +70,10 @@ MovementAIComponent::MovementAIComponent(Entity* parent, const int32_t component
|
|||||||
m_IsBounced = false;
|
m_IsBounced = false;
|
||||||
|
|
||||||
RegisterMsg(&MovementAIComponent::OnGetObjectReportInfo);
|
RegisterMsg(&MovementAIComponent::OnGetObjectReportInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
// The level config: the attached path
|
||||||
|
void MovementAIComponent::LoadConfigData() {
|
||||||
SetPath(m_Parent->GetVarAsString(u"attached_path"));
|
SetPath(m_Parent->GetVarAsString(u"attached_path"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -66,6 +66,8 @@ public:
|
|||||||
|
|
||||||
MovementAIComponent(Entity* parentEntity, const int32_t componentID, MovementAIInfo info);
|
MovementAIComponent(Entity* parentEntity, const int32_t componentID, MovementAIInfo info);
|
||||||
|
|
||||||
|
void LoadConfigData() override;
|
||||||
|
|
||||||
void SetPath(const std::string pathName);
|
void SetPath(const std::string pathName);
|
||||||
|
|
||||||
void Run(float deltaTime) override;
|
void Run(float deltaTime) override;
|
||||||
|
|||||||
Reference in New Issue
Block a user