Commit 5c6ed55e authored by haiyoucuv's avatar haiyoucuv

上传

parent 3f04a741
This diff is collapsed.
{"ver":"1.1.50","importer":"scene","imported":true,"uuid":"7b5de2a0-8504-46ba-9019-37a3548ce8e1","files":[".json"],"subMetas":{},"userData":{}}
......@@ -84,14 +84,14 @@ export class UIMgr {
/********* Scene *********/
// 节省判断
currentScene = {data: undefined};
currentScene = { data: undefined };
static async changeScene(cls: typeof Scene, data: any = {}) {
await UIMgr.ins.changeScene(cls, data);
}
async preloadScene(cls: typeof Scene) {
const {skin, group = skin, bundle} = cls;
const { skin, group = skin, bundle } = cls;
const loadPs = [];
if (bundle) {
const assetBundle = assetManager.getBundle(bundle);
......@@ -128,7 +128,7 @@ export class UIMgr {
}
async changeScene(cls: typeof Scene, data: any = {}) {
const {skin, group = skin, bundle} = cls;
const { skin, group = skin, bundle } = cls;
const loadPs = [];
......@@ -161,7 +161,8 @@ export class UIMgr {
director.loadScene(
skin,
(err, scene) => {
scene.getComponentInChildren(cls).data = data;
const ctrl = scene.getComponentInChildren(cls);
ctrl && (ctrl.data = data);
this.hideWaiting();
},
() => {
......@@ -186,7 +187,7 @@ export class UIMgr {
} = null;
async showPanel(cls: typeof Panel, data = {}, showMask = true) {
const {skin, group = skin, bundle} = cls;
const { skin, group = skin, bundle } = cls;
const loadPs = [];
......@@ -275,7 +276,7 @@ export class UIMgr {
hidePanel() {
if (!this.curPanel) return;
const {node: currPanelNode} = this.curPanel;
const { node: currPanelNode } = this.curPanel;
currPanelNode.destroy();
this.panel.removeChild(currPanelNode);
......@@ -285,7 +286,7 @@ export class UIMgr {
this.curPanel = this.panelStack.pop();
if (!!this.curPanel) {
const {node, showMask} = this.curPanel;
const { node, showMask } = this.curPanel;
node.active = true;
if (showMask) {
......@@ -334,9 +335,9 @@ export class UIMgr {
toastMask.active = mask;
tween(uiOpacity).stop()
.to(0.25, {opacity: 255})
.to(0.25, { opacity: 255 })
.delay(1.7)
.to(0.25, {opacity: 0})
.to(0.25, { opacity: 0 })
.call(() => this.hideToast())
.start();
}
......@@ -368,7 +369,7 @@ export class UIMgr {
tween(waitingRot)
.repeatForever(
tween(waitingRot).by(1, {angle: 360})
tween(waitingRot).by(1, { angle: 360 })
)
.start();
}
......
......@@ -11,6 +11,7 @@ import RankPanel from "../Panels/RankPanel";
import { UIMgr } from "../../Module/UIMgr";
import { AudioMgr } from "../../core_tgx/base/AudioMgr";
import BackPanel from "../Panels/BackPanel";
import { GuideGame } from "./MainGame/GuideGame";
const {ccclass, property} = _decorator;
......@@ -54,7 +55,7 @@ export class HomeScene extends Scene {
const {alreadyGuideSteps, allGuideSteps} = store.homeInfo;
if (alreadyGuideSteps < allGuideSteps) {
changeScene(GuideScene);
changeScene(GuideGame);
} else {
const success = await GameMgr.ins.start();
......
import { _decorator, Color, Texture2D } from "cc";
const {ccclass, property} = _decorator;
@ccclass(`BgAndColor`)
export class BgAndColor {
@property({type: Texture2D})
bg: Texture2D = null;
@property({type: Color})
color: Color = Color.clone(Color.WHITE);
}
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "3668e9cb-8b9f-4204-bf35-01f754872754",
"files": [],
"subMetas": {},
"userData": {}
}
This diff is collapsed.
{"ver":"4.0.24","importer":"typescript","imported":true,"uuid":"94e2c165-67df-4763-b57b-cd91a2cac81d","files":[],"subMetas":{},"userData":{}}
......@@ -27,20 +27,11 @@ import { sleep } from "../../Utils/Utils";
import GameMgr from "../../GameMgr";
import { AudioMgr } from "../../../core_tgx/base/AudioMgr";
import { mdEvent } from "../../AppTool";
import { BgAndColor } from "./BgAndColor";
const {ccclass, property} = _decorator;
@ccclass(`BgAndColor`)
class BgAndColor {
@property({type: Texture2D})
bg: Texture2D = null;
@property({type: Color})
color: Color = Color.clone(Color.WHITE);
}
@ccclass("MainGame")
export class MainGame extends Scene {
static bundle: string = "MainGame";
......@@ -414,5 +405,4 @@ export class MainGame extends Scene {
}
}
......@@ -3,7 +3,7 @@
"config": {
"images": [],
"sceneUUID": {},
"scene": "6446a19f-0546-4738-b4df-6430220eb246"
"scene": "7b5de2a0-8504-46ba-9019-37a3548ce8e1"
},
"show": 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