Add more modules
This commit is contained in:
parent
0c63cb075b
commit
504f5fcc0c
18 changed files with 1448 additions and 11 deletions
|
@ -85,6 +85,8 @@ function getAttributes() {
|
|||
thrust += t.module.thrust;
|
||||
} else if (t.type === 'gyroscope') {
|
||||
rotation += t.module.rotation;
|
||||
} else if (t.type === 'cargo') {
|
||||
cargo += t.module.capacity;
|
||||
}
|
||||
mass += t.module.mass;
|
||||
});
|
||||
|
|
|
@ -22,6 +22,10 @@ export function init() {
|
|||
shipLanded = false;
|
||||
}
|
||||
|
||||
export function outOfFuel() {
|
||||
gameOver('You ran out of fuel');
|
||||
}
|
||||
|
||||
export function playMusic() {
|
||||
audio.start('music');
|
||||
audio.volume('music', 0.4);
|
||||
|
@ -97,7 +101,6 @@ export function crash() {
|
|||
gameOver('You crashed');
|
||||
audio.play('crash');
|
||||
particle.createCrash(world.playerShip);
|
||||
|
||||
}
|
||||
|
||||
export function gameOver(reason) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue