Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
X
xy_camera
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
xy_camera
Commits
6e611ffc
Commit
6e611ffc
authored
Aug 17, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 骨骼动画点击
parent
ef637b79
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
xy_camera.ts
assets/xy_camera/scene/xy_camera.ts
+6
-5
No files found.
assets/xy_camera/scene/xy_camera.ts
View file @
6e611ffc
...
@@ -149,6 +149,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -149,6 +149,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
});
});
const
animaNode
=
btnStart
[
'
animaNode
'
];
const
animaNode
=
btnStart
[
'
animaNode
'
];
animaNode
.
addComponent
(
cc
.
Button
);
const
db
=
animaNode
.
getComponent
(
dragonBones
.
ArmatureDisplay
);
const
db
=
animaNode
.
getComponent
(
dragonBones
.
ArmatureDisplay
);
let
anis
=
db
.
getAnimationNames
(
"
armatureName
"
);
let
anis
=
db
.
getAnimationNames
(
"
armatureName
"
);
db
.
playAnimation
(
anis
[
0
],
0
);
db
.
playAnimation
(
anis
[
0
],
0
);
...
@@ -193,14 +194,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -193,14 +194,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
const
btnStart
=
cc
.
find
(
"
btn_start
"
,
this
.
node
);
const
btnStart
=
cc
.
find
(
"
btn_start
"
,
this
.
node
);
btnStart
.
on
(
'
click
'
,
()
=>
{
const
start_ske
=
btnStart
[
'
animaNode
'
];
if
(
btnStart
[
'
cantClick
'
])
{
start_ske
.
on
(
'
click
'
,
()
=>
{
if
(
start_ske
[
'
cantClick
'
])
{
return
;
return
;
}
}
btnStart
[
'
cantClick
'
]
=
true
;
start_ske
[
'
cantClick
'
]
=
true
;
this
.
startNode
.
active
=
true
;
this
.
startNode
.
active
=
true
;
let
start_ske
=
btnStart
[
'
animaNode
'
];
cc
.
tween
(
start_ske
).
to
(
0.2
,
{
scale
:
1
}).
start
();
cc
.
tween
(
start_ske
).
to
(
0.2
,
{
scale
:
1
}).
start
();
this
.
updataTipArrow
();
this
.
updataTipArrow
();
});
});
...
@@ -210,7 +211,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -210,7 +211,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
const
btnStart
=
cc
.
find
(
"
btn_start
"
,
this
.
node
);
const
btnStart
=
cc
.
find
(
"
btn_start
"
,
this
.
node
);
let
start_ske
=
btnStart
[
'
animaNode
'
];
let
start_ske
=
btnStart
[
'
animaNode
'
];
cc
.
tween
(
start_ske
).
to
(
0.2
,
{
scale
:
0.3
}).
call
(()
=>
{
cc
.
tween
(
start_ske
).
to
(
0.2
,
{
scale
:
0.3
}).
call
(()
=>
{
cc
.
find
(
"
btn_start
"
,
this
.
node
)
[
'
cantClick
'
]
=
false
;
start_ske
[
'
cantClick
'
]
=
false
;
}).
start
();
}).
start
();
this
.
page_view
.
getComponent
(
cc
.
PageView
).
setCurrentPageIndex
(
0
);
this
.
page_view
.
getComponent
(
cc
.
PageView
).
setCurrentPageIndex
(
0
);
this
.
startNode
.
active
=
false
;
this
.
startNode
.
active
=
false
;
...
...
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