summaryrefslogtreecommitdiffhomepage
path: root/Player-inl.h
blob: 140bfad811887a69bfb96079406ce4df384bad84 (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, 4, bullet.position, bullet.radius))
            return true;
    }
    return false;
}