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