gets/sets the x velocity
velocity.x
Examples
const img = $.loadImage(
$.w/2,
$.h/2,
"/images/sir_cheesealot.png"
);
img.velocity.x = -4;
function update() {
img.draw();
if(img.x < 0) {
img.x=$.w;
}
}gets/sets the x velocity
const img = $.loadImage(
$.w/2,
$.h/2,
"/images/sir_cheesealot.png"
);
img.velocity.x = -4;
function update() {
img.draw();
if(img.x < 0) {
img.x=$.w;
}
}