initPlugins & musicBtn & clearStatus

This commit is contained in:
oc 2019-04-03 22:33:30 +08:00
parent e280308da5
commit b91e40c037
4 changed files with 4 additions and 9 deletions

View File

@ -323,8 +323,6 @@ control.prototype._showStartAnimate_resetDom = function () {
core.dom.levelChooseButtons.style.display = 'none';
core.status.played = false;
core.clearStatus();
core.clearMap('all');
core.deleteAllCanvas();
core.dom.musicBtn.style.display = 'block';
core.setMusicBtn();
// 重置音量
@ -362,6 +360,7 @@ control.prototype.clearStatus = function() {
}
core.status = {};
core.clearStatusBar();
core.clearMap('all');
core.deleteAllCanvas();
core.status.played = false;
}
@ -2524,7 +2523,7 @@ control.prototype._resize_gameGroup = function (obj) {
floorMsgGroup.style.color = obj.globalAttribute.floorChangingTextColor;
// musicBtn
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 {
core.dom.musicBtn.style.right = (obj.clientWidth - totalWidth) / 2 + "px";

View File

@ -219,6 +219,7 @@ core.prototype.init = function (coreData, callback) {
this._init_flags();
this._init_platform();
this._init_others();
this._initPlugins();
core.loader._load(function () {
core._afterLoadResources(callback);
@ -343,7 +344,6 @@ core.prototype._afterLoadResources = function (callback) {
// 初始化地图
core.initStatus.maps = core.maps._initMaps();
core.control._setRequestAnimationFrame();
core._initPlugins();
core.showStartAnimate();
if (callback) callback();
}

View File

@ -52,9 +52,6 @@ events.prototype._startGame_start = function (hard, seed, route, callback) {
}
else core.utils.__init_seed();
this.setInitData();
core.clearMap('all');
core.deleteAllCanvas();
core.clearStatusBar();
var todo = [];
@ -1657,8 +1654,6 @@ events.prototype.load = function (fromUserAction) {
if (!core.isPlaying()) {
core.dom.startPanel.style.display = 'none';
core.clearStatus();
core.clearMap('all');
core.deleteAllCanvas();
core.status.event = {'id': 'load', 'data': null};
core.status.lockControl = true;
core.ui.drawSLPanel(10*page+offset);

View File

@ -6,6 +6,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
// hero勇士信息hard难度floorId当前楼层IDmaps地图信息values全局数值信息
// 清除游戏数据
// 这一步会清空状态栏和全部画布内容,并删除所有动态创建的画布
core.clearStatus();
// 初始化status
core.status = core.clone(core.initStatus);