Improve inventory
This commit is contained in:
parent
ee5ab45cfb
commit
27c6a8bcd0
12 changed files with 99 additions and 17 deletions
|
@ -15,6 +15,18 @@ export function createThrustExhaust(thruster) {
|
|||
}));
|
||||
}
|
||||
|
||||
export function createEndEditBurst(ship) {
|
||||
for (let i = 0; i < 20; i++) {
|
||||
particles.add(new Particle(...ship.poc, {
|
||||
color: '#ccc',
|
||||
lifetime: Math.random() * 30 + 25,
|
||||
size: Math.random() * 0.3 + 0.05,
|
||||
spray: 0.3,
|
||||
gravity: true
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
export function createPickupBurst(ship, point) {
|
||||
for (let i = 0; i < 20; i++) {
|
||||
particles.add(new Particle(...point, {
|
||||
|
|
|
@ -16,6 +16,7 @@ export default class Ship extends Body {
|
|||
this.maxRadius = 0;
|
||||
this.landed = false;
|
||||
this.lastContactModule = null;
|
||||
this.poc = this.com;
|
||||
}
|
||||
|
||||
get com() {
|
||||
|
@ -121,6 +122,7 @@ export default class Ship extends Body {
|
|||
this.halt();
|
||||
this.resolveCelestialCollision(p, body, module);
|
||||
this.lastContactModule = module;
|
||||
this.poc = p;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue