Welcome to my Website!
var potato = createSprite(200, 200);
potato.setAnimation("potato");
potato.height = 150;
potato.width = 150;
var b = createSprite(100, 200);
b.setAnimation("b");
b.height = 100;
b.width = 100;
var m = createSprite(200, 350);
m.setAnimation("m");
var score = 0;
potato.velocityY = 12;
b.velocityY = 8;
// Create your sprites here
var sprite = createSprite(200, 200, 5, 5);
function draw() {
// draw background
background("blue");
// update sprites
if (keyDown("right")) {
m.x = m.x + 5;
}
if (keyDown("left")) {
m.x = m.x - 5;
}
drawSprites();
textSize(30);
fill("black");
text("Score:", 20, 30);
text(score, 120, 30);
if (potato.y > 450) {
potato.y = -50;
potato.x = randomNumber(50, 350);
}
if (b.y > 450) {
b.y = -50;
b.x = randomNumber(50, 350);
}
if (potato.isTouching(m)) {
potato.x = randomNumber(50, 350);
potato.y = -50;
score = score + 3;
}
if (b.isTouching(m)) {
b.x = randomNumber(50, 350);
b.y = -50;
score = score - 5;
}
}
// Create your functions here
drawSprites();
This is a paragraph! Here's how you make a link: Neocities.
Here's how you can make bold and italic text.
Here's how you can add an image:
Here's how to make a list:
- First thing
- Second thing
- Third thing
To learn more HTML/CSS, check out these tutorials!