C++ Project 2016-2017: Arkanoid
player_sfml.h
Go to the documentation of this file.
1 
3 #ifndef PLAYER_SFML_H
4 #define PLAYER_SFML_H
5 
6 #include "../../../logic/entity/player/player.h"
7 #include "../../math/transformation.h"
8 
9 #include <SFML/Graphics.hpp>
10 #include <iostream>
11 #include <memory>
12 #include <string>
13 
14 using namespace std;
15 
17 namespace arkanoidSFML {
18 
20  class PlayerSFML : public arkanoid::Player {
21  private:
22  arkanoid::Vector2D screenOrigin;
23 
24  sf::RenderWindow &windowSFML;
25 
26  sf::Sprite sprite;
27  sf::Texture texture;
28 
29  Transformation* transformation;
30 
31  public:
44  PlayerSFML(double x, double y, sf::RenderWindow &window, double speed = 10.0, const string &textureFile = "data/sprites/player/player.png");
45 
49  ~PlayerSFML();
50 
54  void update();
55 
59  void draw() const;
60 
65  void reset();
66  };
67 
68 }
69 
70 #endif /* PLAYER_SFML_H */
Singleton: This class provides a method to convert screen pixels to their corresponding coordinates i...
The Player in the Arkanoid game that represents a "rectangle".
Definition: player.h:17
The SFML element that represents the arkanoid::Player in the game.
Definition: player_sfml.h:20
All the game gui elements of the Arkanoid game.
Definition: ball_sfml.cpp:10
Representation of a vector.
Definition: vector2D.h:14