summaryrefslogtreecommitdiffhomepage
path: root/ConstantVelocity.h
blob: e28400d32de6b6132205c3efa41fbde85ef58b6b (plain)
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
#pragma once

#include <vector>

#include <raylib.h>


struct ConstantVelocityBullet
{
    using Vector = std::vector<ConstantVelocityBullet>;
    Vector2 position;
    Vector2 velocity;
    float radius;
    Color color;
};


struct ConstantVelocitySystem
{
    static constexpr float MARGIN {40};
    static constexpr int RESERVED {10000};

    ConstantVelocitySystem();
    void update(float dt);
    void draw();
    ConstantVelocityBullet::Vector m_bullets;
};