咸鱼的反击
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.
 
 
 
xianyudefanji/assets/Scripts/game_xmj/LevelBase_xmj.ts

51 lines
1.3 KiB

import { ryw_Event } from "../../FrameWork/Event/EventEnum";
import EventMgr from "../../FrameWork/Event/EventMgr";
import GameReport from "../../FrameWork/Report/ZyZyReport";
const { ccclass, property } = cc._decorator;
export enum FreshGuideStep{
Step1,
Step2,
Step3,
Finish
}
@ccclass
export default class LevelBase_xmj extends cc.Component {
start() {
// Common5.playMusic("GameRes/sound/游戏背景音")
}
protected update(dt: number): void {
}
startDaDianTime:number = 0//打点开始时间
curGameName:string = "洗麻将"
GameScene:string = "洗麻将"
protected onLoad () {
console.log(' 游戏初始化时间')
this.startDaDianTime = new Date().getTime();
}
protected onDestroy(): void {
let endDaDianTime = new Date().getTime();
let time_ = endDaDianTime - this.startDaDianTime
let times = Math.floor( time_/1000)
if(times > 0){
//Common5.ReportDYTime("inLevel", this.curGameName, times);
GameReport.StayTimeReport(times, this.curGameName)
}
this.startDaDianTime = 0
EventMgr.emitEvent_custom(ryw_Event.ExitCurLayerEvent,{curGameName:this.curGameName})
console.log(this.curGameName,"游戏离开++++++====")
}
}