Skip to content

Commit

Permalink
click hole to create
Browse files Browse the repository at this point in the history
  • Loading branch information
lopis committed Sep 13, 2021
1 parent a18588e commit 79201bb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,17 @@ holePNG.onload = () => {
hole = Sprite({
x: canvas.width / 2, // starting x,y position of the sprite
y: canvas.height / 2,
height: 50,
width: 50,
image: holePNG,
anchor: { x: 0.5, y: 0.5 }
anchor: { x: 0.5, y: 0.5 },
onDown() {
console.log('click hole');
scheduleNewAnt()
if (loop.isStopped) {
loop.start();
}
},
})
emit('ready')
}
Expand Down Expand Up @@ -337,6 +346,7 @@ on('ready', () => {
});
});
intro.render();
track(hole);
hole.render();
})
// loop.start(); // start the game
Expand Down

0 comments on commit 79201bb

Please sign in to comment.