Can you help this student please?
1- She wants to remove the lives and score from the start screen.
2-She wants the score to go up by 1, when the rabbit is touching the carrot, yet she wants the carrot to continue following the rabbit to the basket.
Thank you.
// Create your variables here
var SCORE = 0;
var background = createSprite(200, 200);
background.visible = false;
;
var pressenter = createSprite(200, 200);
pressenter.setAnimation(“press enter.png_1”);
pressenter.visible = true;
pressenter.scale = 1.45;
;
var collect = createSprite(200, 300);
collect.setAnimation(“collect”);
collect.visible = true;
collect.scale = 0.6;
;
var ledge = createSprite(230, 289);
ledge.setAnimation(“ledge”);
ledge.scale = 0.1;
ledge.visible = false;
;;
var basket = createSprite(345, 45);
basket.setAnimation(“basket”);
basket.scale = 0.15;
basket.visible = false;
;
var bunny = createSprite(30, 350);
bunny.setAnimation(“bunny1_1”);
bunny.scale = 0.45;
bunny.visible = false;
;
var carrot = createSprite(20, 180);
carrot.setAnimation(“carrot”);
carrot.scale = 0.45;
carrot.visible = false;
;
var carrot2 = createSprite(380, 140);
carrot2.setAnimation(“carrot2”);
carrot2.scale = 0.45;
carrot2.visible = false;
;
var carrot3 = createSprite(275, 200);
carrot3.setAnimation(“carrot3”);
carrot3.scale = 0.45;
carrot3.visible = false;
;
var carrot4 = createSprite(120, 290);
carrot4.setAnimation(“carrot4”);
carrot4.scale = 0.45;
carrot4.visible = false;
;
var carrot5 = createSprite(165, 170);
carrot5.setAnimation(“carrot5”);
carrot5.scale = 0.45;
carrot5.visible = false;
;
var carrot6 = createSprite(100, 95);
carrot6.setAnimation(“carrot6”);
carrot6.scale = 0.45;
carrot6.visible = false;
;
var carrot7 = createSprite(240, 365);
carrot7.setAnimation(“carrot7”);
carrot7.scale = 0.45;
carrot7.visible = false;
;
var carrot8 = createSprite(235, 90);
carrot8.setAnimation(“carrot8”);
carrot8.scale = 0.45;
carrot8.visible = false;
;
var carrot9 = createSprite(375, 290);
carrot9.setAnimation(“carrot9”);
carrot9.scale = 0.45;
carrot9.visible = false;
// Create your sprites here
function keys() {
if (keyDown(“enter”)) {
carrot.visible = true;
background.visible = true;
bunny.visible = true;
pressenter.visible = false;
collect.visible = false;
basket.visible = true;
carrot2.visible = true;
carrot3.visible = true;
carrot4.visible = true;
carrot5.visible = true;
carrot6.visible = true;
carrot7.visible = true;
carrot8.visible = true;
carrot9.visible = true;
ledge.visible = true;
}
}
function draw() {
// draw background
background.setAnimation(“carrots.jpg_1”);
background.scale = 1.2;
collection();
movingcharacters();
keys();
// update sprites
drawSprites();
textSize(20);
fill(“black”);
fill(“black”);
fill(“black”);
fill(“black”);
text(Math.round(-0.05 *World.frameCount+30), 90, 30);
;
text(“TIME:”, 30, 30);
;
text(SCORE, 109, 46);
text(“SCORE:”,30,30,225,100);
}
function movingcharacters() {
if (keyDown(“up”)) {
bunny.y = bunny.y - 1.5;
}
if (keyDown(“right”)) {
bunny.x = bunny.x + 1.5;
}
if (keyDown(“left”)) {
bunny.x = bunny.x - 1.5;
}
if (keyDown (“down”)) {
bunny.y = bunny.y + 1.5
}
}
function collection() {
if (bunny.isTouching(carrot)) {
carrot.y = bunny.y;
carrot.x = bunny.x;
SCORE = SCORE + 1;
}
if (bunny.isTouching (carrot2)) {
carrot2.y = bunny.y;
carrot2.x = bunny.x;
}
if (bunny.isTouching (carrot3)) {
carrot3.y = bunny.y;
carrot3.x = bunny.x;
}
if (bunny.isTouching (carrot3)) {
carrot3.y = bunny.y;
carrot3.x = bunny.x;
}
if (bunny.isTouching (carrot4)) {
carrot4.y = bunny.y;
carrot4.x = bunny.x;
}
if (bunny.isTouching (carrot5)) {
carrot5.y = bunny.y;
carrot5.x = bunny.x;
}
if (bunny.isTouching (carrot6)) {
carrot6.y = bunny.y;
carrot6.x = bunny.x;
}
if (bunny.isTouching (carrot7)) {
carrot7.y = bunny.y;
carrot7.x = bunny.x;
}
if (bunny.isTouching (carrot8)) {
carrot8.y = bunny.y;
carrot8.x = bunny.x;
}
if (bunny.isTouching (carrot9)) {
carrot9.y = bunny.y;
carrot9.x = bunny.x;
}
if (carrot.collide(basket)) {
carrot.visible = false;
}
if (carrot2.collide(basket)) {
carrot2.visible = false;
}
if (carrot3.collide(basket)) {
carrot3.visible = false;
}
if (carrot4.collide(basket)) {
carrot4.visible = false;
}
if (carrot5.collide(basket)) {
carrot5.visible = false;
}
if (carrot6.collide(basket)) {
carrot6.visible = false;
}
if (carrot7.collide(basket)) {
carrot7.visible = false;
}
if (carrot8.collide(basket)) {
carrot8.visible = false;
}
if (carrot9.collide(basket)) {
carrot9.visible = false;
}
if (bunny.collide(ledge)) {
bunny.bounceOff(ledge);
}
}