xxxxxxxxxx
27
let city;
let hero;
let heroY = 200;
function preload(){
city = loadImage("paris.png");
hero = loadImage("coco1.png");
}
function setup() {
createCanvas(600, 400);
}
function draw() {
imageMode(CORNER);
background(city);
imageMode(CENTER);
image(hero,200,heroY,110,100);
heroY += 2;
}
function mousePressed(){
heroY -= 50;
}