-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEnemy.h
43 lines (31 loc) · 763 Bytes
/
Enemy.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
41
42
#pragma once
class Enemy : public Entity
{
std::shared_ptr< Puck > puck;
float eSpeed;
Timer etimer;
std::default_random_engine generator;
float maxMovementSpeed;
std::shared_ptr< Vector2d > targetPos;
float offsetXFromTarget;
bool isFirstTimeInOpponentsHalf;
Timer lastHit;
public:
Enemy( );
~Enemy();
bool puckInCorner();
void moveTo(float x1, float y1, float x2, float y2);
void Attack();
void defence();
void doNothing();
void makeDecision();
//void Update();
void followPuck();
void moveTo(float x, float y);
void Update(std::shared_ptr< Object > obj = nullptr );
Vector2d predictPuck();
void move();
void Draw();
void setPuck( std::shared_ptr< Puck > puck );
void collisionDetected(std::shared_ptr< Object > obj) ;
};