Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
NJ_MonkyTree
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
NJ_MonkyTree
Commits
29fdedfc
Commit
29fdedfc
authored
Sep 15, 2022
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 按钮名显示异常
parent
09310afe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
NJ_MonkyTree.ts
assets/NJ_MonkyTree/scene/NJ_MonkyTree.ts
+6
-1
util.ts
assets/NJ_MonkyTree/script/util.ts
+17
-0
No files found.
assets/NJ_MonkyTree/scene/NJ_MonkyTree.ts
View file @
29fdedfc
import
{
MyCocosSceneComponent
}
from
"
../script/MyCocosSceneComponent
"
;
import
Attributes
from
"
../script/Attributes
"
;
import
{
callNetworkApiGet
,
callNetworkApiPost
,
jumpToCourseWare
,
buttonOnClick
,
jumpToBundle
}
from
"
../script/util
"
;
import
{
callNetworkApiGet
,
callNetworkApiPost
,
jumpToCourseWare
,
buttonOnClick
,
jumpToBundle
,
delayCall
}
from
"
../script/util
"
;
// @ts-ignore
import
{
assign
,
createMachine
,
interpret
,
actions
,
forwardTo
,
matchesState
}
from
"
../script/xstate
"
;
const
{
pure
,
send
,
raise
,
sendParent
}
=
actions
;
...
...
@@ -216,6 +216,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
titleNode
.
getComponent
(
cc
.
RichText
).
string
=
`<outline align=top color=
${
outline
}
width=4>
${
name
}
</outline>`
delayCall
(
0.2
,
()
=>
{
titleNode
.
getComponent
(
cc
.
RichText
).
string
=
`<outline align=top color=
${
outline
}
width=4>
${
name
}
</outline>`
})
});
...
...
assets/NJ_MonkyTree/script/util.ts
View file @
29fdedfc
...
...
@@ -520,3 +520,20 @@ export function buttonOnClick(button: cc.Node, callback: Function, scale = 1.0)
.
start
();
});
}
export
function
delayCall
(
time
,
cb
)
{
return
cc
.
tween
({})
.
delay
(
time
)
.
call
(()
=>
{
if
(
cb
)
{
cb
();
}
})
.
start
();
}
\ No newline at end of file
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