-
Notifications
You must be signed in to change notification settings - Fork 0
/
Particle.cpp
69 lines (58 loc) · 1.42 KB
/
Particle.cpp
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/**
* @file Particle.cpp
* @brief This file contains the Particle class.
*/
#include <SFML/Graphics.hpp>
#include "global.h"
/**
* @class Particle
* @brief This class represents a Particle in the game.
*/
class Particle {
public:
/**
* @brief The position of the Particle.
*/
sf::Vector2f position;
/**
* @brief The velocity of the Particle.
*/
sf::Vector2f velocity;
/**
* @brief The texture of the Particle.
*/
sf::Texture texture;
/**
* @brief Represents the shape of the Particle.
*/
sf::CircleShape shape;
/**
* @brief The color of the Particle.
*/
sf::Color color;
/**
* @brief Represents the direction of the Particle.
*/
bool right;
/**
* @brief The gravity affecting the Particle.
*/
float gravity = 0.05f;
/**
* @brief Constructor for the Particle class.
* @param position The position of the Particle.
* @param right The direction of the Particle.
* @param texture The texture of the Particle.
* @param hp The hit points of the Particle.
*/
Particle(sf::Vector2f position, bool right, sf::Texture& texture, int hp) : position(position) {
// Constructor implementation
}
/**
* @brief Updates the Particle's state.
* @param dt The time delta for the update.
*/
void update(float dt) {
// Update implementation
}
};