add start of gun support
This commit is contained in:
parent
444533ce85
commit
65f78ec3ac
19 changed files with 141 additions and 29 deletions
|
@ -5,6 +5,7 @@ function renderShip(pallet, ship) {
|
|||
var thr0 = game.assets.images.ships[ship.hull].thrust0;
|
||||
var thr5 = game.assets.images.ships[ship.hull].thrust5;
|
||||
var thr8 = game.assets.images.ships[ship.hull].thrust8;
|
||||
var turr = game.assets.images.turrets['01'].small;
|
||||
//pallet.view(ship.x, ship.y, false, ship.r);
|
||||
var pos = ship.getPos();
|
||||
var x = pos.x;
|
||||
|
@ -13,7 +14,15 @@ function renderShip(pallet, ship) {
|
|||
var vy = -game.world.getCenter().y;
|
||||
|
||||
pallet.view(x + vx, y + vy, false, ship.r);
|
||||
|
||||
var ts = ship.size / 2;
|
||||
for (var i = 0; i < ship.mounts.length; i++) {
|
||||
if (ship.turrets[i]) {
|
||||
pallet.image(turr, ship.mounts[i][0] - ts, ship.mounts[i][1] - ts, 0);
|
||||
}
|
||||
}
|
||||
pallet.image(ship.team == 'a' ? teama : teamb, 0, 0, 0);
|
||||
pallet.image(ship.move[0] ? thr8 : thr0, 0, 0, 0);
|
||||
pallet.image(img, 0, 0, 0);
|
||||
pallet.image(ship.move[0] ? thr8 : thr0, 0, 0, 0);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue