Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hy11_paopao
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
hy11_paopao
Commits
e1791029
Commit
e1791029
authored
Oct 08, 2023
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
放置连续点击
parent
85d32df4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
15 deletions
+23
-15
.DS_Store
.DS_Store
+0
-0
hy11_paopao.fire
assets/hy11_paopao/scene/hy11_paopao.fire
+2
-2
hy11_paopao.ts
assets/hy11_paopao/scene/hy11_paopao.ts
+21
-13
No files found.
.DS_Store
View file @
e1791029
No preview for this file type
assets/hy11_paopao/scene/hy11_paopao.fire
View file @
e1791029
...
@@ -1961,7 +1961,7 @@
...
@@ -1961,7 +1961,7 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width": 1
50.74
,
"width": 1
48.45
,
"height": 63
"height": 63
},
},
"_anchorPoint": {
"_anchorPoint": {
...
@@ -2047,7 +2047,7 @@
...
@@ -2047,7 +2047,7 @@
"__type__": "TypedArray",
"__type__": "TypedArray",
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
20
8.95399999999995
,
20
6.664
,
0,
0,
0,
0,
0,
0,
...
...
assets/hy11_paopao/scene/hy11_paopao.ts
View file @
e1791029
...
@@ -13,18 +13,18 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -13,18 +13,18 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
addPreloadAudio
()
{
addPreloadAudio
()
{
let
audios
=
[];
//
let audios = [];
function
checkAudio
(
obj
)
{
//
function checkAudio(obj) {
for
(
let
idx
in
obj
)
{
//
for (let idx in obj) {
if
(
typeof
obj
[
idx
]
==
"
object
"
)
{
//
if (typeof obj[idx] == "object") {
checkAudio
(
obj
[
idx
]);
//
checkAudio(obj[idx]);
}
else
if
(
typeof
obj
[
idx
]
==
"
string
"
)
{
//
} else if (typeof obj[idx] == "string") {
if
(
obj
[
idx
].
indexOf
(
"
.mp3
"
)
>
-
1
)
audios
.
push
(
obj
[
idx
]);
//
if (obj[idx].indexOf(".mp3") > -1) audios.push(obj[idx]);
}
//
}
}
//
}
}
//
}
checkAudio
(
this
.
data
)
//
checkAudio(this.data)
this
.
_audioResList
=
audios
;
this
.
_audioResList
=
[]
//
audios;
}
}
addPreloadAnima
()
{
addPreloadAnima
()
{
...
@@ -199,7 +199,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -199,7 +199,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg
.
view
.
touchOn
(
item
,
this
.
touchPaoPao
,
this
)
pg
.
view
.
touchOn
(
item
,
this
.
touchPaoPao
,
this
)
}
}
// 点击泡泡
// 点击泡泡
private
touchForid
:
boolean
;
touchPaoPao
(
e
:
any
)
{
touchPaoPao
(
e
:
any
)
{
if
(
this
.
touchForid
)
return
;
this
.
touchForid
=
true
;
// 如果泡泡没有到指定位置不允许点击
// 如果泡泡没有到指定位置不允许点击
let
item
=
e
.
target
;
let
item
=
e
.
target
;
let
data
=
e
.
target
.
data
;
let
data
=
e
.
target
.
data
;
...
@@ -214,6 +217,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -214,6 +217,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg
.
view
.
visible
(
broken
,
true
)
pg
.
view
.
visible
(
broken
,
true
)
this
.
scheduleOnce
(()
=>
{
this
.
scheduleOnce
(()
=>
{
item
.
parent
=
null
;
item
.
parent
=
null
;
this
.
touchForid
=
false
;
},
0.5
);
},
0.5
);
this
.
rightList
.
push
(
data
);
this
.
rightList
.
push
(
data
);
...
@@ -223,7 +227,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -223,7 +227,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg
.
event
.
once
(
'
layer_coin_show_coin_end
'
,
()
=>
{
pg
.
event
.
once
(
'
layer_coin_show_coin_end
'
,
()
=>
{
this
.
nextQuestion
();
this
.
nextQuestion
();
})
// 动画回调
})
// 动画回调
pg
.
event
.
emit
(
'
layer_coin_show_coin
'
,
3
)
//1 2 3硬币数量
pg
.
event
.
emit
(
'
layer_coin_show_coin
'
,
3
)
//1 2 3硬币数量
}
}
}
else
{
}
else
{
...
@@ -234,6 +239,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -234,6 +239,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
.
to
(
0.1
,
{
x
:
0
})
.
to
(
0.1
,
{
x
:
0
})
.
to
(
0.1
,
{
x
:
15
})
.
to
(
0.1
,
{
x
:
15
})
.
to
(
0.1
,
{
x
:
0
})
.
to
(
0.1
,
{
x
:
0
})
.
call
(()
=>
{
this
.
touchForid
=
false
;
})
.
start
()
.
start
()
}
}
}
}
...
...
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