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

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

    Position position;
    Position velocity;
    float lifespan;

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