Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
et_01
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
et_01
Commits
18950d67
Commit
18950d67
authored
Feb 23, 2021
by
智慧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:添加所有的龙骨模版节点
parent
e492a15a
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1271 additions
and
14 deletions
+1271
-14
et_01.fire
play/assets/et_01/scene/et_01.fire
+1266
-6
et_01.js
play/assets/et_01/script/et_01.js
+5
-8
No files found.
play/assets/et_01/scene/et_01.fire
View file @
18950d67
This diff is collapsed.
Click to expand it.
play/assets/et_01/script/et_01.js
View file @
18950d67
...
@@ -6,7 +6,8 @@
...
@@ -6,7 +6,8 @@
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
import
{
import
{
asyncTweenTo
asyncTweenTo
,
asyncPlayDragonBoneAnimation
,
}
from
'
../script/utils
'
}
from
'
../script/utils
'
cc
.
Class
({
cc
.
Class
({
...
@@ -140,7 +141,6 @@ cc.Class({
...
@@ -140,7 +141,6 @@ cc.Class({
initView
()
{
initView
()
{
console
.
log
(
'
initView
'
);
this
.
initBg
();
this
.
initBg
();
this
.
initPic
();
this
.
initPic
();
this
.
initBtn
();
this
.
initBtn
();
...
@@ -161,21 +161,18 @@ cc.Class({
...
@@ -161,21 +161,18 @@ cc.Class({
},
},
initBtn
()
{
initBtn
()
{
const
bg
=
cc
.
find
(
'
Canvas/bg
'
);
const
bg
=
cc
.
find
(
'
Canvas/bg
'
);
console
.
log
(
'
bg
'
,
bg
);
bg
.
addComponent
(
cc
.
Button
);
bg
.
addComponent
(
cc
.
Button
);
//节点中添加了button组件 则可以添加click事件监听
//节点中添加了button组件 则可以添加click事件监听
bg
.
on
(
'
click
'
,
async
()
=>
{
bg
.
on
(
'
click
'
,
async
()
=>
{
console
.
log
(
'
hahaha
'
);
await
this
.
showDragon
();
await
this
.
showDragon
();
})
})
},
},
async
showDragon
()
{
async
showDragon
()
{
cons
ole
.
log
(
'
showDragon
'
)
;
cons
t
nodeName
=
'
Canvas/
'
+
'
Greetings
'
;
const
dragonNode
=
cc
.
find
(
'
Canvas/DragonNode
'
);
const
animationNode
=
cc
.
find
(
nodeName
);
await
asyncTweenTo
(
drag
onNode
,
0.5
,
{
x
:
0
});
await
asyncTweenTo
(
animati
onNode
,
0.5
,
{
x
:
0
});
},
},
// update (dt) {},
// update (dt) {},
...
...
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