blob: b8bcbd50a77bc79d6768ba6e0a4cf724e3b94be4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#include "CollisionChecker.h"
#include "Museum.h"
CollisionChecker::CollisionChecker(Museum & m) : museum(m) { }
void CollisionChecker::compare(Artist & a, Artist & b) {
if (a.data.x + 0.5 < b.data.x) return;
if (a.data.y + 0.5 < b.data.y) return;
if (a.data.x > b.data.x + 0.5) return;
if (a.data.y > b.data.y + 0.5) return;
a.colliding = b.colliding = true;
}
|