Add configuration option for ghost reset distance. Improve documentation.
This commit is contained in:
6
ghost.h
6
ghost.h
@@ -3,6 +3,8 @@
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
// Ghost encapsulates AI state for a single floating enemy constrained to an
|
||||
// axis-aligned bounding box inside the maze.
|
||||
class Ghost {
|
||||
public:
|
||||
Ghost(float xmin, float xmax, float zmin, float zmax);
|
||||
@@ -17,14 +19,14 @@ class Ghost {
|
||||
bool first_frame;
|
||||
glm::vec3 moved;
|
||||
glm::vec3 pos;
|
||||
float yawr;
|
||||
float yawr; // facing direction used while wandering
|
||||
float xmin;
|
||||
float xmax;
|
||||
float zmin;
|
||||
float zmax;
|
||||
float y_offset;
|
||||
float prev_move_time;
|
||||
float direction_persist;
|
||||
float direction_persist; // blends rotation over time so ghosts don't jitter
|
||||
};
|
||||
|
||||
float rand_float(float rmin, float rmax);
|
||||
|
||||
Reference in New Issue
Block a user