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.
54 lines
1.4 KiB
54 lines
1.4 KiB
import Common5 from "../../Platform/th/Common5";
|
|
import TTAPI from "../../Platform/tt/TTAPI";
|
|
import PrefabManage, { GameType } from "../PrefabManager/PrefabManage";
|
|
|
|
const { ccclass, property } = cc._decorator;
|
|
|
|
@ccclass
|
|
export default class LeftBtnUI extends cc.Component {
|
|
|
|
// LIFE-CYCLE CALLBACKS:
|
|
|
|
// onLoad () {}
|
|
|
|
start() {
|
|
|
|
}
|
|
|
|
// update (dt) {}
|
|
|
|
onBtnClickSetting() {
|
|
// //Common5.playEffect("sound/按键点击");
|
|
PrefabManage.loadPrefabByType(GameType.Setting);
|
|
}
|
|
|
|
onBtnClickCebianlan() {
|
|
// //Common5.playEffect("sound/按键点击");
|
|
PrefabManage.loadPrefabByType(GameType.CeBianLan);
|
|
}
|
|
|
|
onBtnClickAddDesktop() {
|
|
TTAPI.addToZM(() => {
|
|
console.log("添加桌面成功!");
|
|
});
|
|
}
|
|
|
|
onBtnClickFeedback() {
|
|
// //Common5.playEffect("sound/按键点击");
|
|
// PrefabManage.loadPrefabByType(GameType.Feedback);
|
|
}
|
|
|
|
onBtnClickClose() {
|
|
// //Common5.playEffect("sound/按键点击");
|
|
// PrefabManage.loadPrefabByType(GameType.Feedback);
|
|
// this.node.removeFromParent()
|
|
// this.node.destroy()
|
|
this.node.parent.removeAllChildren()
|
|
PrefabManage.loadPrefabByType(GameType.MainHall)
|
|
// for (let i = this.node.parent.children.length - 1; i >= 0; i++) {
|
|
// this.node.parent.children[i].removeFromParent()
|
|
// this.node.parent.children[i].destroy()
|
|
// }
|
|
}
|
|
|
|
}
|
|
|