scale rendering

This commit is contained in:
Asraelite 2016-03-22 15:41:11 +00:00
parent 80bd84230d
commit 0ceea5f4af
7 changed files with 70 additions and 17 deletions

View file

@ -5,7 +5,16 @@ function renderShip(pallet, ship) {
var thr5 = game.assets.images.ships[ship.hull].thrust5;
var thr8 = game.assets.images.ships[ship.hull].thrust8;
//pallet.view(ship.x, ship.y, false, ship.r);
pallet.image(col, ship.x, ship.y, ship.r);
pallet.image(img, ship.x, ship.y, ship.r);
pallet.image(ship.move[0] ? thr8 : thr0, ship.x, ship.y, ship.r);
var pos = ship.getPos();
var x = pos.x + 16;
var y = pos.y + 16;
var vx = -game.world.getCenter().x;
var vy = -game.world.getCenter().y;
pallet.view(x + vx, y + vy, false, ship.r);
pallet.image(col, 0, 0, 0);
pallet.image(img, 0, 0, 0);
pallet.image(ship.move[0] ? thr8 : thr0, 0, 0, 0);
pallet.restore();
}