Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sn09_xuanze
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
sn09_xuanze
Commits
936126a2
Commit
936126a2
authored
Sep 13, 2023
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
制作完成
parent
e57929b2
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
230 additions
and
107 deletions
+230
-107
sn05_night.fire
assets/sn05_night/scene/sn05_night.fire
+189
-84
sn05_night.ts
assets/sn05_night/scene/sn05_night.ts
+41
-23
No files found.
assets/sn05_night/scene/sn05_night.fire
View file @
936126a2
This diff is collapsed.
Click to expand it.
assets/sn05_night/scene/sn05_night.ts
View file @
936126a2
...
@@ -151,7 +151,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -151,7 +151,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
let
item
=
cc
.
instantiate
(
paoaoParent
)
let
item
=
cc
.
instantiate
(
paoaoParent
)
let
pos
=
posArr
[
i
];
let
pos
=
posArr
[
i
];
layer_paopao
.
addChild
(
item
)
layer_paopao
.
addChild
(
item
)
this
.
updatePaoPao
(
item
,
data
,
pos
);
this
.
updatePaoPao
(
item
,
data
,
pos
,
i
);
}
}
pg
.
hw
.
playLocalAudio
(
'
fly
'
)
pg
.
hw
.
playLocalAudio
(
'
fly
'
)
this
.
scheduleOnce
(()
=>
{
this
.
scheduleOnce
(()
=>
{
...
@@ -166,8 +166,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -166,8 +166,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
return
this
.
currentQuestion
.
options
.
filter
(
op
=>
op
.
right
);
return
this
.
currentQuestion
.
options
.
filter
(
op
=>
op
.
right
);
}
}
updatePaoPao
(
item
,
data
,
pos
)
{
updatePaoPao
(
item
,
data
,
pos
,
i
)
{
let
bubble
=
item
.
getChildByName
(
"
bubble
"
)
let
bubble
=
item
.
getChildByName
(
"
bubble
"
)
let
bg_img_0
=
bubble
.
getChildByName
(
'
bg_img_0
'
)
let
bg_img_1
=
bubble
.
getChildByName
(
'
bg_img_1
'
)
let
bg_img_2
=
bubble
.
getChildByName
(
'
bg_img_2
'
)
bg_img_0
.
active
=
i
==
0
;
bg_img_1
.
active
=
i
==
1
;
bg_img_2
.
active
=
i
==
2
;
let
broken
=
item
.
getChildByName
(
"
bubble_broken
"
)
let
broken
=
item
.
getChildByName
(
"
bubble_broken
"
)
let
img
=
bubble
.
getChildByName
(
"
img
"
)
let
img
=
bubble
.
getChildByName
(
"
img
"
)
let
text
=
bubble
.
getChildByName
(
"
text
"
)
let
text
=
bubble
.
getChildByName
(
"
text
"
)
...
@@ -189,31 +195,42 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -189,31 +195,42 @@ export default class SceneComponent extends MyCocosSceneComponent {
item
.
x
=
pos
.
x
;
item
.
x
=
pos
.
x
;
item
.
y
=
pos
.
y
-
1000
item
.
y
=
pos
.
y
-
1000
cc
.
tween
(
item
).
to
(
2
,
{
y
:
pos
.
y
}).
call
(()
=>
{
}).
start
();
let
time
=
i
==
1
?
1.3
:
i
==
2
?
1.6
:
2
;
//
cc
.
tween
(
item
)
.
to
(
time
,
{
y
:
pos
.
y
})
.
to
(
0.3
,
{
scaleY
:
1.1
,
y
:
pos
.
y
+
50
})
.
to
(
0.3
,
{
scaleY
:
1
,
y
:
pos
.
y
})
.
call
(()
=>
{
}).
start
();
}
}
// 点击泡泡
// 点击泡泡
touchPaoPao
(
e
:
any
)
{
touchPaoPao
(
e
:
any
)
{
if
(
!
this
.
canTouch
)
return
;
// 如果泡泡没有到指定位置不允许点击
// 如果泡泡没有到指定位置不允许点击
let
item
=
e
.
target
;
let
item
=
e
.
target
;
let
data
=
e
.
target
.
data
;
let
data
=
e
.
target
.
data
;
// 成功 泡泡破碎 里面的内容消失
// 成功 泡泡破碎 里面的内容消失
let
bubble
=
e
.
target
.
getChildByName
(
"
bubble
"
)
let
bubble
=
e
.
target
.
getChildByName
(
"
bubble
"
)
let
broken
=
e
.
target
.
getChildByName
(
"
bubble_broken
"
)
let
broken
=
e
.
target
.
getChildByName
(
"
bubble_broken
"
)
let
right
=
e
.
target
.
getChildByName
(
"
bubble_right
"
)
if
(
data
.
right
)
{
if
(
data
.
right
)
{
this
.
rightList
.
push
(
data
);
cc
.
Tween
.
stopAllByTarget
(
item
)
cc
.
Tween
.
stopAllByTarget
(
item
)
pg
.
view
.
visible
(
bubble
,
fals
e
)
pg
.
view
.
visible
(
right
,
tru
e
)
pg
.
view
.
visible
(
broken
,
true
)
cc
.
tween
(
item
).
delay
(
0.5
).
call
(()
=>
{
pg
.
hw
.
playLocalAudio
(
'
right
'
)
pg
.
hw
.
playLocalAudio
(
'
right
'
)
}).
by
(
0.5
,
{
y
:
1500
}).
start
();
pg
.
view
.
playDBAnimation
(
right
,
"
newAnimation
"
,
1
)
this
.
rightList
.
push
(
data
);
cc
.
tween
(
item
).
delay
(
0.5
).
call
(()
=>
{
// 处理剩余的节点
// 处理剩余的节点
if
(
this
.
rightList
.
length
==
this
.
currentRightList
.
length
)
{
if
(
this
.
rightList
.
length
==
this
.
currentRightList
.
length
)
{
let
layer_paopao
=
pg
.
view
.
find
(
this
,
'
layer_game/layer_paopao
'
)
let
layer_paopao
=
pg
.
view
.
find
(
this
,
'
layer_game/layer_paopao
'
)
let
children
=
layer_paopao
.
children
;
let
children
=
layer_paopao
.
children
;
children
.
forEach
(
node
=>
{
children
.
forEach
((
node
,
i
)
=>
{
if
(
this
.
rightList
.
some
(
dt
=>
node
.
data
.
id
==
dt
.
id
))
return
;
if
(
this
.
rightList
.
some
(
dt
=>
node
.
data
.
id
==
dt
.
id
))
return
;
cc
.
tween
(
node
).
by
(
0.5
,
{
y
:
-
1500
}).
start
();
cc
.
tween
(
node
).
by
(
0.5
+
(
i
/
children
.
length
)
*
0.5
,
{
y
:
-
1500
}).
start
();
})
})
}
}
this
.
scheduleOnce
(()
=>
{
this
.
scheduleOnce
(()
=>
{
...
@@ -224,6 +241,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -224,6 +241,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
nextQuestion
();
this
.
nextQuestion
();
}
}
},
1
);
},
1
);
}).
by
(
0.5
,
{
y
:
1500
}).
start
();
}
else
{
}
else
{
pg
.
view
.
visible
(
bubble
,
false
)
pg
.
view
.
visible
(
bubble
,
false
)
pg
.
view
.
visible
(
broken
,
true
)
pg
.
view
.
visible
(
broken
,
true
)
...
...
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