Commit b3c6d155 authored by XieChuanJin's avatar XieChuanJin

修复后台监听bug

parent 8cbab851
......@@ -18,8 +18,8 @@ export default class PhycicsSystem {
public static init() {
const ins = PhycicsSystem.instance;
// egret.MainContext.instance.stage.addEventListener(egret.Event.ENTER_FRAME, ins.onUpdate, ins);
egret.startTick(ins.onUpdate, ins);
egret.MainContext.instance.stage.addEventListener(egret.Event.ENTER_FRAME, ins.onUpdate, ins);
// egret.startTick(ins.onUpdate, ins);
}
private _enabled: boolean = false;
......
......@@ -11,8 +11,8 @@ export default class SpTimer {
}
public static init() {
// egret.MainContext.instance.stage.addEventListener(egret.Event.ENTER_FRAME, SpTimer.onUpdate, SpTimer);
egret.startTick(SpTimer.onUpdate, SpTimer);
egret.MainContext.instance.stage.addEventListener(egret.Event.ENTER_FRAME, SpTimer.onUpdate, SpTimer);
// egret.startTick(SpTimer.onUpdate, SpTimer);
}
private static onUpdate() {
......
......@@ -31,8 +31,8 @@ export function clearShareImg() {
export function getBallScore(bulletScore: number, powerScore: number, colorIndex: number): any {
let getScoreFromRange = ([a, b]) => {
a = Math.ceil(a * MConfigs.difficultyFactor);
b = Math.ceil(b * MConfigs.difficultyFactor);
a = Math.ceil(a * 0.15);
b = Math.ceil(b * 0.15);
let n = Math.abs(b - a) + 1;
n = Math.floor(n / 6);
const m = [];
......@@ -140,7 +140,7 @@ export function getAppLocation() {
export function login() {
}
export function getCookie(cookieName: string) {
......
......@@ -38,4 +38,7 @@ export function customClassPrototype() {
}
egret.MainContext.instance.stage.addEventListener(egret.Event.ENTER_FRAME, updateDeltaTime, null);
egret.lifecycle.onResume = () => {
curTime = egret.getTimer();
}
}
\ No newline at end of file
......@@ -154,8 +154,8 @@ export default class MTweenMgr {
private isTraversing = false;
public init() {
egret.startTick(this.update, this);
// egret.MainContext.instance.stage.addEventListener(egret.Event.ENTER_FRAME, this.update, this);
// egret.startTick(this.update, this);
egret.MainContext.instance.stage.addEventListener(egret.Event.ENTER_FRAME, this.update, this);
}
public removeTweens(target: object) {
......
......@@ -3,7 +3,7 @@
"message": "",
"code": "",
"data": {
"leftTimes": 0,
"leftTimes": 10,
"leftInviteCnt": 10,
"minEnableCaptchaScore": 5000,
"allPeriodEnd": false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment