aozhiwei 9bb4cf37f4 1
2024-02-18 14:08:06 +08:00

27 lines
541 B
C++

#pragma once
#include "DetourNavMeshQuery.h"
class Creature;
class Movement
{
public:
Movement(Creature* owner);
bool UpdatePosition();
void CalcTargetPos(float distance);
void ClearPath();
size_t GetPathSize();
bool IsFindPath() { return is_find_path_; }
bool FindPath(const glm::vec3& target_pos, float distance);
private:
void AdjustLastPath(float distance);
private:
std::vector<MovePathPoint> paths_;
int path_index_ = 0;
Creature* owner_ = nullptr;
bool is_find_path_ = false;
};