-
Notifications
You must be signed in to change notification settings - Fork 0
/
EnemyObject.h
40 lines (29 loc) · 913 Bytes
/
EnemyObject.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#pragma once
#include "GameObject.h"
#include "Node.h"
// Inherits from GameObject
class EnemyObject : public GameObject {
public:
EnemyObject(glm::vec3 &entityPos, GLuint entityTexture, GLint entityNumElements, float s);
// Update function for moving the player object around
virtual void update(double deltaTime) override;
virtual void render(Shader &shader) override;
void setPath(std::vector<Node*> p);
std::vector<Node*> getPath() { return path; }
void nextNode();
inline Node* getCurrNode() { return currNode; }
inline bool getFinished() { return finished; }
int value = 25;
float speedMultiplier;
protected:
// current path to follow
std::vector<Node*> path;
// current "target" node we are heading towards
Node * currNode;
// orientation, in degrees
float orientation;
// if we have finished traversing our current path
bool finished;
// speed travelled at
float speed;
};