C++ Project 2016-2017: Arkanoid
ball_sfml.h
Go to the documentation of this file.
1 
3 #ifndef BALL_SFML_H
4 #define BALL_SFML_H
5 
6 #include "../../../logic/entity/ball/ball.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 
16 namespace arkanoidSFML {
17 
19  class BallSFML : public arkanoid::Ball {
20  private:
21  arkanoid::Vector2D screenOrigin;
22 
23  sf::RenderWindow &windowSFML;
24 
25  sf::Sprite sprite;
26  sf::Texture texture;
27 
28  Transformation* transformation;
29 
30  public:
43  BallSFML(double x, double y, sf::RenderWindow &window, double speed = 8.0, const string &textureFile = "data/sprites/ball/ball.png");
44 
48  ~BallSFML();
49 
53  void update();
54 
58  void draw() const;
59 
64  void reset();
65  };
66 
67 }
68 
69 #endif /* BALL_SFML_H */
The SFML element that represents the arkanoid::Ball in the game.
Definition: ball_sfml.h:19
Singleton: This class provides a method to convert screen pixels to their corresponding coordinates i...
All the game gui elements of the Arkanoid game.
Definition: ball_sfml.cpp:10
Representation of a vector.
Definition: vector2D.h:14
The Ball in the Arkanoid game.
Definition: ball.h:21