gets/sets the x velocity
velocity.x
Examples
const btn = $.makeButton(
$.w/2,
$.h/2,
100,
35,
"label"
);
btn.velocity.x = 5;
function update() {
if(btn.x > $.w) {
btn.x=0;
}
btn.draw();
}gets/sets the x velocity
const btn = $.makeButton(
$.w/2,
$.h/2,
100,
35,
"label"
);
btn.velocity.x = 5;
function update() {
if(btn.x > $.w) {
btn.x=0;
}
btn.draw();
}