C++ Project 2016-2017: Arkanoid
player.h
Go to the documentation of this file.
1 
3 #ifndef PLAYER_H
4 #define PLAYER_H
5 
6 #include "../entity.h"
7 #include "../../math/vector2D.h"
8 
9 #include <iostream>
10 
11 using namespace std;
12 
13 
14 namespace arkanoid {
15 
17  class Player : public Entity {
18  protected:
19  Vector2D velocity;
20  double speed;
22  double originalSpeed;
23 
24  bool notMoving;
26 
27  public:
28 
34  Player();
35 
46  Player(double x, double y, double newSpeed = 15.0, pair<double, double> size = make_pair(2.0, 1.0));
47 
51  ~Player();
52 
56  void update();
57 
61  void draw() const;
62 
68  void speedUp(double factor);
69 
74  virtual void reset();
75  };
76 
77 }
78 
79 #endif /* PLAYER_H */
Vector2D origin
The initial position of the Player.
Definition: player.h:21
The Player in the Arkanoid game that represents a "rectangle".
Definition: player.h:17
int speedUpDuration
In frames.
Definition: player.h:25
Representation of a vector.
Definition: vector2D.h:14
All the game logic of the Arkanoid game.
Definition: ball.cpp:15
An Entity represents an "object" (like Player, Ball, Block, ...) in the game World.
Definition: entity.h:15