summaryrefslogtreecommitdiffhomepage
path: root/Player-inl.h
blob: 10c43d1d234b06db1d1e84fe8e0a4d440fcb3fd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#pragma once

#include <vector>

#include <raylib.h>


template<typename T>
bool
Player::collide(const std::vector<T>& bullets) const
{
    for (const auto& bullet : bullets) {
        if (CheckCollisionCircles(m_position, 9, bullet.position, bullet.radius))
            return true;
    }
    return false;
}