A lightweight JavaScript game engine
git clone git://soophie.de/game-engine
116
update() {117
// empty118
}119
render() {120
// empty119
render(g) {120
if(this.shape instanceof Shape.Rect) {121
g.beginPath();122
g.rect(this.x, this.y, this.shape.width, this.shape.height);123
g.stroke();124
}125
if(this.shape instanceof Shape.Circle) {126
g.beginPath();127
g.arc(this.x, this.y, this.shape.radius, 2 * Math.PI, 0);128
g.stroke();129
}130
}131
}