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