summaryrefslogtreecommitdiffhomepage
path: root/Bullets.h
blob: 3970affb955ceb8b80291024fbef084c65e69db4 (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
28
29
30
31
#pragma once

#include <vector>

#include <raylib.h>


static constexpr float MARGIN {40};


struct ConstantVelocityBullet;


struct ConstantVelocitySystem
{
    ConstantVelocitySystem();
    explicit ConstantVelocitySystem(int reserved);
    void update(float dt);
    void draw();
    std::vector<ConstantVelocityBullet> m_bullets;
};


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