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
48214989
Commit
48214989
authored
Aug 03, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
11c967c1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
5 deletions
+43
-5
getObject.ts
project/src/getObject.ts
+4
-4
prize.ts
project/src/panels/prize.ts
+28
-0
NewbieScene.ts
project/src/template/NewbieScene.ts
+11
-1
No files found.
project/src/getObject.ts
View file @
48214989
let
func
;
func
=
(
object
:
FYGE
.
Container
,
name
:
string
)
=>
{
let
getObject
;
getObject
=
(
object
:
FYGE
.
Container
,
name
:
string
)
=>
{
const
result
=
object
.
getChildByName
(
name
);
if
(
result
)
return
result
;
for
(
const
child
of
object
.
children
)
{
const
result
=
func
(
child
,
name
);
const
result
=
getObject
(
child
,
name
);
if
(
result
)
return
result
;
}
return
null
;
}
export
default
func
\ No newline at end of file
export
default
getObject
\ No newline at end of file
project/src/panels/prize.ts
0 → 100644
View file @
48214989
import
{
Panel
}
from
"../../module/views/Panel"
;
import
getObject
from
"../getObject"
;
import
{
Tools
}
from
"../Tools"
;
import
{
getWebData
,
sendWebNet
,
WebNetName
}
from
"../WebNet"
;
export
class
PrizePanel
extends
Panel
{
initUi
()
{
super
.
initUi
();
}
get
groupNames
()
{
return
[
"prize"
]
}
get
skinName
()
{
return
"prize"
}
//两个按钮都是关闭作用
get
closeBtns
()
{
return
[
getObject
(
this
,
'prize_closebtn'
),
getObject
(
this
,
'prize_okbtn'
)];
}
async
start
(
data
)
{
super
.
start
();
}
}
\ No newline at end of file
project/src/template/NewbieScene.ts
View file @
48214989
import
{
showPanel
}
from
"../../module/ctrls"
;
import
{
Scene
}
from
"../../module/views/Scene"
;
import
getObject
from
"../getObject"
;
import
{
PrizePanel
}
from
"../panels/prize"
;
export
class
NewbieScene
extends
Scene
{
get
groupNames
()
{
return
[
"newbie"
]
}
get
skinName
()
{
return
"newbie"
}
initUi
()
{
super
.
initUi
()
super
.
initUi
()
;
}
async
start
(
data
)
{
super
.
start
()
console
.
log
(
this
);
this
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,()
=>
{
showPanel
(
PrizePanel
);
},
this
);
}
initEvents
()
{
...
...
@@ -18,4 +26,6 @@ export class NewbieScene extends Scene {
removeEvents
()
{
super
.
removeEvents
();
}
}
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