Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hy02_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
hy02_paopao
Commits
08adcf58
Commit
08adcf58
authored
Jul 10, 2023
by
yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
e20a93eb
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
417 additions
and
132 deletions
+417
-132
LayerBack_hy02_paopao.ts
...ts/hy02_paopao/common/layer_back/LayerBack_hy02_paopao.ts
+6
-0
layer_ending_hy02_paopao.ts
...02_paopao/common/layer_ending/layer_ending_hy02_paopao.ts
+12
-1
Candy_hy02_paopao.ts
assets/hy02_paopao/common/script/Candy_hy02_paopao.ts
+59
-0
Candy_hy02_paopao.ts.meta
assets/hy02_paopao/common/script/Candy_hy02_paopao.ts.meta
+9
-0
STYuanti-SC-Bold-03.ttf
assets/hy02_paopao/fonts/STYuanti-SC-Bold-03.ttf
+0
-0
STYuanti-SC-Bold-03.ttf.meta
assets/hy02_paopao/fonts/STYuanti-SC-Bold-03.ttf.meta
+5
-0
hy02_paopao.fire
assets/hy02_paopao/scene/hy02_paopao.fire
+326
-131
No files found.
assets/hy02_paopao/common/layer_back/LayerBack_hy02_paopao.ts
View file @
08adcf58
...
@@ -11,6 +11,7 @@ const { ccclass, property } = cc._decorator;
...
@@ -11,6 +11,7 @@ const { ccclass, property } = cc._decorator;
export
default
class
LayerBack
extends
cc
.
Component
{
export
default
class
LayerBack
extends
cc
.
Component
{
private
btn_back
:
cc
.
Node
;
private
btn_back
:
cc
.
Node
;
private
img_npc_voice
:
cc
.
Node
;
private
img_npc_voice
:
cc
.
Node
;
private
bg_forbid
:
cc
.
Node
;
onLoad
()
{
onLoad
()
{
this
.
initView
();
this
.
initView
();
this
.
initEvent
();
this
.
initEvent
();
...
@@ -19,6 +20,7 @@ export default class LayerBack extends cc.Component {
...
@@ -19,6 +20,7 @@ export default class LayerBack extends cc.Component {
initView
()
{
initView
()
{
this
.
bg_forbid
=
pg
.
view
.
find
(
this
,
'
bg_forbid
'
)
this
.
btn_back
=
pg
.
view
.
find
(
this
,
'
btn_back
'
)
this
.
btn_back
=
pg
.
view
.
find
(
this
,
'
btn_back
'
)
this
.
label_title
=
pg
.
view
.
find
(
this
,
'
label_title
'
)
this
.
label_title
=
pg
.
view
.
find
(
this
,
'
label_title
'
)
this
.
img_npc_voice
=
pg
.
view
.
find
(
this
.
label_title
,
'
img_npc_voice
'
)
this
.
img_npc_voice
=
pg
.
view
.
find
(
this
.
label_title
,
'
img_npc_voice
'
)
...
@@ -38,6 +40,7 @@ export default class LayerBack extends cc.Component {
...
@@ -38,6 +40,7 @@ export default class LayerBack extends cc.Component {
pg
.
event
.
on
(
'
npc_layer_back_init
'
,
(
data
)
=>
{
pg
.
event
.
on
(
'
npc_layer_back_init
'
,
(
data
)
=>
{
this
.
updateView
(
data
);
this
.
updateView
(
data
);
if
(
!
this
.
npcAudio
)
{
if
(
!
this
.
npcAudio
)
{
pg
.
view
.
visible
(
this
.
bg_forbid
,
false
)
pg
.
event
.
emit
(
'
npc_voice_play_voice_end
'
);
pg
.
event
.
emit
(
'
npc_voice_play_voice_end
'
);
}
else
{
}
else
{
this
.
playVoiceStart
();
this
.
playVoiceStart
();
...
@@ -55,6 +58,7 @@ export default class LayerBack extends cc.Component {
...
@@ -55,6 +58,7 @@ export default class LayerBack extends cc.Component {
this
.
schedule
(
this
.
playVoiceRunning
,
0.3
)
this
.
schedule
(
this
.
playVoiceRunning
,
0.3
)
pg
.
audio
.
playAudioByUrl
(
this
.
npcAudio
,
()
=>
{
pg
.
audio
.
playAudioByUrl
(
this
.
npcAudio
,
()
=>
{
this
.
playVoiceEnd
();
this
.
playVoiceEnd
();
pg
.
view
.
visible
(
this
.
bg_forbid
,
false
)
pg
.
event
.
emit
(
'
npc_voice_play_voice_end
'
)
pg
.
event
.
emit
(
'
npc_voice_play_voice_end
'
)
},
(
audioId
)
=>
{
},
(
audioId
)
=>
{
this
.
audioId
=
audioId
;
this
.
audioId
=
audioId
;
...
@@ -87,3 +91,5 @@ export default class LayerBack extends cc.Component {
...
@@ -87,3 +91,5 @@ export default class LayerBack extends cc.Component {
}
}
assets/hy02_paopao/common/layer_ending/layer_ending_hy02_paopao.ts
View file @
08adcf58
...
@@ -21,7 +21,8 @@ export default class LayerEnding extends cc.Component {
...
@@ -21,7 +21,8 @@ export default class LayerEnding extends cc.Component {
pg
.
view
.
touchOn
(
this
.
replay_btn
,
this
.
onTouchReplay
,
this
)
pg
.
view
.
touchOn
(
this
.
replay_btn
,
this
.
onTouchReplay
,
this
)
pg
.
view
.
touchOn
(
this
.
next_btn
,
this
.
onTouchNext
,
this
)
pg
.
view
.
touchOn
(
this
.
next_btn
,
this
.
onTouchNext
,
this
)
pg
.
event
.
on
(
'
layer_ending_show
'
,
(
data
)
=>
{
pg
.
event
.
on
(
'
layer_ending_show
'
,
(
data
)
=>
{
this
.
showLayer
(
data
);
// this.showLayer(data);
this
.
onTouchNext
();
})
})
}
}
showLayer
(
data
)
{
showLayer
(
data
)
{
...
@@ -44,14 +45,24 @@ export default class LayerEnding extends cc.Component {
...
@@ -44,14 +45,24 @@ export default class LayerEnding extends cc.Component {
onTouchNext
()
{
onTouchNext
()
{
pg
.
view
.
visible
(
this
.
layer_center
,
false
)
pg
.
view
.
visible
(
this
.
layer_center
,
false
)
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
if
(
!
middleLayer
)
return
this
.
log
(
"
no middleLayer
"
);
const
middleLayerComponent
=
middleLayer
.
getComponent
(
'
middleLayer
'
);
const
middleLayerComponent
=
middleLayer
.
getComponent
(
'
middleLayer
'
);
const
{
index
,
length
}
=
middleLayerComponent
.
getPageInfo
();
// 返回 length:有多少页; index: 当前第几页(从0开始)
const
{
index
,
length
}
=
middleLayerComponent
.
getPageInfo
();
// 返回 length:有多少页; index: 当前第几页(从0开始)
this
.
log
(
"
跳转到下一页
"
);
if
(
index
==
length
-
1
)
{
if
(
index
==
length
-
1
)
{
middleLayerComponent
.
goNextCross
();
// 跳转到下一关卡
middleLayerComponent
.
goNextCross
();
// 跳转到下一关卡
}
else
{
}
else
{
middleLayerComponent
.
goNextPage
();
// 跳转到下一页
middleLayerComponent
.
goNextPage
();
// 跳转到下一页
}
}
}
}
log
(
str
)
{
const
node
=
cc
.
find
(
'
middleLayer
'
);
if
(
node
)
{
node
.
getComponent
(
'
middleLayer
'
).
log
(
str
);
}
else
{
cc
.
log
(
str
);
}
}
}
}
assets/hy02_paopao/common/script/Candy_hy02_paopao.ts
0 → 100644
View file @
08adcf58
// pg.event.emit('img_voice_play_voice_start')
// pg.event.emit('img_voice_play_voice_end')
import
pg
from
"
../../scene/tool/pg_hy02_paopao
"
;
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
@
ccclass
export
default
class
Candy
extends
cc
.
Component
{
@
property
(
cc
.
Float
)
private
jumpHeight
:
number
=
80
;
@
property
(
cc
.
Boolean
)
private
isHide
:
boolean
=
false
;
onLoad
()
{
this
.
initView
();
this
.
playVoiceStart
();
}
initView
()
{
}
initEvent
()
{
// pg.event.on('img_voice_play_voice_start', () => {
// this.playVoiceStart();
// })
// pg.event.on('img_voice_play_voice_end', () => {
// })
}
private
playVoiceCount
:
number
;
playVoiceStart
()
{
this
.
node
.
children
.
forEach
((
ch
,
idx
)
=>
{
let
x
=
ch
.
x
;
let
y
=
ch
.
y
;
ch
.
x
=
0
;
ch
.
y
=
0
;
let
ju
=
cc
.
jumpBy
(
0.5
,
cc
.
v2
(
x
,
y
),
this
.
jumpHeight
,
1
);
let
call
=
cc
.
callFunc
(()
=>
{
if
(
idx
==
this
.
node
.
children
.
length
-
1
)
pg
.
event
.
emit
(
"
camdy_action_end
"
,
this
.
node
);
if
(
this
.
isHide
)
this
.
node
.
active
=
!
this
.
isHide
;
})
// ch.runAction(ju);
cc
.
tween
(
ch
).
sequence
(
ju
,
call
).
start
();
})
}
playVoiceRunning
()
{
}
}
assets/hy02_paopao/common/script/Candy_hy02_paopao.ts.meta
0 → 100644
View file @
08adcf58
{
"ver": "1.0.8",
"uuid": "28693845-7bc7-4258-b8e4-edc0125b4ead",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
assets/hy02_paopao/fonts/STYuanti-SC-Bold-03.ttf
0 → 100644
View file @
08adcf58
File added
assets/hy02_paopao/fonts/STYuanti-SC-Bold-03.ttf.meta
0 → 100644
View file @
08adcf58
{
"ver": "1.1.0",
"uuid": "31794732-3b0e-4ee4-9d36-bcf429614a2b",
"subMetas": {}
}
\ No newline at end of file
assets/hy02_paopao/scene/hy02_paopao.fire
View file @
08adcf58
This diff is collapsed.
Click to expand it.
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