Commit c62d3032 authored by wildfirecode13's avatar wildfirecode13

update

parent 141d6c77
export default (object:FYGE.Container, name:string)=>{
const result = object.getChildByName(name);
if(result) return result;
for (const child of object.children) {
const result = child.getChildByName(name);
if(result) return result;
}
return null;
}
\ No newline at end of file
......@@ -2,6 +2,7 @@ import { changeScene } from "../../module/ctrls";
import { RES } from "../../module/RES";
import { Scene } from "../../module/views/Scene";
import { ProgressBarS } from "../common/ProgressBarS";
import getObject from "../getObject";
import { getWebData, sendWebNet, WebNetName } from "../WebNet";
import { StartScene } from "./StartScene";
......@@ -10,21 +11,16 @@ export class LoadingScene extends Scene {
return ["loading"]
}
get skinName() { return "loading" }
progressBar: ProgressBarS;
initUi() {
//适配
// this.y = -layers.stageOffsetY
//背景
// this.addChild(FYGE.Sprite.fromUrl("xxxxxxxx"))
// .position.set(0, 0)
//进度条底图
this.addChild(FYGE.Sprite.fromFrame("loading_progressbg.png"))
.position.set((750 - 577) / 2, 1288 - 24)
//进度条
var pro = this.addChild(FYGE.Sprite.fromFrame("loading_progressfront.png"));
pro.position.set((750 - 577) / 2, 1288 - 24)
// //进度条
var pro = getObject(this,'loading_progressfront');
console.log(pro)
//进度条托管
this.progressBar = new ProgressBarS(pro);
}
......@@ -32,6 +28,8 @@ export class LoadingScene extends Scene {
async start() {
super.start()
console.log(this)
//监听进度条事件
this.addEventListener(FYGE.Event.PROGRESS, this.progressEvent, this)
//首次进度一点
......
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