-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBalls.h
45 lines (38 loc) · 868 Bytes
/
Balls.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
43
44
45
#pragma once
#include <iostream>
#include <vector>
#include <ctime>
#include <sstream>
#include <SFML/Audio.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/Network.hpp>
#include <SFML/System.hpp>
#include <SFML/window.hpp>
using namespace std;
using namespace sf;
enum balltypes { DEFAULT = 0, DAMAGING, HEALING, Nroftypes };
class Balls
{
private:
//Variables
CircleShape shape;
Vector2f velocity;
float movementSpeed;
int type;
//Private Functions
void initVariables();
void initShape(const RenderWindow& window);
public:
//Constructors / Destructors
Balls();
Balls(RenderWindow& window,int type);
virtual ~Balls();
//Accessors
const FloatRect getGlobadBounds() const;
const CircleShape getShape() const;
const int& gettype() const;
//Functions
void updateinput();
void update(RenderTarget& target);
void render(RenderTarget& target);
};