Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_jxw_demo
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
middleLayer_for_jxw_demo
Commits
9d28e89c
Commit
9d28e89c
authored
Aug 22, 2025
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 基本流程跑通
parent
bf345ca4
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
2646 additions
and
539 deletions
+2646
-539
assets.meta
assets/middleLayer_for_jxw_demo/assets.meta
+12
-0
icon_back.png
assets/middleLayer_for_jxw_demo/assets/icon_back.png
+0
-0
icon_back.png.meta
assets/middleLayer_for_jxw_demo/assets/icon_back.png.meta
+36
-0
README.md
assets/middleLayer_for_jxw_demo/pages/gamecenter/README.md
+116
-0
README.md.meta
.../middleLayer_for_jxw_demo/pages/gamecenter/README.md.meta
+5
-0
wechat_2025-08-21_213128_182.png
.../pages/gamecenter/assets/wechat_2025-08-21_213128_182.png
+0
-0
wechat_2025-08-21_213128_182.png.meta
...s/gamecenter/assets/wechat_2025-08-21_213128_182.png.meta
+36
-0
game-card.ts
...ts/middleLayer_for_jxw_demo/pages/gamecenter/game-card.ts
+66
-0
game-card.ts.meta
...ddleLayer_for_jxw_demo/pages/gamecenter/game-card.ts.meta
+9
-0
gamecenter.fire
...middleLayer_for_jxw_demo/pages/gamecenter/gamecenter.fire
+711
-37
gamecenter.ts
...s/middleLayer_for_jxw_demo/pages/gamecenter/gamecenter.ts
+292
-3
prefabs.meta
...ts/middleLayer_for_jxw_demo/pages/gamecenter/prefabs.meta
+12
-0
game-card.prefab
...er_for_jxw_demo/pages/gamecenter/prefabs/game-card.prefab
+509
-0
game-card.prefab.meta
...r_jxw_demo/pages/gamecenter/prefabs/game-card.prefab.meta
+8
-0
middleLayer_for_jxw_demo.fire
...dleLayer_for_jxw_demo/scene/middleLayer_for_jxw_demo.fire
+342
-25
middleLayer.ts
assets/middleLayer_for_jxw_demo/script/middleLayer.ts
+492
-474
No files found.
assets/middleLayer_for_jxw_demo/assets.meta
0 → 100644
View file @
9d28e89c
{
"ver": "1.1.2",
"uuid": "8ae763a6-0f46-461c-af30-e4cb3ddb9ec1",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
assets/middleLayer_for_jxw_demo/assets/icon_back.png
0 → 100644
View file @
9d28e89c
944 Bytes
assets/middleLayer_for_jxw_demo/assets/icon_back.png.meta
0 → 100644
View file @
9d28e89c
{
"ver": "2.3.5",
"uuid": "60d9c614-a077-45c2-b078-eb1979cda77b",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 68,
"height": 68,
"platformSettings": {},
"subMetas": {
"icon_back": {
"ver": "1.0.4",
"uuid": "b9b71493-4476-48a6-9440-a9e1c0c247ac",
"rawTextureUuid": "60d9c614-a077-45c2-b078-eb1979cda77b",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 68,
"height": 68,
"rawWidth": 68,
"rawHeight": 68,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/middleLayer_for_jxw_demo/pages/gamecenter/README.md
0 → 100644
View file @
9d28e89c
# 游戏广场界面设置说明
## 概述
这个界面实现了一个游戏广场,显示8个游戏卡片的横滑列表,每个卡片包含游戏缩略图和标题。
## 节点结构
### 1. 主要节点层级
```
Canvas (1920x1080)
├── bg (背景 - 浅色背景)
├── back_btn (返回按钮 - 左上角)
├── header (标题栏)
│ └── title_label (游戏广场标题)
└── game_list_container (游戏列表容器)
└── scroll_view (滚动视图)
└── content (内容节点 - 包含所有游戏卡片)
```
### 2. 游戏卡片结构
```
game_card (300x400)
├── card_bg (卡片背景 - 白色圆角矩形)
├── game_thumbnail (游戏缩略图 - 260x280)
└── game_title (游戏标题 - 280x60)
```
## 在Cocos Creator中的设置步骤
### 步骤1: 创建主要节点
1.
在Canvas下创建以下节点:
-
`bg`
(Sprite) - 设置浅色背景
-
`back_btn`
(Button) - 返回按钮,已存在
-
`header`
(Node) - 标题栏容器
-
`game_list_container`
(Node) - 游戏列表容器
### 步骤2: 设置标题栏
1.
在
`header`
节点下创建:
-
`title_label`
(Label) - 设置文本为"游戏广场"
-
字体大小:32,颜色:黑色
-
位置:居中显示
### 步骤3: 设置滚动视图
1.
在
`game_list_container`
下创建:
-
`scroll_view`
(ScrollView组件)
-
设置ScrollView属性:
-
Content: 创建content子节点
-
Horizontal: true (允许水平滚动)
-
Vertical: false (禁用垂直滚动)
-
Elastic Top/Bottom: 0
-
Elastic Left/Right: 0.1
### 步骤4: 设置内容节点
1.
在
`scroll_view`
下创建
`content`
节点
2.
设置content节点属性:
-
Anchor Point: (0, 0.5)
-
Position: (0, 0)
### 步骤5: 创建游戏卡片预制体(推荐)
1.
创建新的预制体文件:
`game-card.prefab`
2.
在预制体中创建卡片结构:
-
根节点:300x400
-
`card_bg`
: 白色背景,300x400
-
`game_thumbnail`
: 缩略图容器,260x280,位置(0, 60)
-
`game_title`
: 标题标签,280x60,位置(0, -160)
3.
添加
`GameCard`
组件到根节点
4.
在组件中绑定对应的属性引用
### 步骤6: 配置脚本组件
1.
在Canvas节点上添加
`GameCenter`
脚本组件
2.
在脚本组件中设置属性:
-
`gameListContainer`
: 拖拽
`game_list_container`
节点
-
`gameCardPrefab`
: 拖拽
`game-card.prefab`
预制体
-
`scrollView`
: 拖拽
`scroll_view`
节点
## 样式设置
### 颜色方案
-
背景色:浅色 (#F8F6EF)
-
卡片背景:白色 (#FFFFFF)
-
标题文字:黑色 (#000000)
### 尺寸规格
-
卡片尺寸:300x400
-
卡片间距:30px
-
缩略图尺寸:260x280
-
标题区域:280x60
### 字体设置
-
标题字体:24px
-
行高:30px
-
对齐方式:居中对齐
## 功能特性
1.
**自动加载游戏数据**
:从API接口获取游戏列表
2.
**动态创建卡片**
:根据数据自动生成游戏卡片
3.
**横滑滚动**
:支持触摸滑动浏览所有游戏
4.
**点击交互**
:每个卡片都可以点击,触发相应事件
5.
**响应式布局**
:自动计算内容宽度,适配不同数量的游戏
## 注意事项
1.
确保网络接口正常工作,能够获取游戏数据
2.
游戏封面图片需要能够正常加载
3.
如果使用预制体,确保路径和引用正确
4.
滚动视图的content节点大小会根据游戏数量自动调整
5.
建议在真机上测试触摸滑动效果
## 扩展功能
1.
**搜索功能**
:可以添加搜索框过滤游戏
2.
**分类功能**
:按游戏类型分组显示
3.
**收藏功能**
:允许用户收藏喜欢的游戏
4.
**最近游戏**
:显示最近玩过的游戏
5.
**游戏统计**
:显示游戏完成度等信息
\ No newline at end of file
assets/middleLayer_for_jxw_demo/pages/gamecenter/README.md.meta
0 → 100644
View file @
9d28e89c
{
"ver": "2.0.0",
"uuid": "64657144-bd5a-48bd-ac6c-01f325f27087",
"subMetas": {}
}
\ No newline at end of file
assets/middleLayer_for_jxw_demo/pages/gamecenter/assets/wechat_2025-08-21_213128_182.png
0 → 100644
View file @
9d28e89c
This diff is collapsed.
Click to expand it.
assets/middleLayer_for_jxw_demo/pages/gamecenter/assets/wechat_2025-08-21_213128_182.png.meta
0 → 100644
View file @
9d28e89c
{
"ver": "2.3.5",
"uuid": "f659072a-d990-4b34-a789-5e076f7e8817",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 2562,
"height": 1444,
"platformSettings": {},
"subMetas": {
"wechat_2025-08-21_213128_182": {
"ver": "1.0.4",
"uuid": "3d3cb355-7e07-40a6-9242-7eebccb8d494",
"rawTextureUuid": "f659072a-d990-4b34-a789-5e076f7e8817",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 2562,
"height": 1444,
"rawWidth": 2562,
"rawHeight": 1444,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/middleLayer_for_jxw_demo/pages/gamecenter/game-card.ts
0 → 100644
View file @
9d28e89c
const
{
ccclass
,
property
}
=
cc
.
_decorator
;
interface
GameCardData
{
id
:
number
;
uuid
:
string
;
template_name
:
string
;
template_description
:
string
;
cover
:
string
;
data
:
string
;
seq
:
number
;
}
@
ccclass
export
default
class
GameCard
extends
cc
.
Component
{
@
property
(
cc
.
Sprite
)
thumbnailSprite
:
cc
.
Sprite
=
null
;
@
property
(
cc
.
Label
)
titleLabel
:
cc
.
Label
=
null
;
@
property
(
cc
.
Node
)
cardBg
:
cc
.
Node
=
null
;
private
gameData
:
GameCardData
=
null
;
onLoad
()
{
// 添加点击事件
this
.
node
.
on
(
'
click
'
,
this
.
onCardClick
,
this
);
}
public
init
(
data
:
GameCardData
)
{
this
.
gameData
=
data
;
this
.
updateDisplay
();
}
private
updateDisplay
()
{
if
(
!
this
.
gameData
)
return
;
// 设置标题
if
(
this
.
titleLabel
)
{
this
.
titleLabel
.
string
=
this
.
gameData
.
template_description
||
'
未知游戏
'
;
}
// 加载并设置缩略图
if
(
this
.
thumbnailSprite
&&
this
.
gameData
.
cover
)
{
cc
.
loader
.
load
(
this
.
gameData
.
cover
,
(
err
,
texture
)
=>
{
if
(
!
err
&&
texture
)
{
const
spriteFrame
=
new
cc
.
SpriteFrame
(
texture
);
this
.
thumbnailSprite
.
spriteFrame
=
spriteFrame
;
}
});
}
}
private
onCardClick
()
{
if
(
this
.
gameData
)
{
console
.
log
(
'
点击游戏卡片:
'
,
this
.
gameData
.
template_description
);
// 派发事件通知父节点
this
.
node
.
emit
(
'
onGameCardClick
'
,
this
.
gameData
);
}
}
onDestroy
()
{
this
.
node
.
off
(
'
click
'
,
this
.
onCardClick
,
this
);
}
}
\ No newline at end of file
assets/middleLayer_for_jxw_demo/pages/gamecenter/game-card.ts.meta
0 → 100644
View file @
9d28e89c
{
"ver": "1.0.8",
"uuid": "9ba24e00-4042-4aa2-b4b8-4bff0f316fbe",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
assets/middleLayer_for_jxw_demo/pages/gamecenter/gamecenter.fire
View file @
9d28e89c
This diff is collapsed.
Click to expand it.
assets/middleLayer_for_jxw_demo/pages/gamecenter/gamecenter.ts
View file @
9d28e89c
This diff is collapsed.
Click to expand it.
assets/middleLayer_for_jxw_demo/pages/gamecenter/prefabs.meta
0 → 100644
View file @
9d28e89c
{
"ver": "1.1.2",
"uuid": "bc2d8d9a-fe65-4d6b-b632-16fdb7292499",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
assets/middleLayer_for_jxw_demo/pages/gamecenter/prefabs/game-card.prefab
0 → 100644
View file @
9d28e89c
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false
},
{
"__type__": "cc.Node",
"_name": "game-card",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 5
},
{
"__id__": 8
}
],
"_active": true,
"_components": [
{
"__id__": 11
},
{
"__id__": 12
}
],
"_prefab": {
"__id__": 13
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 400,
"height": 300
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Node",
"_name": " card_bg",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
}
],
"_prefab": {
"__id__": 4
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 400,
"height": 300
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "3e0857f7-c988-4162-90e4-5e6c1887c3d6"
},
"fileId": "85oivK5FhAvZPML5eAXr4v",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "game_thumbnail",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 6
}
],
"_prefab": {
"__id__": 7
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 360,
"height": 220
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
22.871,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "3e0857f7-c988-4162-90e4-5e6c1887c3d6"
},
"fileId": "e9n/ZFueBHlJMia+chDdd0",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "game_title",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
}
],
"_prefab": {
"__id__": 10
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-1.089,
-125.25,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "",
"_N$string": "",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 0,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "3e0857f7-c988-4162-90e4-5e6c1887c3d6"
},
"fileId": "baz8Zjv3ZPzbAiy2HWukQu",
"sync": false
},
{
"__type__": "9ba244AQEJKorS4S/8PMW++",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"thumbnailSprite": {
"__id__": 6
},
"titleLabel": {
"__id__": 9
},
"cardBg": {
"__id__": 2
},
"_id": ""
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 1
},
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "3e0857f7-c988-4162-90e4-5e6c1887c3d6"
},
"fileId": "",
"sync": false
}
]
\ No newline at end of file
assets/middleLayer_for_jxw_demo/pages/gamecenter/prefabs/game-card.prefab.meta
0 → 100644
View file @
9d28e89c
{
"ver": "1.2.9",
"uuid": "3e0857f7-c988-4162-90e4-5e6c1887c3d6",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
assets/middleLayer_for_jxw_demo/scene/middleLayer_for_jxw_demo.fire
View file @
9d28e89c
...
@@ -70,18 +70,24 @@
...
@@ -70,18 +70,24 @@
"_children": [
"_children": [
{
{
"__id__": 3
"__id__": 3
},
{
"__id__": 5
},
{
"__id__": 17
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
15
"__id__":
22
},
},
{
{
"__id__":
16
"__id__":
23
},
},
{
{
"__id__":
17
"__id__":
24
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -132,6 +138,104 @@
...
@@ -132,6 +138,104 @@
"groupIndex": 0,
"groupIndex": 0,
"_id": "94GaOQuf5JP5wI4nniIhvP"
"_id": "94GaOQuf5JP5wI4nniIhvP"
},
},
{
"__type__": "cc.Node",
"_name": "Main Camera",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "891/RwK2JDHI3j2jhNIPpd"
},
{
"__type__": "cc.Camera",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
},
"_enabled": true,
"_cullingMask": 4294967295,
"_clearFlags": 7,
"_backgroundColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_depth": -1,
"_zoomRatio": 1,
"_targetTexture": null,
"_fov": 60,
"_orthoSize": 10,
"_nearClip": 1,
"_farClip": 4096,
"_ortho": true,
"_rect": {
"__type__": "cc.Rect",
"x": 0,
"y": 0,
"width": 1,
"height": 1
},
"_renderStages": 1,
"_alignWithScreen": true,
"_id": "77f427FyhG6LV4xBsyngkR"
},
{
{
"__type__": "cc.Node",
"__type__": "cc.Node",
"_name": "info",
"_name": "info",
...
@@ -141,22 +245,22 @@
...
@@ -141,22 +245,22 @@
},
},
"_children": [
"_children": [
{
{
"__id__":
4
"__id__":
6
},
},
{
{
"__id__":
7
"__id__":
9
},
},
{
{
"__id__": 1
0
"__id__": 1
2
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 1
3
"__id__": 1
5
},
},
{
{
"__id__": 1
4
"__id__": 1
6
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -212,16 +316,16 @@
...
@@ -212,16 +316,16 @@
"_name": "domain",
"_name": "domain",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
3
"__id__":
5
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
5
"__id__":
7
},
},
{
{
"__id__":
6
"__id__":
8
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -277,7 +381,7 @@
...
@@ -277,7 +381,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
4
"__id__":
6
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -310,7 +414,7 @@
...
@@ -310,7 +414,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
4
"__id__":
6
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -337,16 +441,16 @@
...
@@ -337,16 +441,16 @@
"_name": "baseUrl",
"_name": "baseUrl",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
3
"__id__":
5
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
8
"__id__":
10
},
},
{
{
"__id__":
9
"__id__":
11
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -402,7 +506,7 @@
...
@@ -402,7 +506,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
7
"__id__":
9
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -435,7 +539,7 @@
...
@@ -435,7 +539,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
7
"__id__":
9
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -462,16 +566,16 @@
...
@@ -462,16 +566,16 @@
"_name": "env",
"_name": "env",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
3
"__id__":
5
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 1
1
"__id__": 1
3
},
},
{
{
"__id__": 1
2
"__id__": 1
4
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -527,7 +631,7 @@
...
@@ -527,7 +631,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
0
"__id__": 1
2
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -560,7 +664,7 @@
...
@@ -560,7 +664,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
0
"__id__": 1
2
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -587,7 +691,7 @@
...
@@ -587,7 +691,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
3
"__id__":
5
},
},
"_enabled": true,
"_enabled": true,
"_layoutSize": {
"_layoutSize": {
...
@@ -619,7 +723,7 @@
...
@@ -619,7 +723,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__":
3
"__id__":
5
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -641,6 +745,219 @@
...
@@ -641,6 +745,219 @@
"_originalHeight": 0,
"_originalHeight": 0,
"_id": "c97jBDoJZODqCajB/ZlEtV"
"_id": "c97jBDoJZODqCajB/ZlEtV"
},
},
{
"__type__": "cc.Node",
"_name": "back_btn",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 18
},
{
"__id__": 19
},
{
"__id__": 20
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 68,
"height": 68
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-902,
482,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "8cMP1PP7VPtZFxgqY2eS5U"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 17
},
"_enabled": true,
"alignMode": 1,
"_target": {
"__id__": 2
},
"_alignFlags": 9,
"_left": 24,
"_right": 0,
"_top": 24,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "21HN20+bRGIKBlteDB961d"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 17
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "b9b71493-4476-48a6-9440-a9e1c0c247ac"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "9bXr83g59P1Leg2qTcMVQ3"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 17
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 21
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 17
},
"_id": "1ezWfVDD1BbZJA929wFexb"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 2
},
"component": "",
"_componentId": "c7a12GnkqlEDqfp1PUUHj9F",
"handler": "onExitGame",
"customEventData": ""
},
{
{
"__type__": "c7a12GnkqlEDqfp1PUUHj9F",
"__type__": "c7a12GnkqlEDqfp1PUUHj9F",
"_name": "",
"_name": "",
...
...
assets/middleLayer_for_jxw_demo/script/middleLayer.ts
View file @
9d28e89c
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