Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wfc13
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
wildfirecode13
wfc13
Commits
c62d3032
Commit
c62d3032
authored
Aug 03, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
141d6c77
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
11 deletions
+19
-11
getObject.ts
project/src/getObject.ts
+10
-0
LoadingScene.ts
project/src/template/LoadingScene.ts
+9
-11
No files found.
project/src/getObject.ts
0 → 100644
View file @
c62d3032
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
project/src/template/LoadingScene.ts
View file @
c62d3032
...
...
@@ -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
)
//首次进度一点
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment