Add audio
This commit is contained in:
parent
0101ef8d55
commit
62b8c74f57
26 changed files with 225 additions and 18 deletions
BIN
dist/audio/blip1.mp3
vendored
Normal file
BIN
dist/audio/blip1.mp3
vendored
Normal file
Binary file not shown.
BIN
dist/audio/blip2.mp3
vendored
Normal file
BIN
dist/audio/blip2.mp3
vendored
Normal file
Binary file not shown.
BIN
dist/audio/crash1.mp3
vendored
Normal file
BIN
dist/audio/crash1.mp3
vendored
Normal file
Binary file not shown.
BIN
dist/audio/release1.mp3
vendored
Normal file
BIN
dist/audio/release1.mp3
vendored
Normal file
Binary file not shown.
BIN
dist/audio/rocket1.mp3
vendored
Normal file
BIN
dist/audio/rocket1.mp3
vendored
Normal file
Binary file not shown.
BIN
dist/audio/swoosh1.mp3
vendored
Normal file
BIN
dist/audio/swoosh1.mp3
vendored
Normal file
Binary file not shown.
BIN
dist/audio/thunk1.mp3
vendored
Normal file
BIN
dist/audio/thunk1.mp3
vendored
Normal file
Binary file not shown.
BIN
dist/audio/thunk2.mp3
vendored
Normal file
BIN
dist/audio/thunk2.mp3
vendored
Normal file
Binary file not shown.
BIN
dist/audio/twinkle1.mp3
vendored
Normal file
BIN
dist/audio/twinkle1.mp3
vendored
Normal file
Binary file not shown.
BIN
dist/audio/up1.mp3
vendored
Normal file
BIN
dist/audio/up1.mp3
vendored
Normal file
Binary file not shown.
BIN
dist/audio/up2.mp3
vendored
Normal file
BIN
dist/audio/up2.mp3
vendored
Normal file
Binary file not shown.
BIN
dist/audio/up3.mp3
vendored
Normal file
BIN
dist/audio/up3.mp3
vendored
Normal file
Binary file not shown.
BIN
dist/audio/wrong1.mp3
vendored
Normal file
BIN
dist/audio/wrong1.mp3
vendored
Normal file
Binary file not shown.
146
dist/img/modules/xheavy_connector.svg
vendored
Normal file
146
dist/img/modules/xheavy_connector.svg
vendored
Normal file
|
@ -0,0 +1,146 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="22.166674mm"
|
||||
height="22.16667mm"
|
||||
viewBox="0 0 22.166674 22.16667"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.2 5c3e80d, 2017-08-06"
|
||||
sodipodi:docname="xheavy_connector.svg">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="2.8"
|
||||
inkscape:cx="103.64223"
|
||||
inkscape:cy="48.767255"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="714"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
showguides="false">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid815"
|
||||
originx="-85.489575"
|
||||
originy="-141.05208" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-85.489576,-133.78125)">
|
||||
<path
|
||||
style="opacity:1;fill:#676767;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke;font-variant-east_asian:normal;vector-effect:none;stroke-dashoffset:0"
|
||||
d="m 87.312501,138.25 2.645833,-2.64583 H 103.1875 l 2.64583,2.64583 v 13.22917 L 103.1875,154.125 H 89.958334 l -2.645833,-2.64583 z"
|
||||
id="rect908"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccccc" />
|
||||
<path
|
||||
style="opacity:1;fill:#242424;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
|
||||
d="m 92.604168,143.54167 2.645833,-2.64584 v -5.29166 h 2.645833 v 5.29166 l 2.645836,2.64584 h 5.29166 v 2.64583 l -5.29166,0 -2.645836,2.64583 0,5.29167 h -2.645833 v -5.29167 l -2.645833,-2.64583 -5.291667,0 v -2.64583 z"
|
||||
id="rect908-5-6-7"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccccccccccccc" />
|
||||
<path
|
||||
style="opacity:1;vector-effect:none;fill:#474037;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:fill markers stroke"
|
||||
d="m 94.985418,143.27708 h 3.175 l 0,3.175 h -3.175 z"
|
||||
id="rect4724"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<g
|
||||
id="g900"
|
||||
transform="translate(-3.3333332e-7,-3.4877522e-6)">
|
||||
<path
|
||||
sodipodi:nodetypes="cccccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="rect908-5-6"
|
||||
d="m 86.783335,134.28125 c 5.581822,1e-5 13.229175,0 19.579165,0 l -1.85208,1.32292 -1.32292,1.32291 h -1.32292 l -1.32291,-1.32291 h -3.968752 -3.96875 l -1.322917,1.32291 -1.322916,1e-5 -1.322917,-1.32292 z"
|
||||
style="opacity:1;vector-effect:none;fill:#836457;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="rect908-5-6-3"
|
||||
d="m 106.3625,134.28125 -1.85208,1.32292 -1.32292,1.32291 h -1.32292 l -1.32291,-1.32291 h -3.968752 -3.96875 l -1.322917,1.32291 h -1.322917 l -1.322916,-1.32291 -1.852083,-1.32292"
|
||||
style="opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers" />
|
||||
</g>
|
||||
<g
|
||||
id="g900-6"
|
||||
transform="matrix(1,0,0,-1,9.9999997e-7,289.72916)">
|
||||
<path
|
||||
sodipodi:nodetypes="cccccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="rect908-5-6-2"
|
||||
d="m 86.783335,134.28125 c 5.581822,1e-5 13.229175,0 19.579165,0 l -1.85208,1.32292 -1.32292,1.32291 h -1.32292 l -1.32291,-1.32291 h -3.968752 -3.96875 l -1.322917,1.32291 -1.322916,1e-5 -1.322917,-1.32292 z"
|
||||
style="opacity:1;vector-effect:none;fill:#836457;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="rect908-5-6-3-6"
|
||||
d="m 106.3625,134.28125 -1.85208,1.32292 -1.32292,1.32291 h -1.32292 l -1.32291,-1.32291 h -3.968752 -3.96875 l -1.322917,1.32291 h -1.322917 l -1.322916,-1.32291 -1.852083,-1.32292"
|
||||
style="opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers" />
|
||||
</g>
|
||||
<g
|
||||
id="g900-9"
|
||||
transform="matrix(0,-1,-1,0,241.4375,241.4375)">
|
||||
<path
|
||||
sodipodi:nodetypes="cccccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="rect908-5-6-20"
|
||||
d="m 86.783335,134.28125 c 5.581822,1e-5 13.229175,0 19.579165,0 l -1.85208,1.32292 -1.32292,1.32291 h -1.32292 l -1.32291,-1.32291 h -3.968752 -3.96875 l -1.322917,1.32291 -1.322916,1e-5 -1.322917,-1.32292 z"
|
||||
style="opacity:1;vector-effect:none;fill:#836457;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="rect908-5-6-3-2"
|
||||
d="m 106.3625,134.28125 -1.85208,1.32292 -1.32292,1.32291 h -1.32292 l -1.32291,-1.32291 h -3.968752 -3.96875 l -1.322917,1.32291 h -1.322917 l -1.322916,-1.32291 -1.852083,-1.32292"
|
||||
style="opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers" />
|
||||
</g>
|
||||
<g
|
||||
id="g900-3"
|
||||
transform="matrix(0,1,1,0,-48.291669,48.291665)">
|
||||
<path
|
||||
sodipodi:nodetypes="cccccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="rect908-5-6-75"
|
||||
d="m 86.783335,134.28125 c 5.581822,1e-5 13.229175,0 19.579165,0 l -1.85208,1.32292 -1.32292,1.32291 h -1.32292 l -1.32291,-1.32291 h -3.968752 -3.96875 l -1.322917,1.32291 -1.322916,1e-5 -1.322917,-1.32292 z"
|
||||
style="opacity:1;vector-effect:none;fill:#836457;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="rect908-5-6-3-9"
|
||||
d="m 106.3625,134.28125 -1.85208,1.32292 -1.32292,1.32291 h -1.32292 l -1.32291,-1.32291 h -3.968752 -3.96875 l -1.322917,1.32291 h -1.322917 l -1.322916,-1.32291 -1.852083,-1.32292"
|
||||
style="opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 8.2 KiB |
|
@ -20,6 +20,9 @@ export const images = {
|
|||
off: 'modules/light_thruster.svg',
|
||||
on: 'modules/light_thruster_on.svg',
|
||||
}
|
||||
},
|
||||
connector: {
|
||||
xheavy: 'modules/xheavy_connector.svg'
|
||||
}
|
||||
},
|
||||
celestials: {
|
||||
|
@ -29,7 +32,10 @@ export const images = {
|
|||
}
|
||||
};
|
||||
|
||||
export const audio = {};
|
||||
export const audio = {
|
||||
itemPickup: 'up1.mp3',
|
||||
endEdit: 'release1.mp3'
|
||||
};
|
||||
|
||||
export async function init() {
|
||||
let parse = (obj, convert) => Object.entries(obj).forEach(([k, v]) => {
|
||||
|
@ -46,7 +52,11 @@ export async function init() {
|
|||
return img;
|
||||
});
|
||||
parse(audio, str => {
|
||||
// TODO: Load audio.
|
||||
let audio = new Audio('audio/' + str);
|
||||
promises.push(new Promise((res, rej) => {
|
||||
audio.addEventListener('canplaythrough', res);
|
||||
}));
|
||||
return audio;
|
||||
});
|
||||
|
||||
await Promise.all(promises);
|
||||
|
|
16
js/data.mjs
16
js/data.mjs
|
@ -5,12 +5,13 @@ export const modules = {
|
|||
small: {
|
||||
name: 'Small Capsule',
|
||||
tooltip: 'A small, simple capsule. Provides just enough ' +
|
||||
'rotational power for a small rocket.',
|
||||
'rotational power for a small rocket and has a small ' +
|
||||
'amount of storage space.',
|
||||
type: 'capsule',
|
||||
id: 'small',
|
||||
mass: 2,
|
||||
connectivity: [false, false, true, false],
|
||||
capacity: 3,
|
||||
capacity: 2,
|
||||
rotation: 0.1
|
||||
}
|
||||
},
|
||||
|
@ -37,5 +38,16 @@ export const modules = {
|
|||
thrust: 10,
|
||||
isp: 200
|
||||
}
|
||||
},
|
||||
connector: {
|
||||
xheavy: {
|
||||
name: 'Heavy 4-way Connector',
|
||||
tooltip: 'Can connect ship parts in any direction, but is quite ' +
|
||||
'heavy',
|
||||
type: 'connector',
|
||||
id: 'xheavy',
|
||||
mass: 5,
|
||||
connectivity: [true, true, true, true]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
5
js/game/audio.mjs
Normal file
5
js/game/audio.mjs
Normal file
|
@ -0,0 +1,5 @@
|
|||
import {audio} from '../assets.mjs';
|
||||
|
||||
export function play(name) {
|
||||
audio[name].cloneNode(true).play();
|
||||
}
|
|
@ -87,7 +87,9 @@ function validate() {
|
|||
if (tile.type == 'thruster') thrustersFound++;
|
||||
if (tile.type == 'fuel') fuelFound++;
|
||||
tile.neighbours.forEach(n => {
|
||||
if (unvisited.has(n)) visit(n);
|
||||
if (unvisited.has(n) && n.neighbours.indexOf(tile) > -1) {
|
||||
visit(n);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -111,7 +113,7 @@ function validate() {
|
|||
} else {
|
||||
message = reason;
|
||||
}
|
||||
|
||||
|
||||
return reason;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ import * as player from './player.mjs';
|
|||
import * as inventory from './inventory.mjs';
|
||||
import * as particle from '../world/particle.mjs';
|
||||
import * as edit from './edit.mjs';
|
||||
import * as audio from './audio.mjs';
|
||||
|
||||
export let shipLanded = false;
|
||||
|
||||
|
@ -71,6 +72,7 @@ export function endEditing() {
|
|||
let {valid, reason} = edit.end();
|
||||
|
||||
if (valid) {
|
||||
audio.play('endEdit');
|
||||
graphics.changePerspective('universe');
|
||||
game.state.editing = false;
|
||||
game.state.inventory = false;
|
||||
|
@ -91,5 +93,6 @@ export function tossItem() {
|
|||
|
||||
export function collectItem(type, id) {
|
||||
inventory.addItem(type, id);
|
||||
audio.play('itemPickup');
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ let onupdate = () => {};
|
|||
|
||||
export function init() {
|
||||
items.clear();
|
||||
addItem('connector', 'xheavy');
|
||||
}
|
||||
|
||||
export function getTiles() {
|
||||
|
|
|
@ -10,6 +10,14 @@ export function render() {
|
|||
if (graphics.trace) world.tracers.forEach(renderTracer);
|
||||
world.ships.forEach(renderShip);
|
||||
world.entities.forEach(renderEntity);
|
||||
|
||||
/*
|
||||
if (typeof window.q === 'undefined') window.q = [];
|
||||
q.forEach(p => {
|
||||
context.fillStyle = p[2];
|
||||
context.fillRect(p[0] - 0.05, p[1] - 0.05, 0.1, 0.1);
|
||||
});
|
||||
*/
|
||||
}
|
||||
|
||||
function renderParticle(particle) {
|
||||
|
|
|
@ -88,11 +88,17 @@ export function game() {
|
|||
};
|
||||
|
||||
|
||||
let invShadow = root();
|
||||
shadow.append(invShadow);
|
||||
invShadow.posRelative({x: 0, w: 0.4, h: 0.6});
|
||||
invShadow.x += 10;
|
||||
invShadow.y += 10;
|
||||
invShadow.h += 60;
|
||||
|
||||
let inventory = new GuiInventory(0, 0, 0, 0);
|
||||
shadow.append(inventory);
|
||||
inventory.posRelative({x: 0, y: 0, w: 0.4, h: 0.6});
|
||||
inventory.x += 10;
|
||||
inventory.y += 10;
|
||||
invShadow.append(inventory);
|
||||
inventory.posRelative({w: 1, h: 1});
|
||||
inventory.h -= 60;
|
||||
|
||||
edit.guiInventory = inventory;
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ export default class Body {
|
|||
return result;
|
||||
}
|
||||
|
||||
getWorldPoint(lx, ly) {
|
||||
getWorldPoint(lx, ly, test) {
|
||||
let [cx, cy] = this.localCom;
|
||||
let [nx, ny] = this.rotateVector(lx - cx, ly - cy, this.r);
|
||||
return [nx + this.x + cx, ny + this.y + cy];
|
||||
|
@ -55,8 +55,8 @@ export default class Body {
|
|||
}
|
||||
|
||||
rotateVector(x, y, r = this.r) {
|
||||
return [(x * Math.cos(r) - y * Math.sin(r)),
|
||||
(y * Math.cos(r) - x * Math.sin(r))];
|
||||
return [(x * Math.cos(-r) + y * Math.sin(-r)),
|
||||
-(-y * Math.cos(-r) + x * Math.sin(-r))];
|
||||
}
|
||||
|
||||
// TODO: Remove and replace uses with `rotateVector`.
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import * as sector from './sector.mjs';
|
||||
import * as spawn from './spawn.mjs';
|
||||
import * as graphics from '../graphics/index.mjs';
|
||||
|
||||
export {getSectorFromWorld, getContainedSectors} from './sector.mjs';
|
||||
|
||||
|
@ -31,5 +32,5 @@ export function tick() {
|
|||
celestials.forEach(c => c.tick());
|
||||
entities.forEach(e => e.tick());
|
||||
ships.forEach(s => s.tick());
|
||||
tracers.forEach(t => t.tick());
|
||||
if (graphics.trace) tracers.forEach(t => t.tick());
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@ export default class Ship extends Body {
|
|||
}
|
||||
|
||||
tick() {
|
||||
window.q = [];
|
||||
if (!state.editing) this.tickMotion();
|
||||
if (!this.landed) this.tickGravity(world.celestials);
|
||||
if (!state.editing) this.resolveCollisions();
|
||||
|
@ -109,19 +110,29 @@ export default class Ship extends Body {
|
|||
});
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
window.q.push([...this.com, 'green']);
|
||||
}
|
||||
|
||||
resolveCelestialCollision(pos, cel) {
|
||||
let celToCom = this.angleTo(...this.com, ...cel.com);
|
||||
let celToPoc = this.angleTo(...pos, ...cel.com);
|
||||
let pocToCom = this.angleTo(...this.com, ...pos);
|
||||
let shipAngle = this.r + Math.PI / 2;
|
||||
|
||||
window.q.push([...pos, 'blue']);
|
||||
|
||||
let turnAngle = this.angleDifference(celToPoc, pocToCom);
|
||||
let checkAngle = this.angleDifference(celToPoc, this.r + Math.PI / 2);
|
||||
let checkAngle = this.angleDifference(celToPoc, shipAngle);
|
||||
let correctionAngle = this.angleDifference(shipAngle, pocToCom);
|
||||
|
||||
let [force] = this.rotateVector(0, 1, turnAngle);
|
||||
|
||||
if (Math.abs(checkAngle) < consts.TIP_ANGLE) force *= -1;
|
||||
if (Math.abs(checkAngle) < consts.TIP_ANGLE) {
|
||||
[force] = this.rotateVector(0, 1, correctionAngle);
|
||||
force *= 0.2;
|
||||
}
|
||||
|
||||
let canLand = Math.abs(checkAngle) < 0.03
|
||||
&& Math.abs(this.rvel) < 0.001;
|
||||
|
@ -131,7 +142,7 @@ export default class Ship extends Body {
|
|||
this.rvel = 0;
|
||||
this.r = celToCom - Math.PI / 2;
|
||||
}
|
||||
|
||||
|
||||
this.rvel += force * consts.TIP_SPEED;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,9 +11,11 @@ export function player() {
|
|||
ship.addModule(0, 0, modules.capsule.small);
|
||||
ship.addModule(0, 1, modules.fuel.small);
|
||||
ship.addModule(0, 2, modules.thruster.light);
|
||||
//ship.addModule(1, 2, modules.thruster.light);
|
||||
//ship.addModule(-1, 2, modules.thruster.light);
|
||||
world.ships.add(ship);
|
||||
world.setPlayerShip(ship);
|
||||
|
||||
|
||||
let tracer = new Tracer(ship);
|
||||
world.tracers.add(tracer);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue