Merge branch 'template' into noAnimate

This commit is contained in:
bdf1 2023-03-16 02:47:00 +13:00
commit ce30b15d74
4 changed files with 130 additions and 123 deletions

View File

@ -17,11 +17,12 @@
<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>
<img id='startImageLogo' />
</div>
<div id='startImageBackgroundDiv'>
<div id='startImageDiv'></div>
<img id='startImageLogo' />
</div>
<script>
(function () {
var startImageBackgroundDiv = document.getElementById('startImageBackgroundDiv');
@ -144,62 +145,62 @@
<span class='statusLabel' id='curse' style="color: #C2F4E7;"></span>
</div>
<!-- 状态栏canvas化 -->
<canvas id="statusCanvas" style="position: absolute; left: 0; top: 0;"></canvas>
<canvas id="caidan1" style="position: absolute; left: 0; top: 0;"></canvas>
<!-- 状态栏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">
<img class="tools" id='img-book'>
<img class="tools" id='img-fly'>
<img class="tools" id='img-toolbox'>
<img class="tools" id='img-keyboard'>
<img class="tools" id='img-shop'>
<img class="tools" id='img-save'>
<img class="tools" id='img-load'>
<img class="tools" id='img-settings'>
<img class="tools" id='img-btn1' style='display:none'>
<img class="tools" id='img-btn2' style='display:none'>
<img class="tools" id='img-btn3' style='display:none'>
<img class="tools" id='img-btn4' style='display:none'>
<img class="tools" id='img-btn5' style='display:none'>
<img class="tools" id='img-btn6' style='display:none'>
<img class="tools" id='img-btn7' style='display:none'>
<img class="tools" id='img-btn8' style='display:none'>
<p class="statusLabel tools" id="hard"></p>
</div>
<div id="gameDraw">
<div id="gif"></div>
<div id="gif2"></div>
<canvas class='gameCanvas anti-aliasing' id='bg'></canvas>
<canvas class='gameCanvas anti-aliasing' id='event'></canvas>
<canvas class='gameCanvas anti-aliasing' id='hero'></canvas>
<canvas class='gameCanvas anti-aliasing' id='event2'></canvas>
<canvas class='gameCanvas anti-aliasing' id='fg'></canvas>
<canvas class='gameCanvas' id='caidan'></canvas>
<canvas class='gameCanvas' id='damage'></canvas>
<canvas class='gameCanvas' id='animate'></canvas>
<canvas class='gameCanvas' id='curtain'></canvas>
<canvas class='gameCanvas' id='ui'></canvas>
<canvas class='gameCanvas' id='data'>此浏览器不支持HTML5</canvas>
<div id="next"></div>
</div>
</div>
<div id="toolBar" class="clearfix">
<img class="tools" id='img-book'>
<img class="tools" id='img-fly'>
<img class="tools" id='img-toolbox'>
<img class="tools" id='img-keyboard'>
<img class="tools" id='img-shop'>
<img class="tools" id='img-save'>
<img class="tools" id='img-load'>
<img class="tools" id='img-settings'>
<img class="tools" id='img-btn1' style='display:none'>
<img class="tools" id='img-btn2' style='display:none'>
<img class="tools" id='img-btn3' style='display:none'>
<img class="tools" id='img-btn4' style='display:none'>
<img class="tools" id='img-btn5' style='display:none'>
<img class="tools" id='img-btn6' style='display:none'>
<img class="tools" id='img-btn7' style='display:none'>
<img class="tools" id='img-btn8' style='display:none'>
<p class="statusLabel tools" id="hard"></p>
<div id='inputDiv'>
<div id='inputDialog'>
<p id="inputMessage">请输入文字...</p>
<input id='inputBox' type="text" autocomplete="off" />
<button id='inputYes'>确定</button>
<button id='inputNo'>取消</button>
</div>
</div>
<div id="gameDraw">
<div id="gif"></div>
<div id="gif2"></div>
<canvas class='gameCanvas anti-aliasing' id='bg'></canvas>
<canvas class='gameCanvas anti-aliasing' id='event'></canvas>
<canvas class='gameCanvas anti-aliasing' id='hero'></canvas>
<canvas class='gameCanvas anti-aliasing' id='event2'></canvas>
<canvas class='gameCanvas anti-aliasing' id='fg'></canvas>
<canvas class='gameCanvas' id='caidan'></canvas>
<canvas class='gameCanvas' id='damage'></canvas>
<canvas class='gameCanvas' id='animate'></canvas>
<canvas class='gameCanvas' id='curtain'></canvas>
<canvas class='gameCanvas' id='ui'></canvas>
<canvas class='gameCanvas' id='data'>此浏览器不支持HTML5</canvas>
<div id="next"></div>
</div>
</div>
<div id='inputDiv'>
<div id='inputDialog'>
<p id="inputMessage">请输入文字...</p>
<input id='inputBox' type="text" autocomplete="off"/>
<button id='inputYes'>确定</button>
<button id='inputNo'>取消</button>
</div>
</div>
<div id="ui-editor"></div>
<!-- injection -->
<script src='libs/thirdparty/lz-string.min.js'></script>
<script src='libs/thirdparty/priority-queue.min.js'></script>
<script src='libs/thirdparty/localforage.min.js'></script>
<script src='libs/thirdparty/zip.min.js'></script>
<script id='mainScript' src='main.js'></script>
<script>main.init('play');main.listen();</script>
<div id="ui-editor"></div>
<!-- injection -->
<script src='libs/thirdparty/lz-string.min.js'></script>
<script src='libs/thirdparty/priority-queue.min.js'></script>
<script src='libs/thirdparty/localforage.min.js'></script>
<script src='libs/thirdparty/zip.min.js'></script>
<script id='mainScript' src='main.js'></script>
<script>main.init('play'); main.listen();</script>
</body>

View File

@ -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
View File

@ -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 = [

View File

@ -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']);