Commit c3b6da04 authored by wjf's avatar wjf

Merge branch 'master' of gitlab2.dui88.com:MrKwon/game2048

parents e531565a 6ea1fee9
...@@ -2,7 +2,7 @@ import { PropPanel } from './../../panels/PropPanel'; ...@@ -2,7 +2,7 @@ import { PropPanel } from './../../panels/PropPanel';
import { QuitPanel } from './../../panels/QuitPanel'; import { QuitPanel } from './../../panels/QuitPanel';
import { PropOutPanel } from './../../panels/PropOutPanel'; import { PropOutPanel } from './../../panels/PropOutPanel';
import { showWaiting, hideWaiting } from './../../../module/ctrls/waitingCtrl'; import { showWaiting, hideWaiting } from './../../../module/ctrls/waitingCtrl';
import { PropType } from './../../commonNet'; import { PropType, submit } from './../../commonNet';
import { UnlockPanel } from './../../panels/UnlockPanel'; import { UnlockPanel } from './../../panels/UnlockPanel';
import { playSound } from './../../../module/ctrls/soundCtrl'; import { playSound } from './../../../module/ctrls/soundCtrl';
import { FrameAni } from './../../../engine/2d/ui/FrameAni'; import { FrameAni } from './../../../engine/2d/ui/FrameAni';
...@@ -43,9 +43,14 @@ export class PlayScene extends Scene { ...@@ -43,9 +43,14 @@ export class PlayScene extends Scene {
containerPool = [] containerPool = []
_score = 0 _score = 0
_maxScore = 0
set score(value) { set score(value) {
this._score = value this._score = value
if (value - this._maxScore > 5000) {
this._maxScore = value
submit(() => { }, this.score, this.unlockGrade, false, true)
}
this.dispatchEvent("updateScoreTxt") this.dispatchEvent("updateScoreTxt")
} }
...@@ -196,6 +201,7 @@ export class PlayScene extends Scene { ...@@ -196,6 +201,7 @@ export class PlayScene extends Scene {
this.updateProp(this.gameData.bombCount, this.gameData.exchangeCount, this.gameData.netCount) this.updateProp(this.gameData.bombCount, this.gameData.exchangeCount, this.gameData.netCount)
this.unlockGrade = this.gameData.unlockGrade ? this.gameData.unlockGrade : 2 this.unlockGrade = this.gameData.unlockGrade ? this.gameData.unlockGrade : 2
this._maxScore = this.gameData.maxScore ? this.gameData.maxScore : 0
} }
...@@ -981,6 +987,9 @@ export class PlayScene extends Scene { ...@@ -981,6 +987,9 @@ export class PlayScene extends Scene {
if (num > this.unlockGrade) { if (num > this.unlockGrade) {
// 显示解锁弹窗 // 显示解锁弹窗
submit(() => {
}, this.score, this.unlockGrade, false, true)
showPanel(UnlockPanel, { grade: num }) showPanel(UnlockPanel, { grade: num })
this.unlockGrade = num this.unlockGrade = num
} }
......
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