Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sn19_read
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
sn19_read
Commits
da91fda0
Commit
da91fda0
authored
Nov 10, 2023
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
滑动翻页增加
parent
a4583969
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
456 additions
and
411 deletions
+456
-411
sn17_danci.fire
assets/sn17_danci/scene/sn17_danci.fire
+406
-403
sn17_danci.ts
assets/sn17_danci/scene/sn17_danci.ts
+50
-8
No files found.
assets/sn17_danci/scene/sn17_danci.fire
View file @
da91fda0
This diff is collapsed.
Click to expand it.
assets/sn17_danci/scene/sn17_danci.ts
View file @
da91fda0
...
@@ -89,6 +89,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -89,6 +89,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
private
layers
:
Array
<
cc
.
Node
>
;
private
layers
:
Array
<
cc
.
Node
>
;
initView
()
{
initView
()
{
pg
.
view
.
touchOn
(
this
.
btn_auto
,
this
.
onTouchAuto
,
this
);
pg
.
view
.
touchOn
(
this
.
btn_auto
,
this
.
onTouchAuto
,
this
);
pg
.
view
.
visible
(
pg
.
view
.
find
(
this
,
'
tip_record
'
),
false
);
pg
.
view
.
visible
(
pg
.
view
.
find
(
this
,
'
tip_nopic
'
),
false
);
}
}
resetView
()
{
resetView
()
{
...
@@ -108,6 +110,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -108,6 +110,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
pg
.
view
.
touchOn
(
btn_right
,
this
.
onTouchRecordRight
,
this
);
pg
.
view
.
touchOn
(
btn_right
,
this
.
onTouchRecordRight
,
this
);
pg
.
view
.
touchOn
(
btn_play
,
this
.
onTouchRecordPlay
,
this
);
pg
.
view
.
touchOn
(
btn_play
,
this
.
onTouchRecordPlay
,
this
);
pg
.
view
.
touchOn
(
btn_stop
,
this
.
onTouchRecordStop
,
this
);
pg
.
view
.
touchOn
(
btn_stop
,
this
.
onTouchRecordStop
,
this
);
pg
.
view
.
touchMoveOn
(
this
.
layer_touch
,
this
.
onTouchPanelMove
,
this
);
}
}
private
get
LastData
()
{
private
get
LastData
()
{
...
@@ -199,6 +203,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -199,6 +203,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
@
property
(
cc
.
Node
)
@
property
(
cc
.
Node
)
public
btn_record
:
cc
.
Node
=
null
;
public
btn_record
:
cc
.
Node
=
null
;
@
property
(
cc
.
Node
)
public
layer_touch
:
cc
.
Node
=
null
;
log
(
str
)
{
log
(
str
)
{
const
node
=
cc
.
find
(
'
middleLayer
'
);
const
node
=
cc
.
find
(
'
middleLayer
'
);
if
(
node
)
{
if
(
node
)
{
...
@@ -452,10 +459,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -452,10 +459,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
preLayer
()
{
preLayer
()
{
// 积分需要计算,未获取的内容
// 积分需要计算,未获取的内容
if
(
!
this
.
LastData
)
{
this
.
touchForbid
=
false
;
return
;
}
pg
.
hw
.
playLocalAudio
(
'
pagenext
'
)
pg
.
hw
.
playLocalAudio
(
'
pagenext
'
)
this
.
tempCount
=
0
;
this
.
tempCount
=
0
;
cc
.
audioEngine
.
stopEffect
(
this
.
currentAudioId
);
cc
.
audioEngine
.
stopEffect
(
this
.
currentAudioId
);
...
@@ -623,20 +626,59 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -623,20 +626,59 @@ export default class SceneComponent extends MyCocosSceneComponent {
let
move
=
touchPoint
.
clone
().
subtract
(
startPoint
);
let
move
=
touchPoint
.
clone
().
subtract
(
startPoint
);
console
.
log
(
move
.
toString
());
console
.
log
(
move
.
toString
());
if
(
move
.
x
<
-
10
)
{
if
(
move
.
x
<
-
10
)
{
this
.
touchForbid
=
true
;
console
.
log
(
"
lastPage
"
)
this
.
lastPage
();
}
else
if
(
move
.
x
>
10
)
{
this
.
touchForbid
=
true
;
this
.
touchForbid
=
true
;
console
.
log
(
"
nextPage
"
)
console
.
log
(
"
nextPage
"
)
this
.
nextPage
();
this
.
nextPage
();
}
else
if
(
move
.
x
>
10
)
{
this
.
touchForbid
=
true
;
console
.
log
(
"
lastPage
"
)
this
.
lastPage
();
}
}
}
}
lastPage
()
{
lastPage
()
{
if
(
!
this
.
LastData
)
{
this
.
touchForbid
=
false
;
let
tip
=
pg
.
view
.
find
(
this
,
'
tip_nopic
'
);
pg
.
view
.
visible
(
tip
,
true
);
tip
.
opacity
=
255
;
cc
.
Tween
.
stopAllByTarget
(
tip
)
cc
.
tween
(
tip
).
delay
(
0.8
).
to
(
0.5
,
{
opacity
:
0
}).
start
();
return
;
}
if
(
this
.
recording
)
{
this
.
touchForbid
=
false
;
// 显示提示
let
tip
=
pg
.
view
.
find
(
this
,
'
tip_record
'
);
pg
.
view
.
visible
(
tip
,
true
);
tip
.
opacity
=
255
;
cc
.
Tween
.
stopAllByTarget
(
tip
)
cc
.
tween
(
tip
).
delay
(
0.8
).
to
(
0.5
,
{
opacity
:
0
}).
start
();
return
;
}
// 停止当前所有动作
// 停止当前所有动作
this
.
preLayer
();
this
.
preLayer
();
}
}
nextPage
()
{
nextPage
()
{
if
(
!
this
.
NextData
)
{
this
.
touchForbid
=
false
;
let
tip
=
pg
.
view
.
find
(
this
,
'
tip_nopic
'
);
pg
.
view
.
visible
(
tip
,
true
);
tip
.
opacity
=
255
;
cc
.
Tween
.
stopAllByTarget
(
tip
)
cc
.
tween
(
tip
).
delay
(
0.8
).
to
(
0.5
,
{
opacity
:
0
}).
start
();
return
;
}
if
(
this
.
recording
)
{
this
.
touchForbid
=
false
;
// 显示提示
let
tip
=
pg
.
view
.
find
(
this
,
'
tip_record
'
);
pg
.
view
.
visible
(
tip
,
true
);
tip
.
opacity
=
255
;
cc
.
Tween
.
stopAllByTarget
(
tip
)
cc
.
tween
(
tip
).
delay
(
0.8
).
to
(
0.5
,
{
opacity
:
0
}).
start
();
return
;
}
if
(
this
.
recordFlag
)
{
if
(
this
.
recordFlag
)
{
if
(
this
.
count
+
1
<=
this
.
maxCurrent
)
{
if
(
this
.
count
+
1
<=
this
.
maxCurrent
)
{
this
.
nextLayer
();
this
.
nextLayer
();
...
...
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