Dino Game

This commit is contained in:
Ben
2018-07-16 11:18:23 +01:00
parent 57e091c134
commit 593c1ff51b
14 changed files with 346 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
class World {
constructor() {
this.gravity = 1;
this.ground = 300;
}
update() {
}
draw() {
ctx.beginPath();
ctx.moveTo(0, this.ground + 40 - 7);
ctx.lineTo(800, this.ground + 40 - 7);
ctx.stroke();
}
reset() {
this.gravity = 1.3;
this.ground = 300;
}
}