fun: room peeps
This commit is contained in:
parent
6f6c696d80
commit
8b6d713ab2
|
@ -72,9 +72,15 @@ function fireJSON(position) {
|
||||||
function flowerBarrelJSON(position) {
|
function flowerBarrelJSON(position) {
|
||||||
return {
|
return {
|
||||||
traits: {
|
traits: {
|
||||||
|
alive: {
|
||||||
|
state: {
|
||||||
|
maxLife: 1000,
|
||||||
|
life: 1000,
|
||||||
|
},
|
||||||
|
},
|
||||||
collider: {},
|
collider: {},
|
||||||
|
emitter: {},
|
||||||
existent: {},
|
existent: {},
|
||||||
visible: {},
|
|
||||||
physical: {},
|
physical: {},
|
||||||
pictured: {
|
pictured: {
|
||||||
params: {
|
params: {
|
||||||
|
@ -102,6 +108,8 @@ function flowerBarrelJSON(position) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
visible: {},
|
||||||
|
vulnerable: {},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -147,7 +155,7 @@ function kittyJSON(position) {
|
||||||
params: {
|
params: {
|
||||||
animations: {
|
animations: {
|
||||||
idle: {
|
idle: {
|
||||||
offset: [0, -3],
|
offset: [0, -6],
|
||||||
uri: '/kitty.animation.json',
|
uri: '/kitty.animation.json',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -266,7 +274,11 @@ function kittyJSON(position) {
|
||||||
},
|
},
|
||||||
emitter: {},
|
emitter: {},
|
||||||
existent: {},
|
existent: {},
|
||||||
visible: {},
|
visible: {
|
||||||
|
state: {
|
||||||
|
visibleScale: [1.5, 1.5],
|
||||||
|
}
|
||||||
|
},
|
||||||
mobile: {
|
mobile: {
|
||||||
state: {
|
state: {
|
||||||
speed: 40,
|
speed: 40,
|
||||||
|
@ -284,7 +296,7 @@ function kittyJSON(position) {
|
||||||
shape: {
|
shape: {
|
||||||
type: 'rectangle',
|
type: 'rectangle',
|
||||||
position: [0, 0],
|
position: [0, 0],
|
||||||
size: [8, 4],
|
size: [12, 6],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -331,17 +343,22 @@ const roomJSON = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
roomJSON.layers.everything.entities.push(fireJSON([200, 200]));
|
|
||||||
for (let i = 0; i < 4; ++i) {
|
for (let i = 0; i < 20; ++i) {
|
||||||
const x = Math.floor(Math.random() * 284) + 50;
|
const x = Math.floor(Math.random() * 284) + 50;
|
||||||
const y = Math.floor(Math.random() * 284) + 50;
|
const y = Math.floor(Math.random() * 284) + 50;
|
||||||
roomJSON.layers.everything.entities.push(flowerBarrelJSON([x * 4, y * 4]));
|
roomJSON.layers.everything.entities.push(flowerBarrelJSON([x * 4, y * 4]));
|
||||||
}
|
}
|
||||||
for (let i = 0; i < 40; ++i) {
|
for (let i = 0; i < 50; ++i) {
|
||||||
const x = Math.floor(Math.random() * 284) + 50;
|
const x = Math.floor(Math.random() * 284) + 50;
|
||||||
const y = Math.floor(Math.random() * 284) + 50;
|
const y = Math.floor(Math.random() * 284) + 50;
|
||||||
roomJSON.layers.everything.entities.push(kittyJSON([x * 4, y * 4]));
|
roomJSON.layers.everything.entities.push(kittyJSON([x * 4, y * 4]));
|
||||||
}
|
}
|
||||||
|
for (let i = 0; i < 15; ++i) {
|
||||||
|
const x = Math.floor(Math.random() * 284) + 50;
|
||||||
|
const y = Math.floor(Math.random() * 284) + 50;
|
||||||
|
roomJSON.layers.everything.entities.push(fireJSON([x * 4, y * 4]));
|
||||||
|
}
|
||||||
export function createRoom() {
|
export function createRoom() {
|
||||||
const room = (new Room()).fromJSON(roomJSON);
|
const room = (new Room()).fromJSON(roomJSON);
|
||||||
room.world = new World();
|
room.world = new World();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user