All I had to do was add the diamond and spikes with collision. Collision is all handled by the below JavaScript function.
function overlapTest(a, b) {
return a.x < b.x + b.w && a.x + a.w > b.x &&
a.y < b.y + b.h && a.y + a.h > b.y
}
No comments:
Post a Comment