mirror of
https://github.com/genxium/DelayNoMore
synced 2024-12-26 11:48:56 +00:00
Fixes for countdown.
This commit is contained in:
parent
e90a335c56
commit
372bfc2b48
@ -440,7 +440,7 @@
|
|||||||
"array": [
|
"array": [
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
216.05530045313827,
|
209.65900912275052,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -573,9 +573,8 @@ cc.Class({
|
|||||||
// No need to prompt upon rejoined.
|
// No need to prompt upon rejoined.
|
||||||
self.popupSimplePressToGo(i18n.t("gameTip.start"));
|
self.popupSimplePressToGo(i18n.t("gameTip.start"));
|
||||||
}
|
}
|
||||||
self.onBattleStarted(rdf.players, rdf.playerMetas);
|
|
||||||
self._applyRoomDownsyncFrameDynamics(rdf);
|
self.onBattleStarted(rdf);
|
||||||
self.battleState = ALL_BATTLE_STATES.IN_BATTLE; // Starts the increment of "self.renderFrameId" in "self.update(dt)"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
self._dumpToFullFrameCache(rdf);
|
self._dumpToFullFrameCache(rdf);
|
||||||
@ -684,9 +683,15 @@ cc.Class({
|
|||||||
this._inputControlEnabled = false;
|
this._inputControlEnabled = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
onBattleStarted(players, playerMetas) {
|
onBattleStarted(rdf) {
|
||||||
|
// This function is also applicable to "re-joining".
|
||||||
|
const players = rdf.players;
|
||||||
|
const playerMetas = rdf.playerMetas;
|
||||||
console.log('On battle started!');
|
console.log('On battle started!');
|
||||||
const self = window.mapIns;
|
const self = window.mapIns;
|
||||||
|
if (null != rdf.countdownNanos) {
|
||||||
|
self.countdownNanos = rdf.countdownNanos;
|
||||||
|
}
|
||||||
if (null != self.musicEffectManagerScriptIns) {
|
if (null != self.musicEffectManagerScriptIns) {
|
||||||
self.musicEffectManagerScriptIns.playBGM();
|
self.musicEffectManagerScriptIns.playBGM();
|
||||||
}
|
}
|
||||||
@ -697,6 +702,9 @@ cc.Class({
|
|||||||
self.countdownToBeginGameNode.parent.removeChild(self.countdownToBeginGameNode);
|
self.countdownToBeginGameNode.parent.removeChild(self.countdownToBeginGameNode);
|
||||||
}
|
}
|
||||||
self.transitToState(ALL_MAP_STATES.VISUAL);
|
self.transitToState(ALL_MAP_STATES.VISUAL);
|
||||||
|
|
||||||
|
self._applyRoomDownsyncFrameDynamics(rdf);
|
||||||
|
self.battleState = ALL_BATTLE_STATES.IN_BATTLE; // Starts the increment of "self.renderFrameId" in "self.update(dt)"
|
||||||
},
|
},
|
||||||
|
|
||||||
logBattleStats() {
|
logBattleStats() {
|
||||||
@ -925,9 +933,6 @@ cc.Class({
|
|||||||
|
|
||||||
_applyRoomDownsyncFrameDynamics(rdf) {
|
_applyRoomDownsyncFrameDynamics(rdf) {
|
||||||
const self = this;
|
const self = this;
|
||||||
if (null != rdf.countdownNanos) {
|
|
||||||
self.countdownNanos = rdf.countdownNanos;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let playerId in self.playerRichInfoDict) {
|
for (let playerId in self.playerRichInfoDict) {
|
||||||
const playerRichInfo = self.playerRichInfoDict[playerId];
|
const playerRichInfo = self.playerRichInfoDict[playerId];
|
||||||
|
Loading…
Reference in New Issue
Block a user