27 lines
541 B
C++
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;
|
|
};
|