Press "m" to start Press keys 1,2,3 to jump press". " to stop
xxxxxxxxxx
//I <3 Kali Uchis
let hb
let kali
var imagenum = 1
function preload(){
hb= loadSound ('hb.mp3');
kali= loadImage ('kali.jpeg')
}
function setup() {
createCanvas(400, 400);
hb.play();
hb.playMode('restart')
hb.rate(1.4)
}
function draw() {
if (imagenum == 1) {
background(0);
image(kali, 70, 50, 250, 300);
}
}
function keyPressed(){
if (key == 'm'){
hb.play();
}
if (key == '1'){
hb.jump(25,10)
}
if (key == '2'){
hb.jump(30,10)
}
if(key == '3'){
hb.jump(50,5)
}
if(key == '.'){
hb.stop();
}
}