aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/Particle.hpp
blob: f8d2770f0a71b256bc0fb35161db19ff960cfe5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#pragma once

class Particle {
public:
    struct Position {
        int x;
        int y;
    };

    Position position;
    Position velocity;
    float lifespan;

    Particle(float lifespan, Position position, Position velocity);
    void update(float deltaTime);
    bool isAlive() const;
private:
    float timeInLife;
};