Created
July 2, 2017 11:34
-
-
Save shaina7837/53efe0254b5982844c4a72a4504fa0f9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addBackground('background.png'); | |
24 var balls = []; | |
25 var count = 0; | |
26 function addBall(color, left, top){ | |
27 balls[count] = addImage("water-gun.png", 50); | |
28 positionEl(balls[count], left, top); | |
29 count++; | |
30 } | |
31 addBall("red", 100, 300); | |
32 addBall("orange", 200, 300); | |
33 | |
34 var water = addImage("drop.png", 20); | |
35 positionEl(water, 100, 800); | |
36 moveY(water, 800, 200, 1, false ,100); | |
37 | |
38 function burst(){ | |
39 console.log("shaina"); | |
40 } | |
41 checkCollision(balls, water, burst); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment