Add collectable items
This commit is contained in:
parent
826986cdbf
commit
69fee5e73d
10 changed files with 131 additions and 52 deletions
|
@ -1,6 +1,7 @@
|
|||
import Ship from './ship.mjs';
|
||||
import Module from './module.mjs';
|
||||
import Celestial from './celestial.mjs';
|
||||
import Entity from './entity.mjs';
|
||||
import {modules} from '../data.mjs';
|
||||
import * as world from './index.mjs';
|
||||
|
||||
|
@ -16,11 +17,17 @@ export function player() {
|
|||
|
||||
export function startPlanet() {
|
||||
return celestial(0, 0, 40, {
|
||||
density: 10,
|
||||
density: 3,
|
||||
type: 'green'
|
||||
});
|
||||
}
|
||||
|
||||
export function testEntity() {
|
||||
let entity = new Entity(0, -50);
|
||||
world.entities.add(entity);
|
||||
return entity;
|
||||
}
|
||||
|
||||
export function celestial(x, y, radius, params) {
|
||||
let celestial = new Celestial(x - radius, y - radius, radius, params);
|
||||
world.celestials.add(celestial);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue