Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
SSAPP2502
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
SSAPP2502
Commits
378f521f
Commit
378f521f
authored
Aug 03, 2025
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处理基础完成
parent
c43b7c1b
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
348 additions
and
3407 deletions
+348
-3407
SSAPP2501.fire
assets/SSAPP2501/scene/SSAPP2501.fire
+228
-3052
SSAPP2501.ts
assets/SSAPP2501/scene/SSAPP2501.ts
+99
-292
SSAPP2501_Game.ts
assets/SSAPP2501/scene/tool/SSAPP2501_Game.ts
+20
-26
标注 弹出文字样式-短单词 字号.jpeg
assets/SSAPP2501/textures/标注 弹出文字样式-短单词 字号.jpeg
+0
-0
标注 弹出文字样式-短单词 字号.jpeg.meta
assets/SSAPP2501/textures/标注 弹出文字样式-短单词 字号.jpeg.meta
+0
-37
creator.d.ts
creator.d.ts
+1
-0
No files found.
assets/SSAPP2501/scene/SSAPP2501.fire
View file @
378f521f
This diff is collapsed.
Click to expand it.
assets/SSAPP2501/scene/SSAPP2501.ts
View file @
378f521f
This diff is collapsed.
Click to expand it.
assets/SSAPP2501/scene/tool/SSAPP2501_Game.ts
View file @
378f521f
...
@@ -163,7 +163,7 @@ export default class Game {
...
@@ -163,7 +163,7 @@ export default class Game {
this
.
start
=
false
;
this
.
start
=
false
;
this
.
data
=
[];
this
.
data
=
[];
this
.
page
=
0
;
this
.
page
=
0
;
this
.
pageSize
=
6
;
this
.
pageSize
=
0
;
// 移除每页6个的限制
this
.
player
=
new
Player
();
this
.
player
=
new
Player
();
this
.
state
=
GAME_STATE
.
WAIT
;
this
.
state
=
GAME_STATE
.
WAIT
;
}
}
...
@@ -187,7 +187,7 @@ export default class Game {
...
@@ -187,7 +187,7 @@ export default class Game {
* @param data 游戏配置数据
* @param data 游戏配置数据
*/
*/
public
init
(
data
)
{
public
init
(
data
)
{
this
.
pageSize
=
6
;
// 每页最多6个数据
this
.
pageSize
=
0
;
// 移除每页数据限制
this
.
question
=
{
text
:
data
.
questionText
,
audio
:
data
.
questionTextAudio
};
this
.
question
=
{
text
:
data
.
questionText
,
audio
:
data
.
questionTextAudio
};
this
.
title
=
data
.
title
;
this
.
title
=
data
.
title
;
this
.
bgAudio
=
data
.
bgAudio
||
""
;
this
.
bgAudio
=
data
.
bgAudio
||
""
;
...
@@ -213,39 +213,32 @@ export default class Game {
...
@@ -213,39 +213,32 @@ export default class Game {
this
.
total
=
this
.
data
.
length
;
this
.
total
=
this
.
data
.
length
;
}
}
/**
/**
* 获取当前页的数据
* 获取所有数据
* @param {number} pageIndex 页码索引,默认为当前页码(页码从0开始)
* @returns {Array<Option>} 所有选项数据数组
* @returns {Array<Option>} 当前页的选项数据数组
*/
*/
getPageData
(
pageIndex
?:
number
)
{
getPageData
(
pageIndex
?:
number
)
{
// 如果没有指定页码索引,则使用当前页码(页码从0开始)
// 直接返回所有数据,忽略页码参数
const
index
=
pageIndex
!==
undefined
?
pageIndex
:
this
.
page
;
// 如果数据为空,返回空数组
if
(
!
this
.
data
||
this
.
data
.
length
===
0
)
{
// 计算当前页的起始索引和结束索引
const
startIndex
=
index
*
this
.
pageSize
;
const
endIndex
=
Math
.
min
(
startIndex
+
this
.
pageSize
,
this
.
data
.
length
);
// 如果起始索引超出数据范围,返回空数组
if
(
startIndex
>=
this
.
data
.
length
)
{
return
[];
return
[];
}
}
// 提取
当前页的
数据并转换为Option对象
// 提取
所有
数据并转换为Option对象
const
page
Data
:
Array
<
Option
>
=
[];
const
all
Data
:
Array
<
Option
>
=
[];
for
(
let
i
=
startIndex
;
i
<
endIndex
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
data
.
length
;
i
++
)
{
page
Data
.
push
(
new
Option
(
this
.
data
[
i
],
i
));
all
Data
.
push
(
new
Option
(
this
.
data
[
i
],
i
));
}
}
return
page
Data
;
return
all
Data
;
}
}
/**
/**
* 获取总页数
* 获取总页数
* @returns 总
页数(向上取整)
* @returns 总
是返回1,因为所有数据都在一页中
*/
*/
getTotalPageNum
()
{
getTotalPageNum
()
{
return
Math
.
ceil
(
this
.
data
.
length
/
this
.
pageSize
);
return
1
;
// 所有数据都在一页中
}
}
/**
/**
...
@@ -272,15 +265,16 @@ export default class Game {
...
@@ -272,15 +265,16 @@ export default class Game {
}
}
/**
/**
* 获取当前
页的
卡片信息
* 获取当前卡片信息
* @returns 当前
页的选项数据数组
* @returns 当前
选项数据
*/
*/
getCardInfo
()
{
getCardInfo
()
{
const
currentPage
Data
=
this
.
getPageData
();
const
all
Data
=
this
.
getPageData
();
if
(
currentPage
Data
.
length
===
0
)
{
if
(
all
Data
.
length
===
0
)
{
return
null
;
return
null
;
}
}
return
currentPageData
[
0
];
// 返回当前页的第一个选项
// 根据当前页码返回对应的选项
return
allData
[
this
.
page
]
||
null
;
}
}
/**
/**
...
...
assets/SSAPP2501/textures/标注 弹出文字样式-短单词 字号.jpeg
deleted
100644 → 0
View file @
c43b7c1b
100 KB
assets/SSAPP2501/textures/标注 弹出文字样式-短单词 字号.jpeg.meta
deleted
100644 → 0
View file @
c43b7c1b
{
"ver": "2.3.5",
"uuid": "087cef1e-4484-4ebb-9b61-1c585ad0d429",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1280,
"height": 716,
"platformSettings": {},
"subMetas": {
"标注 弹出文字样式-短单词 字号": {
"ver": "1.0.4",
"uuid": "fb2c7ec2-630f-481b-b871-329f74b4a806",
"rawTextureUuid": "087cef1e-4484-4ebb-9b61-1c585ad0d429",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1280,
"height": 716,
"rawWidth": 1280,
"rawHeight": 716,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
creator.d.ts
View file @
378f521f
...
@@ -4588,6 +4588,7 @@ declare namespace cc {
...
@@ -4588,6 +4588,7 @@ declare namespace cc {
/** !#en Returns a normalized vector representing the forward direction (Z axis) of the node in world space.
/** !#en Returns a normalized vector representing the forward direction (Z axis) of the node in world space.
!#zh 获取节点正前方(z 轴)面对的方向,返回值为世界坐标系下的归一化向量 */
!#zh 获取节点正前方(z 轴)面对的方向,返回值为世界坐标系下的归一化向量 */
forward
:
Vec3
;
forward
:
Vec3
;
data
:
any
;
/**
/**
@param name name
@param name name
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