startAnimate
This commit is contained in:
parent
54b8e7e60d
commit
a87bd09c13
@ -1566,7 +1566,7 @@ actions.prototype.clickSL = function(x,y) {
|
||||
if (x>=10 && x<=12 && y==12) {
|
||||
core.ui.closePanel();
|
||||
if (!core.isPlaying()) {
|
||||
core.showStartAnimate();
|
||||
core.showStartAnimate(true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -1678,7 +1678,7 @@ actions.prototype.keyUpSL = function (keycode) {
|
||||
if (keycode==27 || keycode==88 || (core.status.event.id == 'save' && keycode==83) || (core.status.event.id == 'load' && keycode==68)) {
|
||||
core.ui.closePanel();
|
||||
if (!core.isPlaying()) {
|
||||
core.showStartAnimate();
|
||||
core.showStartAnimate(true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@ -201,7 +201,7 @@ control.prototype.setRequestAnimationFrame = function () {
|
||||
}
|
||||
|
||||
////// 显示游戏开始界面 //////
|
||||
control.prototype.showStartAnimate = function (callback) {
|
||||
control.prototype.showStartAnimate = function (noAnimate, callback) {
|
||||
core.dom.startPanel.style.opacity=1;
|
||||
core.dom.startPanel.style.display="block";
|
||||
core.dom.startTop.style.opacity=1;
|
||||
@ -213,6 +213,13 @@ control.prototype.showStartAnimate = function (callback) {
|
||||
core.clearStatus();
|
||||
core.clearMap('all');
|
||||
|
||||
if(noAnimate) {
|
||||
core.dom.startTop.style.display = 'none';
|
||||
// core.playGame();
|
||||
core.dom.startButtonGroup.style.display = 'block';
|
||||
if (core.isset(callback)) callback();
|
||||
}
|
||||
else {
|
||||
var opacityVal = 1;
|
||||
var startAnimate = window.setInterval(function () {
|
||||
opacityVal -= 0.03;
|
||||
@ -227,6 +234,8 @@ control.prototype.showStartAnimate = function (callback) {
|
||||
}, 20);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
////// 隐藏游戏开始界面 //////
|
||||
control.prototype.hideStartAnimate = function (callback) {
|
||||
var opacityVal = 1;
|
||||
@ -320,7 +329,7 @@ control.prototype.resetStatus = function(hero, hard, floorId, route, maps, value
|
||||
|
||||
////// 重新开始游戏;此函数将回到标题页面 //////
|
||||
control.prototype.restart = function() {
|
||||
this.showStartAnimate();
|
||||
this.showStartAnimate(true);
|
||||
if (core.bgms.length>0)
|
||||
core.playBgm(core.bgms[0]);
|
||||
}
|
||||
|
||||
@ -331,8 +331,8 @@ core.prototype.setRequestAnimationFrame = function () {
|
||||
}
|
||||
|
||||
////// 显示游戏开始界面 //////
|
||||
core.prototype.showStartAnimate = function (callback) {
|
||||
core.control.showStartAnimate(callback);
|
||||
core.prototype.showStartAnimate = function (noAnimate, callback) {
|
||||
core.control.showStartAnimate(noAnimate, callback);
|
||||
}
|
||||
|
||||
////// 隐藏游戏开始界面 //////
|
||||
|
||||
Loading…
Reference in New Issue
Block a user