Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
SSAPP2501
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
SSAPP2501
Commits
2dda19a3
Commit
2dda19a3
authored
Apr 10, 2026
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修复第二个场景时,移动距离错误的问题
parent
6b1fad8b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
130 additions
and
42 deletions
+130
-42
SSAPP2501.ts
assets/SSAPP2501/scene/SSAPP2501.ts
+9
-2
defaultData.ts
assets/SSAPP2501/script/defaultData.ts
+121
-40
No files found.
assets/SSAPP2501/scene/SSAPP2501.ts
View file @
2dda19a3
...
...
@@ -58,6 +58,12 @@ enum TIPS_STATE {
*/
@
ccclass
export
default
class
SceneComponent
extends
MyCocosSceneComponent
{
/**
* 页面切换位移修正系数。
* 分辨率调整后,`layout_game` 按原来的整页距离切换会略微过冲,
* 所以只把页面整体移动距离缩短一点,页内元素坐标仍保持原始逻辑。
*/
private
readonly
pageMoveAdjustRate
=
0.66
;
/**
* 预加载图片资源
...
...
@@ -407,9 +413,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
moveTruck
(
currentPage
:
number
)
{
// 使用cc.tween实现layout_game向左移动一页的距离(1920)
// 保留原来的固定页宽逻辑,只把整页切换距离略微缩短,避免切到第二栋时过冲。
const
adjustedPageMoveX
=
1920
*
currentPage
*
this
.
pageMoveAdjustRate
;
cc
.
tween
(
this
.
layout_game
)
.
to
(
3.0
,
{
x
:
-
1920
*
currentPage
},
{
easing
:
'
cubicOut
'
})
.
to
(
3.0
,
{
x
:
-
adjustedPageMoveX
},
{
easing
:
'
cubicOut
'
})
.
call
(()
=>
{
})
.
start
();
...
...
assets/SSAPP2501/script/defaultData.ts
View file @
2dda19a3
...
...
@@ -18,84 +18,165 @@ export const defaultData = {
"
questions
"
:
[
{
"
type
"
:
"
img
"
,
"
audio
"
:
"
https://
staging-teach.cdn.ireadabc.com/6b3846cee6afa2ae450234aeec835beb
_l.mp3
"
,
"
text
"
:
"
bag
"
,
"
image
"
:
"
https://
staging-teach.cdn.ireadabc.com/3dc45b8d1403a1eae524ac5a48e5d673.pn
g
"
,
"
audio
"
:
"
https://
cdn.iteachabc.com/5379315101ddafb566db7481a46eb6ee
_l.mp3
"
,
"
text
"
:
"
Munch, munch, munch
"
,
"
image
"
:
"
https://
cdn.iteachabc.com/69151433ec30c86425e4756e0f35b062.jp
g
"
,
"
time
"
:
null
,
"
duration
"
:
""
,
"
audioName
"
:
"
bag
.mp3
"
"
audioName
"
:
"
munch
.mp3
"
},
{
"
type
"
:
"
img
"
,
"
audio
"
:
"
https://
staging-teach.cdn.ireadabc.com/a6a5c388c636bc6d063946e91b4bd21a
_l.mp3
"
,
"
text
"
:
"
egg
"
,
"
image
"
:
"
https://
staging-teach.cdn.ireadabc.com/7b315ba7227294d63933cd659d5372fb.pn
g
"
,
"
audio
"
:
"
https://
cdn.iteachabc.com/0684adf88132cd039df1e20412bcd2b4
_l.mp3
"
,
"
text
"
:
"
Crunch, crunch, crunch
"
,
"
image
"
:
"
https://
cdn.iteachabc.com/69151433ec30c86425e4756e0f35b062.jp
g
"
,
"
time
"
:
null
,
"
duration
"
:
""
,
"
audioName
"
:
"
egg
.mp3
"
"
audioName
"
:
"
crunch
.mp3
"
},
{
"
type
"
:
"
txt
"
,
"
audio
"
:
"
https://
staging-teach.cdn.ireadabc.com/8d6a8d7764011afb0ef537d5a44d1d10
_l.mp3
"
,
"
text
"
:
"
key
"
,
"
image
"
:
"
https://
staging-teach.cdn.ireadabc.com/ab9962445d23c0df3a021ae3996412bc.pn
g
"
,
"
type
"
:
"
img
"
,
"
audio
"
:
"
https://
cdn.iteachabc.com/8f0e92fcf0448c885c5deeb4b29b6bd2
_l.mp3
"
,
"
text
"
:
"
I like lovely lunch, lunch!
"
,
"
image
"
:
"
https://
cdn.iteachabc.com/69151433ec30c86425e4756e0f35b062.jp
g
"
,
"
time
"
:
null
,
"
duration
"
:
""
,
"
audioName
"
:
"
key
.mp3
"
"
audioName
"
:
"
Song-1 I like lovely lunch
.mp3
"
},
{
"
type
"
:
"
img
"
,
"
audio
"
:
"
https://
staging-teach.cdn.ireadabc.com/e634280a803a6c9d0b0b51b41f017254
_l.mp3
"
,
"
text
"
:
"
lion
"
,
"
image
"
:
"
https://
staging-teach.cdn.ireadabc.com/26a3965f155e85980be316c077a93004.pn
g
"
,
"
audio
"
:
"
https://
cdn.iteachabc.com/8c00a1e760f3d69e9fd03cf1aafc56eb
_l.mp3
"
,
"
text
"
:
"
I like lovely rice!
"
,
"
image
"
:
"
https://
cdn.iteachabc.com/a0ace333a53966fa3cbb326316694d74.jp
g
"
,
"
time
"
:
null
,
"
duration
"
:
""
,
"
audioName
"
:
"
lion
.mp3
"
"
audioName
"
:
"
Song-2 I like lovely rice
.mp3
"
},
{
"
type
"
:
"
txt
"
,
"
audio
"
:
"
https://staging-teach.cdn.ireadabc.com/fd8a2b8eeb4abbe7683d30e728ece184_l.mp3
"
,
"
text
"
:
"
orange
"
,
"
image
"
:
"
https://staging-teach.cdn.ireadabc.com/42aa310d755512eec187d9df73de0fd3.png
"
,
"
type
"
:
"
img
"
,
"
audio
"
:
"
https://cdn.iteachabc.com/19083957bc565109c2ebc86bf3a14333_l.mp3
"
,
"
text
"
:
"
I like lovely salad!
"
,
"
image
"
:
"
https://cdn.iteachabc.com/06e7231c8be484a060e2857f2a2d5bb0.jpg
"
,
"
time
"
:
null
,
"
duration
"
:
""
,
"
audioName
"
:
"
Song-3 I like lovely salad.mp3
"
},
{
"
type
"
:
"
img
"
,
"
audio
"
:
"
https://cdn.iteachabc.com/03e4f5a7938ddd80b54b59440f914c01_l.mp3
"
,
"
text
"
:
"
I like lovely cake!
"
,
"
image
"
:
"
https://cdn.iteachabc.com/42de1f3c19a46b2d922b6018d07896de.jpg
"
,
"
time
"
:
null
,
"
duration
"
:
""
,
"
audioName
"
:
"
orang
e.mp3
"
"
audioName
"
:
"
Song-4 I like love cak
e.mp3
"
},
{
"
type
"
:
"
txt
"
,
"
audio
"
:
"
https://staging-teach.cdn.ireadabc.com/c08af4f22c71ad8b3d8786a837787ac9_l.mp3
"
,
"
text
"
:
"
hat
"
,
"
image
"
:
"
https://staging-teach.cdn.ireadabc.com/9621563afaae7ac0ed01e431a11fa961.png
"
,
"
type
"
:
"
img
"
,
"
audio
"
:
"
https://cdn.iteachabc.com/0597cb461002817c7103d6d772f535a3_l.mp3
"
,
"
text
"
:
"
Oh yum, yum, yum, yum, yum, yum, yum!
"
,
"
image
"
:
"
https://cdn.iteachabc.com/69151433ec30c86425e4756e0f35b062.jpg
"
,
"
time
"
:
null
,
"
duration
"
:
""
,
"
audioName
"
:
"
Song-2 Oh yum yum yum.mp3
"
},
{
"
type
"
:
"
img
"
,
"
audio
"
:
"
https://cdn.iteachabc.com/0597cb461002817c7103d6d772f535a3_l.mp3
"
,
"
text
"
:
"
Oh yum, yum, yum, yum, yum, yum, yum!
"
,
"
image
"
:
"
https://cdn.iteachabc.com/69151433ec30c86425e4756e0f35b062.jpg
"
,
"
time
"
:
null
,
"
duration
"
:
""
,
"
audioName
"
:
"
hat
.mp3
"
"
audioName
"
:
"
Song-2 Oh yum yum yum
.mp3
"
},
{
"
type
"
:
"
txt
"
,
"
audio
"
:
"
https://staging-teach.cdn.ireadabc.com/f4e0925dec2f24505872b1c367343a6e_l.mp3
"
,
"
text
"
:
"
noodles
"
,
"
image
"
:
"
https://staging-teach.cdn.ireadabc.com/0e2058294ed4fed73a48eb4a8bfd3d37.png
"
,
"
type
"
:
"
img
"
,
"
audio
"
:
"
https://cdn.iteachabc.com/0597cb461002817c7103d6d772f535a3_l.mp3
"
,
"
text
"
:
"
Oh yum, yum, yum, yum, yum, yum, yum!
"
,
"
image
"
:
"
https://cdn.iteachabc.com/69151433ec30c86425e4756e0f35b062.jpg
"
,
"
time
"
:
null
,
"
duration
"
:
""
,
"
audioName
"
:
"
Song-2 Oh yum yum yum.mp3
"
},
{
"
type
"
:
"
img
"
,
"
audio
"
:
"
https://cdn.iteachabc.com/0597cb461002817c7103d6d772f535a3_l.mp3
"
,
"
text
"
:
"
Oh yum, yum, yum, yum, yum, yum, yum!
"
,
"
image
"
:
"
https://cdn.iteachabc.com/69151433ec30c86425e4756e0f35b062.jpg
"
,
"
time
"
:
null
,
"
duration
"
:
""
,
"
audioName
"
:
"
Song-2 Oh yum yum yum.mp3
"
},
{
"
type
"
:
"
img
"
,
"
audio
"
:
"
https://cdn.iteachabc.com/0597cb461002817c7103d6d772f535a3_l.mp3
"
,
"
text
"
:
"
Oh yum, yum, yum, yum, yum, yum, yum!
"
,
"
image
"
:
"
https://cdn.iteachabc.com/69151433ec30c86425e4756e0f35b062.jpg
"
,
"
time
"
:
null
,
"
duration
"
:
""
,
"
audioName
"
:
"
Song-2 Oh yum yum yum.mp3
"
},
{
"
type
"
:
"
img
"
,
"
audio
"
:
"
https://cdn.iteachabc.com/0597cb461002817c7103d6d772f535a3_l.mp3
"
,
"
text
"
:
"
Oh yum, yum, yum, yum, yum, yum, yum!
"
,
"
image
"
:
"
https://cdn.iteachabc.com/69151433ec30c86425e4756e0f35b062.jpg
"
,
"
time
"
:
null
,
"
duration
"
:
""
,
"
audioName
"
:
"
Song-2 Oh yum yum yum.mp3
"
},
{
"
type
"
:
"
img
"
,
"
audio
"
:
"
https://cdn.iteachabc.com/0597cb461002817c7103d6d772f535a3_l.mp3
"
,
"
text
"
:
"
Oh yum, yum, yum, yum, yum, yum, yum!
"
,
"
image
"
:
"
https://cdn.iteachabc.com/69151433ec30c86425e4756e0f35b062.jpg
"
,
"
time
"
:
null
,
"
duration
"
:
""
,
"
audioName
"
:
"
Song-2 Oh yum yum yum.mp3
"
},
{
"
type
"
:
"
img
"
,
"
audio
"
:
"
https://cdn.iteachabc.com/0597cb461002817c7103d6d772f535a3_l.mp3
"
,
"
text
"
:
"
Oh yum, yum, yum, yum, yum, yum, yum!
"
,
"
image
"
:
"
https://cdn.iteachabc.com/69151433ec30c86425e4756e0f35b062.jpg
"
,
"
time
"
:
null
,
"
duration
"
:
""
,
"
audioName
"
:
"
Song-2 Oh yum yum yum.mp3
"
},
{
"
type
"
:
"
img
"
,
"
audio
"
:
"
https://cdn.iteachabc.com/0597cb461002817c7103d6d772f535a3_l.mp3
"
,
"
text
"
:
"
Oh yum, yum, yum, yum, yum, yum, yum!
"
,
"
image
"
:
"
https://cdn.iteachabc.com/69151433ec30c86425e4756e0f35b062.jpg
"
,
"
time
"
:
null
,
"
duration
"
:
""
,
"
audioName
"
:
"
Song-2 Oh yum yum yum.mp3
"
},
{
"
type
"
:
"
img
"
,
"
audio
"
:
"
https://cdn.iteachabc.com/0597cb461002817c7103d6d772f535a3_l.mp3
"
,
"
text
"
:
"
Oh yum, yum, yum, yum, yum, yum, yum!
"
,
"
image
"
:
"
https://cdn.iteachabc.com/69151433ec30c86425e4756e0f35b062.jpg
"
,
"
time
"
:
null
,
"
duration
"
:
""
,
"
audioName
"
:
"
noodles
.mp3
"
"
audioName
"
:
"
Song-2 Oh yum yum yum
.mp3
"
},
{
"
type
"
:
"
img
"
,
"
audio
"
:
"
https://
staging-teach.cdn.ireadabc.com/ce3337620f22232dd15c29c66af57736
_l.mp3
"
,
"
text
"
:
"
monkey
"
,
"
image
"
:
"
https://
staging-teach.cdn.ireadabc.com/340eb5c942ddfbf3fbebace4d14d4472.pn
g
"
,
"
audio
"
:
"
https://
cdn.iteachabc.com/0597cb461002817c7103d6d772f535a3
_l.mp3
"
,
"
text
"
:
"
Oh yum, yum, yum, yum, yum, yum, yum!
"
,
"
image
"
:
"
https://
cdn.iteachabc.com/69151433ec30c86425e4756e0f35b062.jp
g
"
,
"
time
"
:
null
,
"
duration
"
:
""
,
"
audioName
"
:
"
monkey
.mp3
"
"
audioName
"
:
"
Song-2 Oh yum yum yum
.mp3
"
},
{
"
type
"
:
"
img
"
,
"
audio
"
:
"
https://
staging-teach.cdn.ireadabc.com/48f94d8e04450d52c3a53554d193e92a
_l.mp3
"
,
"
text
"
:
"
yogurt
"
,
"
image
"
:
"
https://
staging-teach.cdn.ireadabc.com/42fdd3511537ee5bb55612f29f4667e2.pn
g
"
,
"
audio
"
:
"
https://
cdn.iteachabc.com/0597cb461002817c7103d6d772f535a3
_l.mp3
"
,
"
text
"
:
"
Oh yum, yum, yum, yum, yum, yum, yum!
"
,
"
image
"
:
"
https://
cdn.iteachabc.com/69151433ec30c86425e4756e0f35b062.jp
g
"
,
"
time
"
:
null
,
"
duration
"
:
""
,
"
audioName
"
:
"
yogurt
.mp3
"
"
audioName
"
:
"
Song-2 Oh yum yum yum
.mp3
"
}
]
}
\ No newline at end of file
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