Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jj15_zww
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
jj15_zww
Commits
005ba2d6
Commit
005ba2d6
authored
Apr 11, 2024
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
游戏处理完成
parent
d2409335
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
454 additions
and
416 deletions
+454
-416
jj16_lianci.fire
assets/jj16_lianci/scene/jj16_lianci.fire
+404
-381
jj16_lianci.ts
assets/jj16_lianci/scene/jj16_lianci.ts
+45
-30
defaultData_jj16_lianci.ts
assets/jj16_lianci/script/defaultData_jj16_lianci.ts
+5
-5
No files found.
assets/jj16_lianci/scene/jj16_lianci.fire
View file @
005ba2d6
This diff is collapsed.
Click to expand it.
assets/jj16_lianci/scene/jj16_lianci.ts
View file @
005ba2d6
...
...
@@ -187,10 +187,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
isAllOver
()
{
let
isAllOver
=
true
;
let
layer
=
this
.
CurrentLayer
;
// let layout_up = pg.view.find(layer, 'layout_up')
// layout_up.children.forEach(item => {
// if (item.data.state != "collider") isAllOver = false;
// })
let
layout_card
=
pg
.
view
.
find
(
layer
,
'
layout_card
'
)
if
(
layout_card
.
children
.
length
==
0
)
return
true
;
return
false
;
}
checkCards
(
dt
)
{
...
...
@@ -427,22 +425,26 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
gameOver
()
{
if
(
!
this
.
showFires
)
this
.
showFires
=
{};
if
(
!
this
.
showFires
[
`
${
this
.
count
}
`
])
{
this
.
showFires
[
`
${
this
.
count
}
`
]
=
true
;
hw
.
util
.
playEndTrebleFirework
();
}
this
.
sendData
().
then
(()
=>
{
if
(
!
cc
.
find
(
'
middleLayer
'
))
return
;
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
if
(
middleLayer
)
{
const
middleLayerComponent
=
middleLayer
.
getComponent
(
'
middleLayer
'
);
middleLayerComponent
.
goNextPage
();
return
;
}
else
{
console
.
log
(
"
[onFinish] middleLayer not found
"
)
this
.
touchForbid
=
true
;
this
.
scheduleOnce
(()
=>
{
if
(
!
this
.
node
||
!
this
.
node
.
parent
)
return
;
if
(
!
this
.
showFires
)
this
.
showFires
=
{};
if
(
!
this
.
showFires
[
`
${
this
.
count
}
`
])
{
this
.
showFires
[
`
${
this
.
count
}
`
]
=
true
;
hw
.
util
.
playEndTrebleFirework
();
}
})
this
.
sendData
().
then
(()
=>
{
if
(
!
cc
.
find
(
'
middleLayer
'
))
return
;
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
if
(
middleLayer
)
{
const
middleLayerComponent
=
middleLayer
.
getComponent
(
'
middleLayer
'
);
middleLayerComponent
.
goNextPage
();
return
;
}
else
{
console
.
log
(
"
[onFinish] middleLayer not found
"
)
}
})
},
1
)
}
createLayer
()
{
...
...
@@ -475,7 +477,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
let
posList
=
{
"
4
"
:
[
-
445
,
-
150
,
150
,
445
],
"
3
"
:
[
-
400
,
-
10
,
380
],
"
2
"
:
[
-
150
,
1
50
],
"
2
"
:
[
-
250
,
2
50
],
"
1
"
:
[
-
10
]
}
let
posArray
=
posList
[
data
.
options
.
length
];
...
...
@@ -496,13 +498,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
item
.
data
=
dt
;
layout_card
.
addChild
(
item
);
this
.
updateCard
(
item
,
dt
);
// pg.view.touchOn(item, this.onTouchCard, this);
})
// let btn_voice = pg.view.find(layer, "btn_voice");
// let btn_play = pg.view.find(layer, "btn_play");
// pg.view.touchOn(btn_voice, this.onTouchCardRecord, this);
// pg.view.touchOn(btn_play, this.onTouchCardPlay, this);
}
updateCard
(
item
,
data
)
{
...
...
@@ -532,6 +528,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
@
property
(
cc
.
Node
)
private
btn_start
:
cc
.
Node
=
null
;
onTouchStart
(
e
)
{
if
(
this
.
touchForbid
)
return
;
// 顶级禁止全部点击
this
.
touchForbid
=
true
;
// 处理问题
let
image
=
pg
.
view
.
find
(
this
.
btn_start
,
'
image
'
);
cc
.
tween
(
image
).
by
(
0.1
,
{
y
:
-
50
}).
by
(
0.1
,
{
y
:
50
}).
start
();
...
...
@@ -549,7 +547,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
onTouchCard
({
target
:
item
})
}
onTouchCard
(
e
)
{
if
(
this
.
touchForbid
)
return
;
// 顶级禁止全部点击
let
item
=
e
.
target
;
let
data
=
item
.
data
;
this
.
currentItem
=
item
;
...
...
@@ -618,13 +615,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 音频处理
let
btn_voice
=
pg
.
view
.
find
(
this
.
layout_record
,
'
btn_voice
'
)
btn_voice
.
data
=
this
.
currentDt
;
// 展示待录音内容
let
normal
=
pg
.
view
.
find
(
btn_voice
,
'
normal
'
)
let
ing
=
pg
.
view
.
find
(
btn_voice
,
'
ing
'
)
btn_voice
.
scale
=
0
;
cc
.
tween
(
btn_voice
).
to
(
0.3
,
{
scale
:
1.5
}).
start
();
pg
.
view
.
visible
(
normal
,
true
)
pg
.
view
.
visible
(
ing
,
false
)
cc
.
tween
(
normal
)
...
...
@@ -658,7 +656,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
onTouchRecordClose
()
{
this
.
layout_record
.
active
=
false
;
this
.
currentItem
.
active
=
true
;
this
.
currentItem
&&
(
this
.
currentItem
.
active
=
true
)
}
// current 和 currentCard
btn_voice_time_id
:
any
;
...
...
@@ -726,7 +724,24 @@ export default class SceneComponent extends MyCocosSceneComponent {
recordExcellent
()
{
this
.
currentItem
.
parent
=
null
;
this
.
currentItem
=
null
;
this
.
onTouchRecordClose
();
// 卡片显示
let
bg
=
pg
.
view
.
find
(
this
.
layout_record
,
'
bg
'
)
let
btn_voice
=
pg
.
view
.
find
(
this
.
layout_record
,
'
btn_voice
'
)
let
card
=
pg
.
view
.
find
(
this
.
layout_record
,
'
card
'
)
cc
.
tween
(
btn_voice
).
to
(
0.3
,
{
scale
:
0
}).
start
();
cc
.
tween
(
card
).
to
(
0.3
,
{
scale
:
0
}).
start
();
cc
.
tween
(
bg
).
delay
(
0.2
).
to
(
0.3
,
{
opacity
:
0
}).
call
(()
=>
{
bg
.
opacity
=
155
;
btn_voice
.
scale
=
1
;
card
.
scale
=
1
;
this
.
onTouchRecordClose
();
}).
start
();
// 判定是否游戏结束
if
(
this
.
isAllOver
())
{
this
.
gameOver
();
}
}
recordTryAgain
()
{
// this.onTouchRecordClose();
...
...
assets/jj16_lianci/script/defaultData_jj16_lianci.ts
View file @
005ba2d6
...
...
@@ -19,11 +19,11 @@ export const defaultData = {
"
image
"
:
"
http://staging-teach.cdn.ireadabc.com/a71f2b71e45ff2525714494f6edd624b.jpg
"
,
"
text
"
:
"
wind
"
},
{
"
type
"
:
"
txt
"
,
"
image
"
:
""
,
"
text
"
:
"
dog
"
}
//
{
//
"type": "txt",
//
"image": "",
//
"text": "dog"
//
}
]
}
]
...
...
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