clear du code #6

Merged
rebillar merged 4 commits from dev into master 2024-01-01 18:38:52 +01:00
Showing only changes of commit 9dedf15df8 - Show all commits

View file

@ -394,19 +394,20 @@ class PNJ{
}
checkCollisions(){
let colliding = false;
map0Squares.forEach((square) => {
if(square.collide(this.x,this.y,this.z))
{
return true;
colliding = true;
}
});
circles.forEach((circle) => {
map0Circles.forEach((circle) => {
if(circle.collide(this.x,this.y,this.z))
{
return true;
colliding = true;
}
});
return false;
return colliding;
}
changeDirection(){