forked from 0ad/0ad
Update alpha version label, change default single player map, update scripts music system
This was SVN commit r10263.
This commit is contained in:
parent
eb5a83fc8f
commit
97e4f0fd5d
@ -55,11 +55,15 @@ function Music()
|
||||
this.time = Date.now();
|
||||
}
|
||||
|
||||
// Needs to be called in onTick() to work
|
||||
Music.prototype.update = function()
|
||||
// "reference" refers to this instance of Music (needed if called from the timer)
|
||||
Music.prototype.setState = function(state)
|
||||
{
|
||||
this.updateTimer();
|
||||
this.reference.currentState = state;
|
||||
this.updateState();
|
||||
};
|
||||
|
||||
Music.prototype.updateState = function()
|
||||
{
|
||||
if (this.currentState != this.oldState)
|
||||
{
|
||||
this.oldState = this.currentState;
|
||||
@ -95,7 +99,6 @@ Music.prototype.update = function()
|
||||
break;
|
||||
|
||||
case this.states.DEFEAT_CUE:
|
||||
// this.currentMusic.fade(-1, 0.0, 1.0);
|
||||
this.switchMusic(this.tracks.DEFEAT_CUE_TRACK, 2.0, false);
|
||||
this.setDelay(this.states.DEFEAT, 7000);
|
||||
break;
|
||||
@ -105,16 +108,6 @@ Music.prototype.update = function()
|
||||
break;
|
||||
}
|
||||
}
|
||||
// else if (!this.isPlaying())
|
||||
// {
|
||||
//
|
||||
// }
|
||||
};
|
||||
|
||||
// "reference" refers to this instance of Music (needed if called from the timer)
|
||||
Music.prototype.setState = function(state)
|
||||
{
|
||||
this.reference.currentState = state;
|
||||
};
|
||||
|
||||
Music.prototype.storeTracks = function(civMusic)
|
||||
@ -207,6 +200,7 @@ Music.prototype.stopTimer = function()
|
||||
this.timer = null;
|
||||
};
|
||||
|
||||
// Needs to be called in onTick() to work
|
||||
Music.prototype.updateTimer = function()
|
||||
{
|
||||
this.time = Date.now();
|
||||
|
@ -1,7 +1,7 @@
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Constants
|
||||
const DEFAULT_NETWORKED_MAP = "Median Oasis";
|
||||
const DEFAULT_OFFLINE_MAP = "Acropolis II";
|
||||
const DEFAULT_OFFLINE_MAP = "Oasis II";
|
||||
|
||||
// TODO: Move these somewhere like simulation\data\game_types.json, Atlas needs them too
|
||||
const VICTORY_TEXT = ["Conquest", "None"];
|
||||
|
@ -92,7 +92,7 @@ function onTick()
|
||||
updateMenuPosition();
|
||||
|
||||
// Update music state
|
||||
global.music.update();
|
||||
global.music.updateTimer();
|
||||
|
||||
if (Engine.IsUserReportEnabled())
|
||||
{
|
||||
|
@ -189,7 +189,7 @@ function onTick()
|
||||
updateMenuPosition();
|
||||
|
||||
// Update music state
|
||||
global.music.update();
|
||||
global.music.updateTimer();
|
||||
|
||||
// When training is blocked, flash population (alternates colour every 500msec)
|
||||
if (g_IsTrainingQueueBlocked && (Date.now() % 1000) < 500)
|
||||
|
@ -317,7 +317,7 @@
|
||||
|
||||
<!-- Displays Alpha name and number -->
|
||||
<object size="70%-128 0 70%+128 100%" name="alphaLabel" type="text" style="CenteredLabelText" text_valign="top" ghost="true">
|
||||
ALPHA VI : Fortuna
|
||||
ALPHA VII : Geronium
|
||||
|
||||
<!-- Displays build date and revision number-->
|
||||
<object size="50%-128 0 50%+128 100%-2" name="buildTimeLabel" type="text" text_align="center" text_valign="bottom" font="serif-12" textcolor="white" ghost="true">
|
||||
|
@ -213,5 +213,5 @@ function init(data)
|
||||
function onTick()
|
||||
{
|
||||
// Update music state
|
||||
global.music.update();
|
||||
global.music.updateTimer();
|
||||
}
|
Loading…
Reference in New Issue
Block a user