觉醒时刻
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.

84 lines
3.1 KiB

1 week ago
import User from "../../../FrameWork/User/User";
import JuQingManager from "../../JuQingChat/JuQingManager";
import TaskManager, { MainTaskIdEnum } from "../../JuQingChat/TaskManager";
import BagManager from "../../Manager/BagManager";
import PrefabManage, { GameType } from "../../PrefabManager/PrefabManage";
import GetAward from "../../SCommon/GetAward";
import GameBase_CNXX from "./GameBase_CNXX";
import { GameSecondLevelManage } from "./GameDataManage2";
import Result_success2 from "./Result_success2";
const { ccclass, property } = cc._decorator;
@ccclass
export default class Game_secondLevel extends GameBase_CNXX {
@property(cc.Node)
nanDuTiShen: cc.Node = null;
// @property([cc.Node])
// mapPoints: cc.Node[] = [];
onLoad(): void {
var myDate = new Date();
this.recordStartSeconds = myDate.getTime();
GameSecondLevelManage.initStartData(User.getQieLevel())
}
start() {
super.start()
this.initDaoJu()
// this.initProgressTips()
// //临时测试代码&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
// let taskInfo: any = TaskManager.getCurUnLockMainTaskInfo();
// if (taskInfo.Id == MainTaskIdEnum.MainTask_1202) {
// TaskManager.finishCurMainTask(MainTaskIdEnum.MainTask_1202);
// TaskManager.setCurUnLockMainTaskInfo(MainTaskIdEnum.MainTask_1203);
// JuQingManager.unLockNewJuQing('WX_QL1201');
// }
// //临时测试代码&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
}
//难度提升
nanDuTiShenAni() {
console.log("难度提升")
cc.tween(this.nanDuTiShen)
.to(1, { x: 0 })
.delay(1.5)
.to(1, { x: -900 })
.start()
}
failResult() {
}
// showMap() {
// for (let i = 0; i < User.getQieLevel() - 1; i++) {
// this.mapPoints[i].getChildByName("灰色定位").active = false;
// }
// this.mapNode.active = true;
// }
// hideMap() {
// this.mapNode.active = false;
// }
successResult() {
var myDate = new Date();
console.log("时间===", myDate.getTime() - this.recordStartSeconds)
let times = Math.floor((myDate.getTime() - this.recordStartSeconds) / 1000)
//CommonDefine.setImRankData(times)//传入排名的数据
//CommonDefine.setUserSuccessTimes(times)//更新用户通过时间
let exitCallFunc = () => {
// UserManager.addPeopleIQ(100)
// let earnMoney = InterfaceManager.getAllIndustryMoneyInterface()
// let timeIndex = 20
// let money = earnMoney*timeIndex*60
// UserManager.addMoney(money)
//EventMgr.emitEvent_custom(ryw_Event.exitToLobby)
this.node.removeFromParent()
this.node.destroy()
}
PrefabManage.loadPrefabByType(GameType.CNXX_Success, null, (prefabNode) => {
prefabNode.getComponent(Result_success2).initView(2, exitCallFunc)
})
return
}
}