Browse Source

fix crown collision check

master
Fr3deric 6 years ago
parent
commit
a645f9e208
  1. 7
      baumgen.js

7
baumgen.js

@ -75,6 +75,10 @@ class Crown { @@ -75,6 +75,10 @@ class Crown {
delete this._path;
}
}
collides(other) {
return this._path.intersects(other._path);
}
}
@ -172,8 +176,7 @@ class Branch { @@ -172,8 +176,7 @@ class Branch {
}
collides_crown(other) {
return false;
//return this._crown.intersects(other._crown);
return this.crown.collides(other.crown);
}
}

Loading…
Cancel
Save