Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
L4R2_Boardgame_Beach
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
L4R2_Boardgame_Beach
Commits
0f57e0a3
Commit
0f57e0a3
authored
Nov 10, 2022
by
杨一航
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
43aa1903
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
L4R2_Boardgame_Beach.ts
assets/L4R2_Boardgame_Beach/scene/L4R2_Boardgame_Beach.ts
+11
-1
No files found.
assets/L4R2_Boardgame_Beach/scene/L4R2_Boardgame_Beach.ts
View file @
0f57e0a3
...
...
@@ -40,6 +40,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
private
_recordBefore
:
boolean
=
false
;
private
_myBear
:
cc
.
Node
;
private
_otherBear
:
cc
.
Node
;
private
_rightNow
:
boolean
;
private
_rightLast
:
boolean
;
private
_checkLast
:
any
;
addPreloadImage
()
{
// TODO 根据自己的配置预加载图片资源
...
...
@@ -342,7 +345,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
node2
.
position
=
this
.
_bluePointRoot
.
getChildByName
(
"
0
"
).
position
;
this
.
_otherBear
=
node2
.
getChildByName
(
"
bear
"
)
this
.
cat
.
getComponent
(
dragonBones
.
ArmatureDisplay
).
addEventListener
(
dragonBones
.
EventObject
.
COMPLETE
,
()
=>
{
this
.
cat
.
getComponent
(
dragonBones
.
ArmatureDisplay
).
addEventListener
(
dragonBones
.
EventObject
.
COMPLETE
,
(
entry
,
data
)
=>
{
console
.
log
(
"
ani complite
"
);
this
.
catAni
();
...
...
@@ -361,6 +364,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
catAni
(
playAudio
?)
{
let
state
=
this
.
_status
.
state
if
(
this
.
_checkLast
)
{
this
.
_checkLast
=
false
this
.
cat
.
getComponent
(
dragonBones
.
ArmatureDisplay
).
playAnimation
(
"
normal
"
,
0
);
return
}
if
(
!
this
.
isMySide
)
{
this
.
cat
.
getComponent
(
dragonBones
.
ArmatureDisplay
).
playAnimation
(
"
begin
"
,
0
);
...
...
@@ -696,6 +704,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
if
(
isRight
)
{
if
(
this
.
isMySide
)
{
this
.
_checkLast
=
true
this
.
cat
.
getComponent
(
dragonBones
.
ArmatureDisplay
).
playAnimation
(
"
right
"
,
1
);
}
...
...
@@ -707,6 +716,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
else
{
if
(
this
.
isMySide
)
{
this
.
_checkLast
=
true
this
.
cat
.
getComponent
(
dragonBones
.
ArmatureDisplay
).
playAnimation
(
"
wrong
"
,
1
);
}
}
...
...
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