raspberry
This commit is contained in:
parent
43390fe7ce
commit
4a40175884
2 changed files with 20 additions and 4 deletions
|
|
@ -1,17 +1,20 @@
|
|||
let obstacle: Obstacle;
|
||||
|
||||
let raspberry: Raspberry;
|
||||
function setup() {
|
||||
createCanvas(400, 400)
|
||||
background(187)
|
||||
line(0,0, 400,400)
|
||||
|
||||
raspberry = new Raspberry();
|
||||
obstacle = new Obstacle(new Pipe(new Position(width, 0), 20, 50, 0), new Pipe(new Position(width, 300), 20, 50, 0))
|
||||
}
|
||||
|
||||
function draw() {
|
||||
background(187)
|
||||
// obstacle.draw()
|
||||
// obstacle.update()
|
||||
raspberry.draw();
|
||||
raspberry.update();
|
||||
obstacle.draw();
|
||||
obstacle.update();
|
||||
}
|
||||
//
|
||||
// function keyPressed() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue