fun: blue fire
This commit is contained in:
parent
b934365ce7
commit
227e861e09
7
resource/blue-fire.animation.json
Normal file
7
resource/blue-fire.animation.json
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"frameRate": 0.2,
|
||||
"frameCount": 4,
|
||||
"frameSize": [32, 32],
|
||||
"directionCount": 1,
|
||||
"imageUri": "/blue-fire.png"
|
||||
}
|
BIN
resource/blue-fire.png
Normal file
BIN
resource/blue-fire.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 861 B |
7
resource/blue-fire.sound.json
Normal file
7
resource/blue-fire.sound.json
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"interval": 0.025,
|
||||
"src": [
|
||||
"/heal.wav"
|
||||
],
|
||||
"volume": 0.03
|
||||
}
|
BIN
resource/heal.wav
Executable file
BIN
resource/heal.wav
Executable file
Binary file not shown.
|
@ -102,6 +102,15 @@ function fireJSON(position) {
|
|||
},
|
||||
};
|
||||
}
|
||||
// Healing fire!
|
||||
function blueFireJSON(position) {
|
||||
const json = fireJSON(position);
|
||||
json.traits.animated.params.animations.idle.uri = '/blue-fire.animation.json';
|
||||
json.traits.damaging.params.damageSpecs[0].power = -5;
|
||||
json.traits.damaging.params.damageSpecs[0].lock = 0.02;
|
||||
json.traits.audible.params.sounds.fire.uri = '/blue-fire.sound.json';
|
||||
return json;
|
||||
}
|
||||
// A flower barrel.
|
||||
function flowerBarrelJSON(position) {
|
||||
return {
|
||||
|
@ -446,6 +455,11 @@ for (let i = 0; i < 30; ++i) {
|
|||
const y = Math.floor(Math.random() * 284) + 50;
|
||||
roomJSON.layers.everything.entities.push(fireJSON([x * 4, y * 4]));
|
||||
}
|
||||
for (let i = 0; i < 1; ++i) {
|
||||
const x = Math.floor(Math.random() * 284) + 50;
|
||||
const y = Math.floor(Math.random() * 284) + 50;
|
||||
roomJSON.layers.everything.entities.push(blueFireJSON([x * 4, y * 4]));
|
||||
}
|
||||
export function createRoom() {
|
||||
const room = (new Room()).fromJSON(roomJSON);
|
||||
room.world = new World();
|
||||
|
|
Loading…
Reference in New Issue
Block a user