Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dfzx_ac2
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
dfzx_ac2
Commits
9f6c5c0b
Commit
9f6c5c0b
authored
Oct 10, 2025
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug
parent
6a385fc3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
12 deletions
+36
-12
dfzx_ac2.js
assets/dfzx_ac2/scene/dfzx_ac2.js
+4
-1
GameLogic.js
assets/dfzx_ac2/script/GameLogic.js
+30
-10
project.json
project.json
+2
-1
No files found.
assets/dfzx_ac2/scene/dfzx_ac2.js
View file @
9f6c5c0b
...
@@ -370,7 +370,10 @@ cc.Class({
...
@@ -370,7 +370,10 @@ cc.Class({
onDestroy
()
{
this
.
gameLogic
.
onDestroy
();
this
.
gameLogic
=
null
;
},
...
...
assets/dfzx_ac2/script/GameLogic.js
View file @
9f6c5c0b
...
@@ -26,6 +26,9 @@ export default class GameLogic {
...
@@ -26,6 +26,9 @@ export default class GameLogic {
m_isPlayingAudio
=
false
;
m_isPlayingAudio
=
false
;
m_sysIntervalId
=
null
;
m_sysIntervalId
=
null
;
timeIdArr
=
[];
timeIntervalIdArr
=
[];
constructor
(
formData
,
systemOption
)
{
constructor
(
formData
,
systemOption
)
{
this
.
g_systemOption
=
systemOption
;
this
.
g_systemOption
=
systemOption
;
this
.
g_imageResList
=
this
.
g_systemOption
.
imageResList
;
this
.
g_imageResList
=
this
.
g_systemOption
.
imageResList
;
...
@@ -151,9 +154,9 @@ export default class GameLogic {
...
@@ -151,9 +154,9 @@ export default class GameLogic {
let
a
=
btn_lion
.
node
.
getComponent
(
dragonBones
.
ArmatureDisplay
)
let
a
=
btn_lion
.
node
.
getComponent
(
dragonBones
.
ArmatureDisplay
)
a
.
playAnimation
(
aniName
,
1
);
a
.
playAnimation
(
aniName
,
1
);
setTimeout
(()
=>
{
this
.
timeIdArr
.
push
(
setTimeout
(()
=>
{
a
.
playAnimation
(
aniName
,
-
1
);
a
.
playAnimation
(
aniName
,
-
1
);
},
3200
);
},
3200
)
)
;
}
}
...
@@ -178,6 +181,7 @@ export default class GameLogic {
...
@@ -178,6 +181,7 @@ export default class GameLogic {
currentIdx
++
;
currentIdx
++
;
speakers
[
currentIdx
%
num
].
active
=
true
;
speakers
[
currentIdx
%
num
].
active
=
true
;
},
200
);
},
200
);
this
.
timeIntervalIdArr
.
push
(
intervalId
);
}
}
btn_speaker
.
stopAni
=
()
=>
{
btn_speaker
.
stopAni
=
()
=>
{
...
@@ -320,6 +324,8 @@ export default class GameLogic {
...
@@ -320,6 +324,8 @@ export default class GameLogic {
}
}
})
})
},
30
)
},
30
)
this
.
timeIntervalIdArr
.
push
(
this
.
m_sysIntervalId
);
}
}
initStar
()
{
initStar
()
{
...
@@ -428,13 +434,13 @@ export default class GameLogic {
...
@@ -428,13 +434,13 @@ export default class GameLogic {
bubb
.
node
.
getChildByName
(
"
image
"
).
active
=
false
;
bubb
.
node
.
getChildByName
(
"
image
"
).
active
=
false
;
for
(
let
i
=
0
;
i
<
8
;
i
++
)
{
for
(
let
i
=
0
;
i
<
8
;
i
++
)
{
_p
.
push
(
new
Promise
((
resolve
,
reject
)
=>
{
_p
.
push
(
new
Promise
((
resolve
,
reject
)
=>
{
setTimeout
(()
=>
{
this
.
timeIdArr
.
push
(
setTimeout
(()
=>
{
if
(
i
>
1
)
{
if
(
i
>
1
)
{
bubb
.
node
.
getChildByName
(
`bubble_ani (
${
i
}
)`
).
active
=
false
;
bubb
.
node
.
getChildByName
(
`bubble_ani (
${
i
}
)`
).
active
=
false
;
}
}
bubb
.
node
.
getChildByName
(
`bubble_ani (
${
i
+
1
}
)`
).
active
=
true
;
bubb
.
node
.
getChildByName
(
`bubble_ani (
${
i
+
1
}
)`
).
active
=
true
;
resolve
()
resolve
()
},
30
*
i
);
},
30
*
i
)
)
;
}))
}))
}
}
return
Promise
.
all
(
_p
)
return
Promise
.
all
(
_p
)
...
@@ -569,10 +575,10 @@ export default class GameLogic {
...
@@ -569,10 +575,10 @@ export default class GameLogic {
this
.
m_bubblesAll
=
this
.
save
;
this
.
m_bubblesAll
=
this
.
save
;
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
setTimeout
(()
=>
{
this
.
timeIdArr
.
push
(
setTimeout
(()
=>
{
resolve
();
resolve
();
this
.
enableClick
(
"
DestroyBubbles
"
)
this
.
enableClick
(
"
DestroyBubbles
"
)
},
1100
);
},
1100
)
)
;
})
})
}
}
...
@@ -614,12 +620,12 @@ export default class GameLogic {
...
@@ -614,12 +620,12 @@ export default class GameLogic {
bubble
.
move
.
vX
=
vArr
[
count
%
4
].
vX
bubble
.
move
.
vX
=
vArr
[
count
%
4
].
vX
bubble
.
move
.
vY
=
vArr
[
count
%
4
].
vY
bubble
.
move
.
vY
=
vArr
[
count
%
4
].
vY
count
++
;
count
++
;
setTimeout
(()
=>
{
this
.
timeIdArr
.
push
(
setTimeout
(()
=>
{
this
.
g_cartoon
.
playAudio
(
"
出现
"
)
this
.
g_cartoon
.
playAudio
(
"
出现
"
)
this
.
g_cartoon
.
tweenChange
(
bubble
.
node
,
{
scale
:
this
.
m_maxScale
,
x
:
bubble
.
move
.
x
,
y
:
bubble
.
move
.
y
},
3
,
_
=>
{
this
.
g_cartoon
.
tweenChange
(
bubble
.
node
,
{
scale
:
this
.
m_maxScale
,
x
:
bubble
.
move
.
x
,
y
:
bubble
.
move
.
y
},
3
,
_
=>
{
resolve
()
resolve
()
})
})
},
200
*
index
);
},
200
*
index
)
)
;
})
})
pAll
.
push
(
_p
)
pAll
.
push
(
_p
)
}
}
...
@@ -683,9 +689,9 @@ export default class GameLogic {
...
@@ -683,9 +689,9 @@ export default class GameLogic {
asyncDelay
(
time
)
{
asyncDelay
(
time
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
setTimeout
(()
=>
{
this
.
timeIdArr
.
push
(
setTimeout
(()
=>
{
resolve
();
resolve
();
},
time
*
1000
);
},
time
*
1000
)
)
;
})
})
}
}
...
@@ -983,4 +989,18 @@ export default class GameLogic {
...
@@ -983,4 +989,18 @@ export default class GameLogic {
// console.log(`Click enabled! [${eventName}]`)
// console.log(`Click enabled! [${eventName}]`)
}
}
onDestroy
()
{
this
.
timeIdArr
.
forEach
(
id
=>
{
clearTimeout
(
id
);
});
this
.
timeIdArr
=
[];
this
.
timeIntervalIdArr
.
forEach
(
id
=>
{
clearInterval
(
id
);
});
this
.
timeIntervalIdArr
=
[];
}
}
}
project.json
View file @
9f6c5c0b
...
@@ -4,5 +4,6 @@
...
@@ -4,5 +4,6 @@
"name"
:
"play"
,
"name"
:
"play"
,
"id"
:
"9af72fd2-44a6-4131-8ea3-3e1b3fa22231"
,
"id"
:
"9af72fd2-44a6-4131-8ea3-3e1b3fa22231"
,
"version"
:
"2.4.5"
,
"version"
:
"2.4.5"
,
"isNew"
:
false
"isNew"
:
false
,
"description"
:
""
}
}
\ 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