mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-05-31 09:41:54 +08:00
We have audio! Thanks @orsi!
This commit is contained in:
+8
-1
@@ -1,5 +1,4 @@
|
||||
var World = {
|
||||
|
||||
RADIUS: 30,
|
||||
VILLAGE_POS: [30, 30],
|
||||
TILE: {
|
||||
@@ -347,6 +346,11 @@ var World = {
|
||||
World.lightMap(World.curPos[0], World.curPos[1], World.state.mask);
|
||||
World.drawMap();
|
||||
World.doSpace();
|
||||
|
||||
// play random footstep
|
||||
var randomFootstep = Math.floor(Math.random() * 5) + 1;
|
||||
AudioEngine.playSound(AudioLibrary['FOOTSTEPS_' + randomFootstep]);
|
||||
|
||||
if(World.checkDanger()) {
|
||||
if(World.danger) {
|
||||
Notifications.notify(World, _('dangerous to be this far from the village without proper protection'));
|
||||
@@ -534,6 +538,7 @@ var World = {
|
||||
} else if(typeof World.LANDMARKS[curTile] != 'undefined') {
|
||||
if(curTile != World.TILE.OUTPOST || !World.outpostUsed()) {
|
||||
Events.startEvent(Events.Setpieces[World.LANDMARKS[curTile].scene]);
|
||||
AudioEngine.playEventMusic(Events.Setpieces[World.LANDMARKS[curTile].scene].audio);
|
||||
}
|
||||
} else {
|
||||
if(World.useSupplies()) {
|
||||
@@ -883,6 +888,7 @@ var World = {
|
||||
World.state = null;
|
||||
Path.outfit = {};
|
||||
$SM.remove('outfit');
|
||||
AudioEngine.playSound(AudioLibrary.DEATH);
|
||||
$('#outerSlider').animate({opacity: '0'}, 600, 'linear', function() {
|
||||
$('#outerSlider').css('left', '0px');
|
||||
$('#locationSlider').css('left', '0px');
|
||||
@@ -1006,6 +1012,7 @@ var World = {
|
||||
World.curPos = World.copyPos(World.VILLAGE_POS);
|
||||
World.drawMap();
|
||||
World.setTitle();
|
||||
AudioEngine.playBackgroundMusic(AudioLibrary.MUSIC_WORLD);
|
||||
World.dead = false;
|
||||
$('div#bagspace-world > div').empty();
|
||||
World.updateSupplies();
|
||||
|
||||
Reference in New Issue
Block a user