initPlugins & musicBtn & clearStatus
This commit is contained in:
parent
e280308da5
commit
b91e40c037
@ -323,8 +323,6 @@ control.prototype._showStartAnimate_resetDom = function () {
|
|||||||
core.dom.levelChooseButtons.style.display = 'none';
|
core.dom.levelChooseButtons.style.display = 'none';
|
||||||
core.status.played = false;
|
core.status.played = false;
|
||||||
core.clearStatus();
|
core.clearStatus();
|
||||||
core.clearMap('all');
|
|
||||||
core.deleteAllCanvas();
|
|
||||||
core.dom.musicBtn.style.display = 'block';
|
core.dom.musicBtn.style.display = 'block';
|
||||||
core.setMusicBtn();
|
core.setMusicBtn();
|
||||||
// 重置音量
|
// 重置音量
|
||||||
@ -362,6 +360,7 @@ control.prototype.clearStatus = function() {
|
|||||||
}
|
}
|
||||||
core.status = {};
|
core.status = {};
|
||||||
core.clearStatusBar();
|
core.clearStatusBar();
|
||||||
|
core.clearMap('all');
|
||||||
core.deleteAllCanvas();
|
core.deleteAllCanvas();
|
||||||
core.status.played = false;
|
core.status.played = false;
|
||||||
}
|
}
|
||||||
@ -2524,7 +2523,7 @@ control.prototype._resize_gameGroup = function (obj) {
|
|||||||
floorMsgGroup.style.color = obj.globalAttribute.floorChangingTextColor;
|
floorMsgGroup.style.color = obj.globalAttribute.floorChangingTextColor;
|
||||||
// musicBtn
|
// musicBtn
|
||||||
if (core.domStyle.isVertical || core.domStyle.scale < 1) {
|
if (core.domStyle.isVertical || core.domStyle.scale < 1) {
|
||||||
core.dom.musicBtn.style.right = core.dom.musicBtn.style.height = "3px";
|
core.dom.musicBtn.style.right = core.dom.musicBtn.style.bottom = "3px";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
core.dom.musicBtn.style.right = (obj.clientWidth - totalWidth) / 2 + "px";
|
core.dom.musicBtn.style.right = (obj.clientWidth - totalWidth) / 2 + "px";
|
||||||
|
|||||||
@ -219,6 +219,7 @@ core.prototype.init = function (coreData, callback) {
|
|||||||
this._init_flags();
|
this._init_flags();
|
||||||
this._init_platform();
|
this._init_platform();
|
||||||
this._init_others();
|
this._init_others();
|
||||||
|
this._initPlugins();
|
||||||
|
|
||||||
core.loader._load(function () {
|
core.loader._load(function () {
|
||||||
core._afterLoadResources(callback);
|
core._afterLoadResources(callback);
|
||||||
@ -343,7 +344,6 @@ core.prototype._afterLoadResources = function (callback) {
|
|||||||
// 初始化地图
|
// 初始化地图
|
||||||
core.initStatus.maps = core.maps._initMaps();
|
core.initStatus.maps = core.maps._initMaps();
|
||||||
core.control._setRequestAnimationFrame();
|
core.control._setRequestAnimationFrame();
|
||||||
core._initPlugins();
|
|
||||||
core.showStartAnimate();
|
core.showStartAnimate();
|
||||||
if (callback) callback();
|
if (callback) callback();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,9 +52,6 @@ events.prototype._startGame_start = function (hard, seed, route, callback) {
|
|||||||
}
|
}
|
||||||
else core.utils.__init_seed();
|
else core.utils.__init_seed();
|
||||||
this.setInitData();
|
this.setInitData();
|
||||||
|
|
||||||
core.clearMap('all');
|
|
||||||
core.deleteAllCanvas();
|
|
||||||
core.clearStatusBar();
|
core.clearStatusBar();
|
||||||
|
|
||||||
var todo = [];
|
var todo = [];
|
||||||
@ -1657,8 +1654,6 @@ events.prototype.load = function (fromUserAction) {
|
|||||||
if (!core.isPlaying()) {
|
if (!core.isPlaying()) {
|
||||||
core.dom.startPanel.style.display = 'none';
|
core.dom.startPanel.style.display = 'none';
|
||||||
core.clearStatus();
|
core.clearStatus();
|
||||||
core.clearMap('all');
|
|
||||||
core.deleteAllCanvas();
|
|
||||||
core.status.event = {'id': 'load', 'data': null};
|
core.status.event = {'id': 'load', 'data': null};
|
||||||
core.status.lockControl = true;
|
core.status.lockControl = true;
|
||||||
core.ui.drawSLPanel(10*page+offset);
|
core.ui.drawSLPanel(10*page+offset);
|
||||||
|
|||||||
@ -6,6 +6,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
|||||||
// hero:勇士信息;hard:难度;floorId:当前楼层ID;maps:地图信息;values:全局数值信息
|
// hero:勇士信息;hard:难度;floorId:当前楼层ID;maps:地图信息;values:全局数值信息
|
||||||
|
|
||||||
// 清除游戏数据
|
// 清除游戏数据
|
||||||
|
// 这一步会清空状态栏和全部画布内容,并删除所有动态创建的画布
|
||||||
core.clearStatus();
|
core.clearStatus();
|
||||||
// 初始化status
|
// 初始化status
|
||||||
core.status = core.clone(core.initStatus);
|
core.status = core.clone(core.initStatus);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user