Returns a box collider
- x : number //Horizontal Position
- y : number //Vertical Position
- w : number //width of the new collider
- h : number //height of the new collider
Returns a box collider
- x : number //Horizontal Position
- y : number //Vertical Position
- w : number //width of the new collider
- h : number //height of the new collider
const example = $.makeBoxCollider(0,$.h/2,50,50);
function update() {
example.x += 1;
if(example.x > $.w) {
example.x = 0;
}
example.draw();
}