Commit 27528222 authored by spc's avatar spc

modified: project/src/canvas/game/src/scenes/LoadingScene.ts

parent 68527009
import { Scene } from "../../module/views/Scene";
import { RES } from "../../module/RES";
// import res from "../../test/output.json"
import resCanvasList from "../../../game/resCanvasList"
import { Ins } from "../Ins";
import { showPanel } from "../../module/ctrls";
import { SelectCatPanel } from "../panels/selectcatpanel/SelectCatPanel";
export class CsdScene extends Scene {
initUi() {
super.initUi();
var sceneBg = Ins.initSprite("b3c8c187-e5c9-4968-9a00-a118d18ab2fc");
this.addChild(sceneBg);
this.x = (Ins.stageW - 750)>>1;
this.y = (Ins.stageH - 1624)>>1;
showPanel(SelectCatPanel);
// this.addChild(new MainScene());
}
start() {
this.initUi()
}
}
...@@ -2,9 +2,10 @@ import { RES } from "../../module/RES"; ...@@ -2,9 +2,10 @@ import { RES } from "../../module/RES";
import { Scene } from "../../module/views/Scene"; import { Scene } from "../../module/views/Scene";
import { Ins } from "../Ins"; import { Ins } from "../Ins";
import resloadingList from "../../../game/resloadingList"; import resloadingList from "../../../game/resloadingList";
import { truncateSync } from "fs";
import { changeScene } from "../../module/ctrls"; import { changeScene } from "../../module/ctrls";
import { StartScene } from "./StartScene"; import { StartScene } from "./StartScene";
import { XxlScene } from "../xiaoxiaole/StartScene";
import { CsdScene } from "../chuansongdai/StartScene";
export class LoadingScene extends Scene{ export class LoadingScene extends Scene{
...@@ -74,14 +75,14 @@ export class LoadingScene extends Scene{ ...@@ -74,14 +75,14 @@ export class LoadingScene extends Scene{
FYGE.Tween.get(this.loading,{onChange:()=>{that.zhuazi.x = (that.loading.x+that.loading.width-30)},onChangeObj:that}).to({x:-80},200).call(()=>{ FYGE.Tween.get(this.loading,{onChange:()=>{that.zhuazi.x = (that.loading.x+that.loading.width-30)},onChangeObj:that}).to({x:-80},200).call(()=>{
that.tweenEnd = true; that.tweenEnd = true;
if(that.isEnd){ if(that.isEnd){
FYGE.Tween.get(that.loading,{onChange:()=>{that.zhuazi.x = (that.loading.x+that.loading.width-30)},onChangeObj:that}).to({x:9},600).call(()=>{changeScene(StartScene)}); FYGE.Tween.get(that.loading,{onChange:()=>{that.zhuazi.x = (that.loading.x+that.loading.width-30)},onChangeObj:that}).to({x:9},600).call(()=>{changeScene(XxlScene)});
} }
}) })
FYGE.GDispatcher.addEventListener("loadEnd",()=>{ FYGE.GDispatcher.addEventListener("loadEnd",()=>{
that.isEnd = true; that.isEnd = true;
if(that.tweenEnd){ if(that.tweenEnd){
FYGE.Tween.get(that.loading,{onChange:()=>{that.zhuazi.x = (that.loading.x+that.loading.width-30)},onChangeObj:that}).to({x:9},600).call(()=>{changeScene(StartScene)}); FYGE.Tween.get(that.loading,{onChange:()=>{that.zhuazi.x = (that.loading.x+that.loading.width-30)},onChangeObj:that}).to({x:9},600).call(()=>{changeScene(CsdScene)});
} }
},that) },that)
} }
......
import { Scene } from "../../module/views/Scene";
import { RES } from "../../module/RES";
// import res from "../../test/output.json"
import resCanvasList from "../../../game/resCanvasList"
import { Ins } from "../Ins";
import { showPanel } from "../../module/ctrls";
import { SelectCatPanel } from "../panels/selectcatpanel/SelectCatPanel";
export class XxlScene extends Scene {
initUi() {
super.initUi();
var sceneBg = Ins.initSprite("b3c8c187-e5c9-4968-9a00-a118d18ab2fc");
this.addChild(sceneBg);
this.x = (Ins.stageW - 750)>>1;
this.y = (Ins.stageH - 1624)>>1;
showPanel(SelectCatPanel);
// this.addChild(new MainScene());
}
start() {
this.initUi()
}
}
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