觉醒时刻
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.
juexingshike/assets/Scripts/SCommon/daoyeBtnScript.ts

59 lines
2.1 KiB

1 week ago
// Learn TypeScript:
// - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
// Learn Attribute:
// - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
import User from "../../FrameWork/User/User";
import TaskManager, { MainTaskIdEnum } from "../JuQingChat/TaskManager";
import InterfaceManager from "../Manager/InterfaceManager";
import PrefabManage, { GameType } from "../PrefabManager/PrefabManage";
const {ccclass, property} = cc._decorator;
@ccclass
export default class daoyeBtnScript extends cc.Component {
// LIFE-CYCLE CALLBACKS:
// onLoad () {}
start () {
// let isHaveKaiye = InterfaceManager.getHaveKaiye(GameType.DongLaiChaoShi)
// if(isHaveKaiye){
// this.node.active = true
// }else{
// this.node.active = false
// }
}
clickBtnDaoye(){
PrefabManage.loadPrefabByType(GameType.GDaoYeShouGou)
// let daoYeList = InterfaceManager.getDaoyeList()
// // let daoyeJiaohuo = User.getDaoyeJiaoHuo()
// if(daoYeList.length == 0){
// // let mainTaskInfo:any = TaskManager.getCurUnLockMainTaskInfo()
// // let mainId = mainTaskInfo.Id
// // if(mainId == MainTaskIdEnum.MainTask_203 || MainTaskIdEnum.MainTask_204){
// // PrefabManage.loadPrefabByType(GameType.GDaoYeShouGou)
// // return
// // }
// PrefabManage.showTextTips('超市正常营业中,暂不需要进货')
// }else{
// let isHaveKaiye = InterfaceManager.getHaveKaiye(GameType.DongLaiChaoShi)
// if(isHaveKaiye){
// // PrefabManage.loadPrefabByType(GameType.DongLaiChaoShi)
// PrefabManage.showTextTips('请前往东来超市出售进货单物品')
// }else{
// PrefabManage.showTextTips('超市暂未开放')
// }
// }
}
// update (dt) {}
}