add ship rendering and damping

This commit is contained in:
Asraelite 2016-03-22 13:18:43 +00:00
parent 05ad81ed8d
commit 80bd84230d
22 changed files with 66 additions and 6 deletions

View file

@ -43,7 +43,11 @@ function Renderer() {
for (var id in game.world.bodies) {
var body = game.world.bodies[id];
pallet.rect('#338', body.x, body.y, 10, 10);
if (body.bodyType == 'ship') {
renderShip(pallet, body);
} else {
pallet.rect('#338', body.x, body.y, 10, 10);
}
}
context.restore();