Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sn14_dds
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
sn14_dds
Commits
ed67cc90
Commit
ed67cc90
authored
Oct 29, 2023
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处理乱点不能点击问题
parent
bddd536d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
sn14_dds.ts
assets/sn14_dds/scene/sn14_dds.ts
+8
-2
hy11.meta
assets/sn14_dds/textures/hy11.meta
+12
-0
No files found.
assets/sn14_dds/scene/sn14_dds.ts
View file @
ed67cc90
...
@@ -109,7 +109,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -109,7 +109,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
gameOver
();
this
.
gameOver
();
return
;
return
;
}
}
this
.
canTouch
=
true
;
//TODO: 需要增加总倒计时
//TODO: 需要增加总倒计时
this
.
currentQuestion
.
options
=
this
.
currentQuestion
.
options
.
map
((
op
,
i
)
=>
{
this
.
currentQuestion
.
options
=
this
.
currentQuestion
.
options
.
map
((
op
,
i
)
=>
{
op
.
id
=
i
;
op
.
id
=
i
;
...
@@ -121,6 +120,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -121,6 +120,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
rightList
=
[];
this
.
rightList
=
[];
this
.
onTouchAudio
(
false
).
then
(()
=>
{
this
.
onTouchAudio
(
false
).
then
(()
=>
{
this
.
canTouch
=
true
;
this
.
inited
=
true
;
this
.
inited
=
true
;
this
.
startQuestion
();
this
.
startQuestion
();
})
})
...
@@ -163,11 +163,15 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -163,11 +163,15 @@ export default class SceneComponent extends MyCocosSceneComponent {
touchPaoPao
(
e
:
any
)
{
touchPaoPao
(
e
:
any
)
{
// 点击之后不能再次点击
// 点击之后不能再次点击
if
(
!
this
.
canTouch
)
return
;
if
(
!
this
.
canTouch
)
return
;
console
.
log
(
"
canTouch 0:
"
+
this
.
canTouch
)
this
.
canTouch
=
false
;
this
.
canTouch
=
false
;
// 如果泡泡没有到指定位置不允许点击
// 如果泡泡没有到指定位置不允许点击
let
item
=
e
.
target
;
let
item
=
e
.
target
;
let
data
=
e
.
target
.
data
;
let
data
=
e
.
target
.
data
;
if
(
!
data
)
return
;
if
(
!
data
)
{
this
.
canTouch
=
true
;
return
;
}
if
(
data
.
right
)
{
if
(
data
.
right
)
{
pg
.
hw
.
playLocalAudio
(
'
right2
'
);
pg
.
hw
.
playLocalAudio
(
'
right2
'
);
this
.
scheduleOnce
(()
=>
{
this
.
scheduleOnce
(()
=>
{
...
@@ -179,6 +183,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -179,6 +183,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
rightList
.
push
(
data
);
this
.
rightList
.
push
(
data
);
this
.
updatePaoPaoRight
(
item
,
data
).
then
(()
=>
{
this
.
updatePaoPaoRight
(
item
,
data
).
then
(()
=>
{
console
.
log
(
"
canTouch 1:
"
+
this
.
canTouch
)
this
.
canTouch
=
true
;
this
.
canTouch
=
true
;
if
(
this
.
rightList
.
length
==
this
.
currentRightList
.
length
)
{
if
(
this
.
rightList
.
length
==
this
.
currentRightList
.
length
)
{
this
.
freeArea
.
forEach
((
item
)
=>
{
this
.
freeArea
.
forEach
((
item
)
=>
{
...
@@ -193,6 +198,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -193,6 +198,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 失败
// 失败
pg
.
hw
.
playLocalAudio
(
'
error
'
)
pg
.
hw
.
playLocalAudio
(
'
error
'
)
this
.
updatePaoPaoError
(
item
,
data
).
then
(()
=>
{
this
.
updatePaoPaoError
(
item
,
data
).
then
(()
=>
{
console
.
log
(
"
canTouch 2:
"
+
this
.
canTouch
)
this
.
canTouch
=
true
;
this
.
canTouch
=
true
;
})
})
}
}
...
...
assets/sn14_dds/textures/hy11.meta
0 → 100644
View file @
ed67cc90
{
"ver": "1.1.2",
"uuid": "93731c49-28d4-4208-9880-d1c9fb139190",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ 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