|
@@ -5,6 +5,7 @@ import { SelectMapPanel } from './SelectMapPanel';
|
|
|
import { LevelContainer } from './LevelContainer';
|
|
|
import { defaultSkin, Difficulty, Skin, SuperFind} from '../../script/Manager/LocalDataMgr';
|
|
|
import EventMgr from '../../script/Manager/EventMgr';
|
|
|
+import { AddCountPanel } from './AddCountPanel';
|
|
|
const { ccclass, property } = _decorator;
|
|
|
|
|
|
@ccclass('SuperFindPanel')
|
|
@@ -19,6 +20,12 @@ export class SuperFindPanel extends Component {
|
|
|
selMapPanel: SelectMapPanel = null
|
|
|
@property(LevelContainer)
|
|
|
lvlContainer: LevelContainer = null
|
|
|
+ @property(AddCountPanel)
|
|
|
+ addCountPanel:AddCountPanel = null
|
|
|
+ @property(Node)
|
|
|
+ win:Node = null
|
|
|
+ @property(Node)
|
|
|
+ lose:Node = null
|
|
|
|
|
|
@property(Node)
|
|
|
editBtns:Node = null
|
|
@@ -44,6 +51,8 @@ export class SuperFindPanel extends Component {
|
|
|
protected start(): void {
|
|
|
this.init()
|
|
|
EventMgr.ins.addEventListener("refreshLevelInfo",this.refreshInfo,this)
|
|
|
+ EventMgr.ins.addEventListener("restart",this.restartCountDown,this)
|
|
|
+ EventMgr.ins.addEventListener("win",this.OpenWin,this)
|
|
|
this.restartCountDown()
|
|
|
if(sys.platform == sys.Platform.BYTEDANCE_MINI_GAME)
|
|
|
{
|
|
@@ -83,6 +92,30 @@ export class SuperFindPanel extends Component {
|
|
|
this.lvlContainer.swtichEditMode(true)
|
|
|
this.noEditBtns.active = false
|
|
|
}
|
|
|
+ OpenAddCountPanel()
|
|
|
+ {
|
|
|
+ this.addCountPanel.node.active = true
|
|
|
+ }
|
|
|
+ OpenWin()
|
|
|
+ {
|
|
|
+ this.win.active = true
|
|
|
+ }
|
|
|
+ OpenLose()
|
|
|
+ {
|
|
|
+ this.lose.active = true
|
|
|
+ }
|
|
|
+ CloseWin()
|
|
|
+ {
|
|
|
+ this.win.active = false
|
|
|
+ }
|
|
|
+ CloseLose()
|
|
|
+ {
|
|
|
+ this.lose.active = false
|
|
|
+ }
|
|
|
+ CloseAddCountPanel()
|
|
|
+ {
|
|
|
+ this.addCountPanel.node.active = false
|
|
|
+ }
|
|
|
CloseEditBtns()
|
|
|
{
|
|
|
this.editBtns.active = false
|
|
@@ -144,6 +177,7 @@ export class SuperFindPanel extends Component {
|
|
|
if (this._gameTime <= 0) {
|
|
|
this.unschedule(this.countDown)
|
|
|
this.countDownLabel.string = "0秒"
|
|
|
+ this.OpenLose()
|
|
|
return
|
|
|
}
|
|
|
this.countDownLabel.string = this._gameTime.toString() + "秒"
|