You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
896 B
39 lines
896 B
1 week ago
|
const { ccclass, property } = cc._decorator;
|
||
|
|
||
|
enum LevelType{
|
||
|
Level_1,
|
||
|
Level_2
|
||
|
}
|
||
|
@ccclass
|
||
|
export default class CNXX_selectLevel extends cc.Component {
|
||
|
@property(cc.Node)
|
||
|
guideNode:cc.Node = null
|
||
|
|
||
|
curSelectLevel = LevelType.Level_1
|
||
|
start() {
|
||
|
|
||
|
}
|
||
|
|
||
|
onBtnClose(){
|
||
|
|
||
|
this.node.removeFromParent()
|
||
|
this.node.destroy()
|
||
|
}
|
||
|
onBtnLevel_1(){
|
||
|
this.guideNode.active = true
|
||
|
this.curSelectLevel = LevelType.Level_1
|
||
|
}
|
||
|
onBtnLevel_2(){
|
||
|
this.guideNode.active = true
|
||
|
this.curSelectLevel = LevelType.Level_2
|
||
|
}
|
||
|
onBtnSureClick(){
|
||
|
// if(this.curSelectLevel == LevelType.Level_1){
|
||
|
// PrefabManage.loadPrefabByType(GameType.CNXX_firstLevel)
|
||
|
// }else{
|
||
|
// PrefabManage.loadPrefabByType(GameType.CNXX_secondLevel)
|
||
|
// }
|
||
|
this.onBtnClose()
|
||
|
}
|
||
|
}
|