Commit 66b5250b authored by Friends233's avatar Friends233

游戏结束

parent 2f9e4436
This diff is collapsed.
......@@ -30,6 +30,8 @@ export default class GameScene extends cc.Component {
/** 所有能拖动的块管理器 */
allBlcokManagerNode: cc.Node[] = []
isGameOver = false
protected onLoad(): void {
/** 开启碰撞检测 */
......@@ -122,7 +124,8 @@ export default class GameScene extends cc.Component {
start: 'startGuide',
init: 'testInit',
clear: 'setDefaultBlock',
radom: 'testRadom'
radom: 'testRadom',
submit:'gameOver'
}
testNode.children.forEach((n) => {
const event = this?.[testEventMap[n.name]]
......@@ -176,6 +179,7 @@ export default class GameScene extends cc.Component {
}
this.score = 0
this.setBlockNum = 0
this.isGameOver = false
this.setLable('score', 0)
this.setLable('bestScore', '历史最高分:' + (con.bestScore || 0))
this.setLable('goldCoin', (con.goldCoin || 0) + '')
......@@ -211,7 +215,9 @@ export default class GameScene extends cc.Component {
if (this.setBlockNum >= 3) {
this.refreshStageProps()
}
this.isCheckGameOver()
this.scheduleOnce(() => {
this.isCheckGameOver()
},0.8)
if (this.isGuide) {
this.setBlockNum--
this.isGuide = false
......
This diff is collapsed.
......@@ -40,7 +40,7 @@
<!-- <script src="//yun.duiba.com.cn/db_games/libs0924/svgaParser.minWeb.js" crossorigin="anonymous"></script>-->
<link rel="stylesheet" type="text/css" href="https://yun.duiba.com.cn/db_games/ccc_game/template/1685065827889/style-mobile.css"/>
<link rel="stylesheet" type="text/css" href="https://yun.duiba.com.cn/db_games/ccc_game/template/1685076323006/style-mobile.css"/>
<style>
......@@ -90,9 +90,9 @@
</div>
</div>
<script src="https://yun.duiba.com.cn/db_games/ccc_game/template/1685065827889/src/settings.js" charset="utf-8"></script>
<script src="https://yun.duiba.com.cn/db_games/ccc_game/template/1685076323006/src/settings.js" charset="utf-8"></script>
<script src="https://yun.duiba.com.cn/db_games/ccc_game/template/1685065827889/main.js" charset="utf-8"></script>
<script src="https://yun.duiba.com.cn/db_games/ccc_game/template/1685076323006/main.js" charset="utf-8"></script>
<script type="text/javascript">
(function () {
......
window.__remoteUrl__ = "https://yun.duiba.com.cn/db_games/ccc_game/template/1685065827889/";
window.__remoteUrl__ = "https://yun.duiba.com.cn/db_games/ccc_game/template/1685076323006/";
window.__remoteAssets__ = window.__remoteUrl__ + "assets/";
window.__version__ = 1685065827889;
window.__version__ = 1685076323006;
window.__ENV__ = "prod";
window.boot = function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment