diff --git a/RecastDemo/Include/Sample.h b/RecastDemo/Include/Sample.h index f650c5c6..a8cb56b3 100644 --- a/RecastDemo/Include/Sample.h +++ b/RecastDemo/Include/Sample.h @@ -104,10 +104,12 @@ struct SampleToolState { virtual ~SampleToolState() = default; virtual void init(Sample* sample) = 0; + + virtual void update(float dt) = 0; + virtual void reset() = 0; virtual void render() = 0; virtual void renderOverlay(double* proj, double* model, int* view) = 0; - virtual void handleUpdate(float dt) = 0; }; class Sample diff --git a/RecastDemo/Include/Tool_Crowd.h b/RecastDemo/Include/Tool_Crowd.h index 61324383..1fe8ba82 100644 --- a/RecastDemo/Include/Tool_Crowd.h +++ b/RecastDemo/Include/Tool_Crowd.h @@ -86,7 +86,7 @@ public: void reset() override; void render() override; void renderOverlay(double* proj, double* model, int* view) override; - void handleUpdate(float dt) override; + void update(float dt) override; [[nodiscard]] bool isRunning() const { return run; } void setRunning(const bool s) { run = s; } diff --git a/RecastDemo/Source/Sample.cpp b/RecastDemo/Source/Sample.cpp index d4542861..fc251f63 100644 --- a/RecastDemo/Source/Sample.cpp +++ b/RecastDemo/Source/Sample.cpp @@ -325,7 +325,7 @@ void Sample::updateToolStates(const float dt) const { if (toolStates[i]) { - toolStates[i]->handleUpdate(dt); + toolStates[i]->update(dt); } } } diff --git a/RecastDemo/Source/Tool_Crowd.cpp b/RecastDemo/Source/Tool_Crowd.cpp index eec22433..ebfe9d56 100644 --- a/RecastDemo/Source/Tool_Crowd.cpp +++ b/RecastDemo/Source/Tool_Crowd.cpp @@ -726,7 +726,7 @@ void CrowdToolState::renderOverlay(double* proj, double* model, int* view) } } -void CrowdToolState::handleUpdate(const float dt) +void CrowdToolState::update(const float dt) { if (run) {