feat: real physics and more barrels
This commit is contained in:
parent
408e91b453
commit
95e65040bf
|
@ -8,7 +8,7 @@ import {
|
|||
EntityList,
|
||||
registerTrait,
|
||||
} from '@avocado/entity';
|
||||
import {World} from '@avocado/physics/dummy/world';
|
||||
import {World} from '@avocado/physics/matter/world';
|
||||
import {StateSynchronizer} from '@avocado/state';
|
||||
// Create game.
|
||||
export default function(avocadoServer) {
|
||||
|
@ -22,9 +22,9 @@ const informables = [];
|
|||
const stateSynchronizer = new StateSynchronizer({
|
||||
entityList,
|
||||
});
|
||||
for (let i = 0; i < 20; ++i) {
|
||||
const x = Math.floor(Math.random() * 1000) + 100;
|
||||
const y = Math.floor(Math.random() * 500) + 100;
|
||||
for (let i = 0; i < 40; ++i) {
|
||||
const x = Math.floor(Math.random() * 800) + 200;
|
||||
const y = Math.floor(Math.random() * 300) + 200;
|
||||
const flowerBarrel = createFlowerBarrelEntity([x, y]);
|
||||
entityList.addEntity(flowerBarrel);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user