Merge branch 'template' into noAnimate
This commit is contained in:
commit
ce30b15d74
@ -17,6 +17,7 @@
|
||||
<meta name="x5-page-mode" content="app">
|
||||
<link type='text/css' href='styles.css' rel='stylesheet'>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id='startImageBackgroundDiv'>
|
||||
<div id='startImageDiv'></div>
|
||||
@ -145,7 +146,7 @@
|
||||
</div>
|
||||
|
||||
<!-- 状态栏canvas化 -->
|
||||
<canvas id="statusCanvas" style="position: absolute; left: 0; top: 0;"></canvas>
|
||||
<canvas id="statusCanvas" style="position: absolute; left: 0; top: 0; z-index: 50;"></canvas>
|
||||
<canvas id="caidan1" style="position: absolute; left: 0; top: 0;"></canvas>
|
||||
</div>
|
||||
<div id="toolBar" class="clearfix">
|
||||
|
@ -18,7 +18,7 @@ function core () {
|
||||
this._HALF_WIDTH_ = Math.floor(this._WIDTH_ / 2);
|
||||
this._HALF_HEIGHT_ = Math.floor(this._HEIGHT_ / 2);
|
||||
|
||||
this.__SIZE__ = main.mode == 'editor' ? 15 : this._HEIGHT_;
|
||||
this.__SIZE__ = main.mode == 'editor' ? 13 : this._HEIGHT_;
|
||||
this.__PIXELS__ = this.__SIZE__ * 32;
|
||||
this.__HALF_SIZE__ = Math.floor(this.__SIZE__ / 2);
|
||||
this.material = {
|
||||
|
130
main.js
130
main.js
@ -20,68 +20,74 @@ function main() {
|
||||
//------------------------ 用户修改内容 END ------------------------//
|
||||
|
||||
this.dom = {
|
||||
'body': document.body,
|
||||
'gameGroup': document.getElementById('gameGroup'),
|
||||
'mainTips': document.getElementById('mainTips'),
|
||||
'musicBtn': document.getElementById('musicBtn'),
|
||||
'enlargeBtn': document.createElement('img'),
|
||||
'startPanel': document.getElementById('startPanel'),
|
||||
'startTop': document.getElementById('startTop'),
|
||||
'startTopProgressBar': document.getElementById('startTopProgressBar'),
|
||||
'startTopProgress': document.getElementById('startTopProgress'),
|
||||
'startTopLoadTips': document.getElementById('startTopLoadTips'),
|
||||
'startBackground': document.getElementById('startBackground'),
|
||||
'startLogo': document.getElementById('startLogo'),
|
||||
'startButtonGroup': document.getElementById('startButtonGroup'),
|
||||
'floorMsgGroup': document.getElementById('floorMsgGroup'),
|
||||
'logoLabel': document.getElementById('logoLabel'),
|
||||
'versionLabel': document.getElementById('versionLabel'),
|
||||
'floorNameLabel': document.getElementById('floorNameLabel'),
|
||||
'statusBar': document.getElementById('statusBar'),
|
||||
'status': document.getElementsByClassName('status'),
|
||||
'toolBar': document.getElementById('toolBar'),
|
||||
'tools': document.getElementsByClassName('tools'),
|
||||
'gameCanvas': document.getElementsByClassName('gameCanvas'),
|
||||
'gif': document.getElementById('gif'),
|
||||
'gif2': document.getElementById('gif2'),
|
||||
'gameDraw': document.getElementById('gameDraw'),
|
||||
'startButtons': document.getElementById('startButtons'),
|
||||
'playGame': document.getElementById('playGame'),
|
||||
'loadGame': document.getElementById('loadGame'),
|
||||
'replayGame': document.getElementById('replayGame'),
|
||||
'levelChooseButtons': document.getElementById('levelChooseButtons'),
|
||||
'data': document.getElementById('data'),
|
||||
'statusLabels': document.getElementsByClassName('statusLabel'),
|
||||
'statusTexts': document.getElementsByClassName('statusText'),
|
||||
'floorCol': document.getElementById('floorCol'),
|
||||
'nameCol': document.getElementById('nameCol'),
|
||||
'lvCol': document.getElementById('lvCol'),
|
||||
'hpmaxCol': document.getElementById('hpmaxCol'),
|
||||
'hpCol': document.getElementById('hpCol'),
|
||||
'manaCol': document.getElementById('manaCol'),
|
||||
'atkCol': document.getElementById('atkCol'),
|
||||
'defCol': document.getElementById('defCol'),
|
||||
'mdefCol': document.getElementById('mdefCol'),
|
||||
'moneyCol': document.getElementById('moneyCol'),
|
||||
'expCol': document.getElementById('expCol'),
|
||||
'upCol': document.getElementById('upCol'),
|
||||
'keyCol': document.getElementById('keyCol'),
|
||||
'pzfCol': document.getElementById('pzfCol'),
|
||||
'debuffCol': document.getElementById('debuffCol'),
|
||||
'skillCol': document.getElementById('skillCol'),
|
||||
'hard': document.getElementById('hard'),
|
||||
'statusCanvas': document.getElementById('statusCanvas'),
|
||||
'statusCanvasCtx': document.getElementById('statusCanvas').getContext('2d'),
|
||||
'caidan1': document.getElementById('caidan1'),
|
||||
'caidan1Ctx': document.getElementById('caidan1').getContext('2d'),
|
||||
'whole': document.getElementById('whole'),
|
||||
'wholeCtx': document.getElementById('whole').getContext('2d'),
|
||||
'inputDiv': document.getElementById('inputDiv'),
|
||||
'inputMessage': document.getElementById('inputMessage'),
|
||||
'inputBox': document.getElementById('inputBox'),
|
||||
'inputYes': document.getElementById('inputYes'),
|
||||
'inputNo': document.getElementById('inputNo'),
|
||||
'next': document.getElementById('next')
|
||||
body: document.body,
|
||||
gameGroup: document.getElementById('gameGroup'),
|
||||
mainTips: document.getElementById('mainTips'),
|
||||
musicBtn: document.getElementById('musicBtn'),
|
||||
enlargeBtn: document.createElement('img'),
|
||||
startPanel: document.getElementById('startPanel'),
|
||||
startTop: document.getElementById('startTop'),
|
||||
startTopProgressBar: document.getElementById('startTopProgressBar'),
|
||||
startTopProgress: document.getElementById('startTopProgress'),
|
||||
startTopLoadTips: document.getElementById('startTopLoadTips'),
|
||||
startBackground: document.getElementById('startBackground'),
|
||||
startLogo: document.getElementById('startLogo'),
|
||||
startButtonGroup: document.getElementById('startButtonGroup'),
|
||||
floorMsgGroup: document.getElementById('floorMsgGroup'),
|
||||
logoLabel: document.getElementById('logoLabel'),
|
||||
versionLabel: document.getElementById('versionLabel'),
|
||||
floorNameLabel: document.getElementById('floorNameLabel'),
|
||||
statusBar: document.getElementById('statusBar'),
|
||||
status: document.getElementsByClassName('status'),
|
||||
toolBar: document.getElementById('toolBar'),
|
||||
tools: document.getElementsByClassName('tools'),
|
||||
gameCanvas: document.getElementsByClassName('gameCanvas'),
|
||||
gif: document.getElementById('gif'),
|
||||
gif2: document.getElementById('gif2'),
|
||||
gameDraw: document.getElementById('gameDraw'),
|
||||
startButtons: document.getElementById('startButtons'),
|
||||
playGame: document.getElementById('playGame'),
|
||||
loadGame: document.getElementById('loadGame'),
|
||||
replayGame: document.getElementById('replayGame'),
|
||||
levelChooseButtons: document.getElementById('levelChooseButtons'),
|
||||
data: document.getElementById('data'),
|
||||
statusLabels: document.getElementsByClassName('statusLabel'),
|
||||
statusTexts: document.getElementsByClassName('statusText'),
|
||||
floorCol: document.getElementById('floorCol'),
|
||||
nameCol: document.getElementById('nameCol'),
|
||||
lvCol: document.getElementById('lvCol'),
|
||||
hpmaxCol: document.getElementById('hpmaxCol'),
|
||||
hpCol: document.getElementById('hpCol'),
|
||||
manaCol: document.getElementById('manaCol'),
|
||||
atkCol: document.getElementById('atkCol'),
|
||||
defCol: document.getElementById('defCol'),
|
||||
mdefCol: document.getElementById('mdefCol'),
|
||||
moneyCol: document.getElementById('moneyCol'),
|
||||
expCol: document.getElementById('expCol'),
|
||||
upCol: document.getElementById('upCol'),
|
||||
keyCol: document.getElementById('keyCol'),
|
||||
pzfCol: document.getElementById('pzfCol'),
|
||||
debuffCol: document.getElementById('debuffCol'),
|
||||
skillCol: document.getElementById('skillCol'),
|
||||
hard: document.getElementById('hard'),
|
||||
statusCanvas: document.getElementById('statusCanvas'),
|
||||
statusCanvasCtx: document
|
||||
.getElementById('statusCanvas')
|
||||
.getContext('2d'),
|
||||
caidan1: document.getElementById('caidan1'),
|
||||
caidan1Ctx: document
|
||||
.getElementById('caidan1')
|
||||
.getContext('2d'),
|
||||
whole: document.getElementById('whole'),
|
||||
wholeCtx: document
|
||||
.getElementById('whole')
|
||||
.getContext('2d'),
|
||||
inputDiv: document.getElementById('inputDiv'),
|
||||
inputMessage: document.getElementById('inputMessage'),
|
||||
inputBox: document.getElementById('inputBox'),
|
||||
inputYes: document.getElementById('inputYes'),
|
||||
inputNo: document.getElementById('inputNo'),
|
||||
next: document.getElementById('next')
|
||||
};
|
||||
this.mode = 'play';
|
||||
this.loadList = [
|
||||
|
@ -1694,7 +1694,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
fill(core.formatBigNumber(core.status.hero.money), 304, 58);
|
||||
core.drawImage(ctx, core.statusBar.icons.exp, 6, 70, 25, 25);
|
||||
fill(core.formatBigNumber(core.status.hero.exp), 42, 90);
|
||||
} else if (!core.flags.extendToolbar) { // 横屏且未隐藏状态栏
|
||||
} else if (!core.flags.hideLeftStatusBar) { // 横屏且未隐藏状态栏
|
||||
core.drawImage(ctx, core.material.images.images[flags.hard == 4 ? 'status.png' : 'status2.png'], 0, 63);
|
||||
core.drawImage(ctx, core.statusBar.icons.floor, 124, 24, 32, 32);
|
||||
ctx.textAlign = 'left';
|
||||
@ -1755,7 +1755,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
}
|
||||
else core.dom.statusCanvas.style.zIndex=50;
|
||||
}
|
||||
} else if (core.flags.extendToolbar && !core.domStyle.isVertical) { // 横屏且隐藏状态栏
|
||||
} else if (core.flags.hideLeftStatusBar && !core.domStyle.isVertical) { // 横屏且隐藏状态栏
|
||||
if (!core.dymCanvas['status'])
|
||||
core.ui.createCanvas('status', 0, 0, core._PX_, core._PY_, 66); // 刚好盖过显伤层
|
||||
core.ui.clearMap(ctx = core.dymCanvas['status']);
|
||||
|
Loading…
Reference in New Issue
Block a user