This commit is contained in:
YipLee 2021-01-19 22:30:12 +08:00
commit c4f716c8e9
165 changed files with 61216 additions and 0 deletions

173
README.md Normal file
View File

@ -0,0 +1,173 @@
# 仿Unity Animator可视化动画状态机编辑器
## TODO
- [ ] 加载界面
- [ ] 导入animation、spine、dragon bone文件生成状态节点
- [x] 选中状态节点时可更改transition排序用于决定优先级inspector中的transition显示需要做特殊表现用以表示此时可以进行排序
- [x] 状态节点与子状态机节点可以拖入到子状态机节点内,需解决跨越多层连线的问题
- [x] 连向状态机的连线选项显示多层状态
- [ ] 优化ui与代码、drawcall
- [ ] *?每个状态机的entry和exit状态机和状态一样也可以绑定逻辑脚本*
## 注意点
- 参数名、子状态机名、状态名都不可重名
- trigger与Unity中trigger逻辑相同autoTrigger与trigger类似但每次状态机内部逻辑更新之后都会自动reset
- 状态机组件update会优先执行添加了@executionOrder(-1000)
- 当transition未勾选hasExitTime以及没有添加任何condition时transition会被忽略
- Parameters和Inspector两个界面如果内容超出使用鼠标滚轮滚动因为为了防止与拖拽行为产生冲突触摸事件已被屏蔽
## 文件格式
### 1. 编辑器工程文件格式
```
{
/** 编辑器版本号 */
animator: string;
parameters: [
{
/** 参数名 */
param: string;
/** 参数类型 */
type: ParamType;
/** 初始值 */
init: number;
}
];
mainStateMachine: {
layerPos: [number, number];
layerScale: number;
anyStatePos: [number, number];
subStates: string[];
subStateMachines: string[];
};
subStateMachines: [
{
/** 此状态机视图坐标 */
layerPos: [number, number];
/** 此状态机视图缩放 */
layerScale: number;
/** 此状态机视图内AnyState坐标 */
anyStatePos: [number, number];
/** 状态机名 **/
name: string;
/** 在父状态机视图下的坐标 */
position: [number, number];
/** 父状态机 **/
upStateMachine: string;
/** 在此状态机视图内父状态机的坐标 */
upStateMachinePos: [number, number];
/** 子状态 */
subStates: string[];
/** 子状态机 */
subStateMachines: string[];
}
];
defaultState: string;
anyState: {
transitions: [
{
toState: string;
hasExitTime: boolean;
conditions: [
{
param: string;
value: number;
logic: LogicType;
}
]
}
]
};
states: [
{
/** 在父状态机视图下的坐标 */
position: [number, number];
/** 父状态机 **/
upStateMachine: string;
/** 状态名 */
state: string;
/** 动画名 */
motion: string;
/** 动画播放速度 */
speed: number;
/** 动画播放速度混合参数 */
multiplier: string;
/** 动画是否循环播放 */
loop: boolean;
/** 转向别的状态的连线 */
transitions: [
{
/** 目标状态名 */
toState: string;
/** 是否需等动画播放完毕才可转换 */
hasExitTime: boolean;
/** 转换需满足的参数条件 */
conditions: [
{
/** 此条件对应的参数名 */
param: string;
/** 此条件对应的值 */
value: number;
/** 此条件与值比较的逻辑 */
logic: LogicType;
}
]
}
]
}
];
}
```
### 2. runtime解析所需的文件格式
```
{
parameters: [
{
param: string;
type: ParamType;
init: number;
}
];
defaultState: string;
anyState: {
transitions: [
{
toState: string;
hasExitTime: boolean;
conditions: [
{
param: string;
value: number;
logic: LogicType;
}
]
}
]
};
states: [
{
state: string;
motion: string;
speed: number;
multiplier: string;
loop: boolean;
transitions: [
{
toState: string;
hasExitTime: boolean;
conditions: [
{
param: string;
value: number;
logic: LogicType;
}
]
}
]
}
];
}
```

53
animator-editor/.gitignore vendored Normal file
View File

@ -0,0 +1,53 @@
#/////////////////////////////////////////////////////////////////////////////
# Fireball Projects
#/////////////////////////////////////////////////////////////////////////////
/library/
/temp/
/local/
/build/
#/////////////////////////////////////////////////////////////////////////////
# npm files
#/////////////////////////////////////////////////////////////////////////////
npm-debug.log
node_modules/
#/////////////////////////////////////////////////////////////////////////////
# Logs and databases
#/////////////////////////////////////////////////////////////////////////////
*.log
*.sql
*.sqlite
#/////////////////////////////////////////////////////////////////////////////
# files for debugger
#/////////////////////////////////////////////////////////////////////////////
*.sln
*.csproj
*.pidb
*.unityproj
*.suo
#/////////////////////////////////////////////////////////////////////////////
# OS generated files
#/////////////////////////////////////////////////////////////////////////////
.DS_Store
ehthumbs.db
Thumbs.db
#/////////////////////////////////////////////////////////////////////////////
# WebStorm files
#/////////////////////////////////////////////////////////////////////////////
.idea/
#//////////////////////////
# VS Code files
#//////////////////////////
.vscode/

View File

@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "12b690e3-ff67-4e26-a039-66ab39560dfd",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "faeae768-cf36-4476-b459-0e5ffd314a5f",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "8ce1c11a-59db-49f7-b7e5-86d4dc96ae8d",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -0,0 +1,34 @@
{
"ver": "2.3.3",
"uuid": "a35238ee-35fb-4030-8528-1ed5c6421e92",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "point",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"platformSettings": {},
"subMetas": {
"grid": {
"ver": "1.0.4",
"uuid": "2d635c03-338c-4a86-8f69-afbaeae0f27d",
"rawTextureUuid": "a35238ee-35fb-4030-8528-1ed5c6421e92",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 450,
"height": 450,
"rawWidth": 450,
"rawHeight": 450,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}

View File

@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "14bebef2-73bf-48ce-8f5b-ff662efabf00",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -0,0 +1,34 @@
{
"ver": "2.3.3",
"uuid": "93245beb-b883-4e79-b1e3-cc093faa659f",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"platformSettings": {},
"subMetas": {
"arrow": {
"ver": "1.0.4",
"uuid": "48ff94e9-95ae-47b4-a5d9-38bc3ad7d073",
"rawTextureUuid": "93245beb-b883-4e79-b1e3-cc093faa659f",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 27,
"trimY": 1,
"width": 74,
"height": 126,
"rawWidth": 128,
"rawHeight": 128,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -0,0 +1,34 @@
{
"ver": "2.3.3",
"uuid": "4be5a96b-1003-47d7-bf4b-8784fddb9710",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"platformSettings": {},
"subMetas": {
"bar1": {
"ver": "1.0.4",
"uuid": "f57e73a8-d9f2-4bcc-b051-df7f503abe1f",
"rawTextureUuid": "4be5a96b-1003-47d7-bf4b-8784fddb9710",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 160,
"height": 101,
"rawWidth": 160,
"rawHeight": 101,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 60,
"borderRight": 70,
"subMetas": {}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,34 @@
{
"ver": "2.3.3",
"uuid": "c9566738-428b-45fb-96d1-e64abc47c9c0",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"platformSettings": {},
"subMetas": {
"bar2": {
"ver": "1.0.4",
"uuid": "dc755427-62dc-482b-b280-d4b8d25db202",
"rawTextureUuid": "c9566738-428b-45fb-96d1-e64abc47c9c0",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 160,
"height": 101,
"rawWidth": 160,
"rawHeight": 101,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 70,
"borderRight": 70,
"subMetas": {}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -0,0 +1,34 @@
{
"ver": "2.3.3",
"uuid": "84c1dd03-3f8e-4b85-a896-4f69077a8ba2",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "point",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"platformSettings": {},
"subMetas": {
"block": {
"ver": "1.0.4",
"uuid": "9cc36e23-5b41-44ad-8512-a0a6bbf8e7b1",
"rawTextureUuid": "84c1dd03-3f8e-4b85-a896-4f69077a8ba2",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 10,
"height": 10,
"rawWidth": 10,
"rawHeight": 10,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,34 @@
{
"ver": "2.3.3",
"uuid": "48f5d5b1-f0b3-4813-994c-89f7998a87db",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"platformSettings": {},
"subMetas": {
"check": {
"ver": "1.0.4",
"uuid": "7d6b56cf-4e15-48b4-a5d0-e43ea2add57a",
"rawTextureUuid": "48f5d5b1-f0b3-4813-994c-89f7998a87db",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 8,
"width": 100,
"height": 84,
"rawWidth": 100,
"rawHeight": 100,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -0,0 +1,34 @@
{
"ver": "2.3.3",
"uuid": "ac7cbb3e-4931-4b48-ab0c-4206e338a4a3",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"platformSettings": {},
"subMetas": {
"circle": {
"ver": "1.0.4",
"uuid": "c5286544-8645-46f0-8940-cdd7aedc26be",
"rawTextureUuid": "ac7cbb3e-4931-4b48-ab0c-4206e338a4a3",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 14,
"trimY": 14,
"width": 100,
"height": 100,
"rawWidth": 128,
"rawHeight": 128,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -0,0 +1,34 @@
{
"ver": "2.3.3",
"uuid": "87926655-6640-4be4-a38e-40819a539665",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"platformSettings": {},
"subMetas": {
"content1": {
"ver": "1.0.4",
"uuid": "5df2733d-74a2-4296-b4c2-14b427d8180a",
"rawTextureUuid": "87926655-6640-4be4-a38e-40819a539665",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 202,
"height": 101,
"rawWidth": 202,
"rawHeight": 101,
"borderTop": 15,
"borderBottom": 15,
"borderLeft": 15,
"borderRight": 15,
"subMetas": {}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -0,0 +1,34 @@
{
"ver": "2.3.3",
"uuid": "055492ce-83d5-4eab-9896-7c12b373d988",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"platformSettings": {},
"subMetas": {
"diam": {
"ver": "1.0.4",
"uuid": "d523af88-0b18-4296-8c30-63f17f1a58d0",
"rawTextureUuid": "055492ce-83d5-4eab-9896-7c12b373d988",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 142,
"height": 142,
"rawWidth": 142,
"rawHeight": 142,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -0,0 +1,34 @@
{
"ver": "2.3.3",
"uuid": "011600ae-6393-4b70-a818-f9d2c5a610ea",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"platformSettings": {},
"subMetas": {
"hex": {
"ver": "1.0.4",
"uuid": "483ac68f-a211-4846-ae33-85eb49eb468f",
"rawTextureUuid": "011600ae-6393-4b70-a818-f9d2c5a610ea",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 98,
"height": 101,
"rawWidth": 98,
"rawHeight": 101,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 32,
"borderRight": 32,
"subMetas": {}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -0,0 +1,34 @@
{
"ver": "2.3.3",
"uuid": "86f087f4-f844-4fce-806f-5f15a8fd1516",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"platformSettings": {},
"subMetas": {
"outline": {
"ver": "1.0.4",
"uuid": "04fff1f2-2a1b-493a-acd3-801c404e23a7",
"rawTextureUuid": "86f087f4-f844-4fce-806f-5f15a8fd1516",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 212,
"height": 212,
"rawWidth": 212,
"rawHeight": 212,
"borderTop": 15,
"borderBottom": 15,
"borderLeft": 15,
"borderRight": 15,
"subMetas": {}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -0,0 +1,34 @@
{
"ver": "2.3.3",
"uuid": "bc9f0e55-317d-4fb9-98e5-0a85e548ea36",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"platformSettings": {},
"subMetas": {
"outline_hex": {
"ver": "1.0.4",
"uuid": "7cbec772-f4ef-493d-b1d6-f93bba336dfd",
"rawTextureUuid": "bc9f0e55-317d-4fb9-98e5-0a85e548ea36",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 110,
"height": 113,
"rawWidth": 110,
"rawHeight": 113,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 40,
"borderRight": 40,
"subMetas": {}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@ -0,0 +1,34 @@
{
"ver": "2.3.3",
"uuid": "13c219d8-f6bc-4cd5-97f5-8a1a5790184a",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"platformSettings": {},
"subMetas": {
"outline_round": {
"ver": "1.0.4",
"uuid": "ae65b48f-df8b-4e27-bbda-f9b5bd57b381",
"rawTextureUuid": "13c219d8-f6bc-4cd5-97f5-8a1a5790184a",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 262,
"height": 262,
"rawWidth": 262,
"rawHeight": 262,
"borderTop": 20,
"borderBottom": 20,
"borderLeft": 20,
"borderRight": 20,
"subMetas": {}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -0,0 +1,34 @@
{
"ver": "2.3.3",
"uuid": "d79dc70a-b554-4782-9b01-817076a2f2b9",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"platformSettings": {},
"subMetas": {
"rect": {
"ver": "1.0.4",
"uuid": "dcfeb2dd-7662-49c9-8df7-3d4f208a752c",
"rawTextureUuid": "d79dc70a-b554-4782-9b01-817076a2f2b9",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 202,
"height": 202,
"rawWidth": 202,
"rawHeight": 202,
"borderTop": 3,
"borderBottom": 3,
"borderLeft": 3,
"borderRight": 3,
"subMetas": {}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -0,0 +1,34 @@
{
"ver": "2.3.3",
"uuid": "dd77a94e-04a1-4440-a477-b90f1efebf04",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"platformSettings": {},
"subMetas": {
"rect_round": {
"ver": "1.0.4",
"uuid": "02e484e6-534e-42c2-9ebc-8ac9a380f573",
"rawTextureUuid": "dd77a94e-04a1-4440-a477-b90f1efebf04",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 250,
"height": 250,
"rawWidth": 250,
"rawHeight": 250,
"borderTop": 20,
"borderBottom": 20,
"borderLeft": 20,
"borderRight": 20,
"subMetas": {}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -0,0 +1,34 @@
{
"ver": "2.3.3",
"uuid": "3a7fbf28-544d-4989-97f7-dd8ba56d0532",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"platformSettings": {},
"subMetas": {
"triangle": {
"ver": "1.0.4",
"uuid": "d5067326-2ed3-4e1a-91a4-706a7e1ba65e",
"rawTextureUuid": "3a7fbf28-544d-4989-97f7-dd8ba56d0532",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 200,
"height": 173,
"rawWidth": 200,
"rawHeight": 173,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}

View File

@ -0,0 +1,3 @@
{
"__type__": "cc.SpriteAtlas"
}

View File

@ -0,0 +1,21 @@
{
"ver": "1.2.0",
"uuid": "17a8f597-ca78-451f-9ec7-c9642d255e80",
"maxWidth": 1024,
"maxHeight": 1024,
"padding": 2,
"allowRotation": true,
"forceSquared": false,
"powerOfTwo": false,
"algorithm": "MaxRects",
"format": "png",
"quality": 80,
"contourBleed": true,
"paddingBleed": true,
"filterUnused": false,
"packable": false,
"premultiplyAlpha": false,
"filterMode": "bilinear",
"platformSettings": {},
"subMetas": {}
}

View File

@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "1ce0525c-03a6-496f-9f30-d6d86877105d",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "57a3acd3-3211-4399-99fc-ebb7070fd83e",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
{
"ver": "1.2.5",
"uuid": "dfcd6482-cd44-4b76-95a5-db4d9e1aa0bb",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

View File

@ -0,0 +1,552 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false
},
{
"__type__": "cc.Node",
"_name": "Line",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 5
},
{
"__id__": 8
},
{
"__id__": 11
}
],
"_active": true,
"_components": [
{
"__id__": 14
}
],
"_prefab": {
"__id__": 15
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 10,
"height": 10
},
"_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": "lineSprite",
"_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": 8,
"height": 100
},
"_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__": "dcfeb2dd-7662-49c9-8df7-3d4f208a752c"
},
"_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__": "5b106508-6042-4d42-8d40-9c265581efc4"
},
"fileId": "9aotBOB6pCNKv3jdE3RcxM",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "triangle",
"_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": 25,
"height": 25
},
"_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__": 5
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "d5067326-2ed3-4e1a-91a4-706a7e1ba65e"
},
"_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__": "5b106508-6042-4d42-8d40-9c265581efc4"
},
"fileId": "d33MU7UIJCCZMaqo2sdNu3",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "triangle copy",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 9
}
],
"_prefab": {
"__id__": 10
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 25,
"height": 25
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-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.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "d5067326-2ed3-4e1a-91a4-706a7e1ba65e"
},
"_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__": "5b106508-6042-4d42-8d40-9c265581efc4"
},
"fileId": "8bSlfU3j5I1ZEhj2tViR8C",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "triangle copy",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 12
}
],
"_prefab": {
"__id__": 13
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 25,
"height": 25
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
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.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 11
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "d5067326-2ed3-4e1a-91a4-706a7e1ba65e"
},
"_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__": "5b106508-6042-4d42-8d40-9c265581efc4"
},
"fileId": "0eKTvow/tNRKfdArsdK7R7",
"sync": false
},
{
"__type__": "2aff7P5LhFCLLzEwzg3mxVI",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"SprNode": {
"__id__": 2
},
"TriNodes": [
{
"__id__": 5
},
{
"__id__": 8
},
{
"__id__": 11
}
],
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "5b106508-6042-4d42-8d40-9c265581efc4"
},
"fileId": "3234ZoRn9Bvqub6lR/VY46",
"sync": false
}
]

View File

@ -0,0 +1,8 @@
{
"ver": "1.2.5",
"uuid": "5b106508-6042-4d42-8d40-9c265581efc4",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

View File

@ -0,0 +1,545 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false
},
{
"__type__": "cc.Node",
"_name": "StateMachineNode",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 5
},
{
"__id__": 8
},
{
"__id__": 11
}
],
"_active": true,
"_components": [
{
"__id__": 14
}
],
"_prefab": {
"__id__": 15
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 270,
"height": 60
},
"_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": "shadow",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
}
],
"_prefab": {
"__id__": 4
},
"_opacity": 80,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 282,
"height": 70
},
"_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__": "7cbec772-f4ef-493d-b1d6-f93bba336dfd"
},
"_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__": "2d2f31c3-2f9a-455f-ad9d-6a2a5b5f4051"
},
"fileId": "acO5yg7CtNZrEZDsfQJi+s",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "select",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 6
}
],
"_prefab": {
"__id__": 7
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 43,
"g": 102,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 282,
"height": 70
},
"_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__": 5
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "7cbec772-f4ef-493d-b1d6-f93bba336dfd"
},
"_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__": "2d2f31c3-2f9a-455f-ad9d-6a2a5b5f4051"
},
"fileId": "cbtoEqcbVP5bSs6nB9k7Jx",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "bg",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
}
],
"_prefab": {
"__id__": 10
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 150,
"g": 150,
"b": 150,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 270,
"height": 60
},
"_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__": 8
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "483ac68f-a211-4846-ae33-85eb49eb468f"
},
"_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__": "2d2f31c3-2f9a-455f-ad9d-6a2a5b5f4051"
},
"fileId": "66Z2Y3Ti5K0LvECLFHypAI",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "name",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 12
}
],
"_prefab": {
"__id__": 13
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 293.51,
"height": 60.48
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
0.5,
0.5,
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__": 11
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "StateMachine",
"_N$string": "StateMachine",
"_fontSize": 48,
"_lineHeight": 48,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "2d2f31c3-2f9a-455f-ad9d-6a2a5b5f4051"
},
"fileId": "2aMMvW4hdDLIYX5vDpWy5H",
"sync": false
},
{
"__type__": "f37b5aQnaBBQa4/iFSORZgx",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"SelectNode": {
"__id__": 5
},
"BgNode": {
"__id__": 8
},
"NameLabel": {
"__id__": 12
},
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "2d2f31c3-2f9a-455f-ad9d-6a2a5b5f4051"
},
"fileId": "77IjLw6dZKmbyRhySqx1Yx",
"sync": false
}
]

View File

@ -0,0 +1,8 @@
{
"ver": "1.2.5",
"uuid": "2d2f31c3-2f9a-455f-ad9d-6a2a5b5f4051",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

View File

@ -0,0 +1,545 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false
},
{
"__type__": "cc.Node",
"_name": "StateNode",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 5
},
{
"__id__": 8
},
{
"__id__": 11
}
],
"_active": true,
"_components": [
{
"__id__": 14
}
],
"_prefab": {
"__id__": 15
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 270,
"height": 60
},
"_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": "shadow",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
}
],
"_prefab": {
"__id__": 4
},
"_opacity": 80,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 284,
"height": 74
},
"_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__": "ae65b48f-df8b-4e27-bbda-f9b5bd57b381"
},
"_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__": "0cf01231-59c7-4b84-9c7c-9a597f051776"
},
"fileId": "69UdbhK85O8YkYo7GC+Vyo",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "select",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 6
}
],
"_prefab": {
"__id__": 7
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 43,
"g": 102,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 284,
"height": 74
},
"_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__": 5
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "ae65b48f-df8b-4e27-bbda-f9b5bd57b381"
},
"_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__": "0cf01231-59c7-4b84-9c7c-9a597f051776"
},
"fileId": "cbtoEqcbVP5bSs6nB9k7Jx",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "bg",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
}
],
"_prefab": {
"__id__": 10
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 150,
"g": 150,
"b": 150,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 270,
"height": 60
},
"_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__": 8
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "02e484e6-534e-42c2-9ebc-8ac9a380f573"
},
"_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__": "0cf01231-59c7-4b84-9c7c-9a597f051776"
},
"fileId": "66Z2Y3Ti5K0LvECLFHypAI",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "name",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 12
}
],
"_prefab": {
"__id__": 13
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 112.08,
"height": 60.48
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
0.5,
0.5,
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__": 11
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "State",
"_N$string": "State",
"_fontSize": 48,
"_lineHeight": 48,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "0cf01231-59c7-4b84-9c7c-9a597f051776"
},
"fileId": "2aMMvW4hdDLIYX5vDpWy5H",
"sync": false
},
{
"__type__": "93004C4InVHzrfgMWEwjPxv",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"SelectNode": {
"__id__": 5
},
"BgNode": {
"__id__": 8
},
"NameLabel": {
"__id__": 12
},
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "0cf01231-59c7-4b84-9c7c-9a597f051776"
},
"fileId": "77IjLw6dZKmbyRhySqx1Yx",
"sync": false
}
]

View File

@ -0,0 +1,8 @@
{
"ver": "1.2.5",
"uuid": "0cf01231-59c7-4b84-9c7c-9a597f051776",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

View File

@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "b1674a17-a641-429e-9b39-c1a686c448f2",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@ -0,0 +1,419 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false
},
{
"__type__": "cc.Node",
"_name": "BarItem",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 5
}
],
"_active": true,
"_components": [
{
"__id__": 8
},
{
"__id__": 10
}
],
"_prefab": {
"__id__": 11
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 164.74,
"height": 50
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"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": "bg",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
}
],
"_prefab": {
"__id__": 4
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 80,
"g": 80,
"b": 80,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 389.48,
"height": 100
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
0.5,
0.5,
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__": "dc755427-62dc-482b-b280-d4b8d25db202"
},
"_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__": "d2c7ceb8-912a-4bb4-8471-bda7632c8f4d"
},
"fileId": "59JPWLcClBqqRps7fLLKWa",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "name",
"_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": 114.74,
"height": 40.32
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
35,
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.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "BaseLayer",
"_N$string": "BaseLayer",
"_fontSize": 24,
"_lineHeight": 32,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "d2c7ceb8-912a-4bb4-8471-bda7632c8f4d"
},
"fileId": "26N+BUYqtEsKCL5DdEuIPp",
"sync": false
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_normalMaterial": {
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
},
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 9
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 1,
"transition": 1,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 80,
"g": 80,
"b": 80,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 50,
"g": 50,
"b": 50,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 50,
"g": 50,
"b": 50,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 80,
"g": 80,
"b": 80,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 80,
"g": 80,
"b": 80,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 100,
"g": 100,
"b": 100,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 2
},
"_id": ""
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 1
},
"component": "",
"_componentId": "68573mjffVPYZnh778Bdc81",
"handler": "onClick",
"customEventData": ""
},
{
"__type__": "68573mjffVPYZnh778Bdc81",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"BgNode": {
"__id__": 2
},
"NameLabel": {
"__id__": 6
},
"BgFrames": [
{
"__uuid__": "f57e73a8-d9f2-4bcc-b051-df7f503abe1f"
},
{
"__uuid__": "dc755427-62dc-482b-b280-d4b8d25db202"
}
],
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "d2c7ceb8-912a-4bb4-8471-bda7632c8f4d"
},
"fileId": "42xefkIRdGJ4c/gso+a4eH",
"sync": false
}
]

View File

@ -0,0 +1,8 @@
{
"ver": "1.2.5",
"uuid": "d2c7ceb8-912a-4bb4-8471-bda7632c8f4d",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
{
"ver": "1.2.5",
"uuid": "d2a69c7f-2a5f-40da-9dcc-ef17c9a856be",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

View File

@ -0,0 +1,343 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false
},
{
"__type__": "cc.Node",
"_name": "LineToSubItem",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_active": true,
"_components": [
{
"__id__": 5
},
{
"__id__": 7
},
{
"__id__": 8
}
],
"_prefab": {
"__id__": 9
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 280,
"height": 40
},
"_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": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
}
],
"_prefab": {
"__id__": 4
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 270,
"height": 37.8
},
"_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.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "State",
"_N$string": "State",
"_fontSize": 24,
"_lineHeight": 30,
"_enableWrapText": false,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 1,
"_N$cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "fa174e95-e2e3-4608-8aba-516edb9bc1a0"
},
"fileId": "67ISYj9t1LQ6fYxSi9x1O4",
"sync": false
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_normalMaterial": {
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
},
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 6
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 1,
"transition": 1,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 137,
"g": 161,
"b": 255,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 137,
"g": 161,
"b": 255,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 137,
"g": 161,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 137,
"g": 161,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 120,
"g": 120,
"b": 120,
"a": 200
},
"_N$normalSprite": {
"__uuid__": "9cc36e23-5b41-44ad-8512-a0a6bbf8e7b1"
},
"_N$pressedSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"pressedSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"_N$hoverSprite": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"hoverSprite": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"_N$disabledSprite": {
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
},
"_N$target": null,
"_id": ""
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 1
},
"component": "",
"_componentId": "6945fjgoidKtqvkf0+V05jV",
"handler": "onClickSelect",
"customEventData": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "9cc36e23-5b41-44ad-8512-a0a6bbf8e7b1"
},
"_type": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "6945fjgoidKtqvkf0+V05jV",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"NameLabel": {
"__id__": 3
},
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "fa174e95-e2e3-4608-8aba-516edb9bc1a0"
},
"fileId": "ee+Xvw9EZE+4ZUS7Q74tv2",
"sync": false
}
]

View File

@ -0,0 +1,8 @@
{
"ver": "1.2.5",
"uuid": "fa174e95-e2e3-4608-8aba-516edb9bc1a0",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

View File

@ -0,0 +1,343 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false
},
{
"__type__": "cc.Node",
"_name": "MultiplierItem",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_active": true,
"_components": [
{
"__id__": 5
},
{
"__id__": 7
},
{
"__id__": 8
}
],
"_prefab": {
"__id__": 9
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 210,
"height": 40
},
"_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": "Label",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
}
],
"_prefab": {
"__id__": 4
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 200,
"height": 37.8
},
"_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.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "param",
"_N$string": "param",
"_fontSize": 24,
"_lineHeight": 30,
"_enableWrapText": false,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 1,
"_N$cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "a1655a9f-d9b3-4600-bd11-0125016934c2"
},
"fileId": "67ISYj9t1LQ6fYxSi9x1O4",
"sync": false
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_normalMaterial": {
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
},
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 6
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 1,
"transition": 1,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 137,
"g": 161,
"b": 255,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 137,
"g": 161,
"b": 255,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 137,
"g": 161,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 137,
"g": 161,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 120,
"g": 120,
"b": 120,
"a": 200
},
"_N$normalSprite": {
"__uuid__": "9cc36e23-5b41-44ad-8512-a0a6bbf8e7b1"
},
"_N$pressedSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"pressedSprite": {
"__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a"
},
"_N$hoverSprite": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"hoverSprite": {
"__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952"
},
"_N$disabledSprite": {
"__uuid__": "29158224-f8dd-4661-a796-1ffab537140e"
},
"_N$target": null,
"_id": ""
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 1
},
"component": "",
"_componentId": "dbdb20upSVI1Zv4IzoDeRU3",
"handler": "onClick",
"customEventData": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "9cc36e23-5b41-44ad-8512-a0a6bbf8e7b1"
},
"_type": 1,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "dbdb20upSVI1Zv4IzoDeRU3",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"NameLabel": {
"__id__": 3
},
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "a1655a9f-d9b3-4600-bd11-0125016934c2"
},
"fileId": "ee+Xvw9EZE+4ZUS7Q74tv2",
"sync": false
}
]

View File

@ -0,0 +1,8 @@
{
"ver": "1.2.5",
"uuid": "a1655a9f-d9b3-4600-bd11-0125016934c2",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
{
"ver": "1.2.5",
"uuid": "57ab956c-6be5-4ed1-9076-aa68737091f9",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

View File

@ -0,0 +1,408 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false
},
{
"__type__": "cc.Node",
"_name": "ParamSelectItem",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 5
}
],
"_active": true,
"_components": [
{
"__id__": 8
},
{
"__id__": 10
}
],
"_prefab": {
"__id__": 11
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 145,
"height": 40
},
"_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": "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": 145,
"height": 40
},
"_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__": "9cc36e23-5b41-44ad-8512-a0a6bbf8e7b1"
},
"_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__": "bd11cbb4-2878-4444-a558-63960f0ca931"
},
"fileId": "9eZGS5RWpKlachTtOIsQ4f",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "New Label",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 6
}
],
"_prefab": {
"__id__": 7
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 145,
"height": 50.4
},
"_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.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "paramName",
"_N$string": "paramName",
"_fontSize": 24,
"_lineHeight": 30,
"_enableWrapText": false,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 1,
"_N$cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "bd11cbb4-2878-4444-a558-63960f0ca931"
},
"fileId": "4d6ZMnzSdJHauzrxuxF0uV",
"sync": false
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"_normalMaterial": {
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
},
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 9
}
],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 1,
"transition": 1,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 137,
"g": 161,
"b": 255,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 137,
"g": 161,
"b": 255,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 137,
"g": 161,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 137,
"g": 161,
"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__": 2
},
"_id": ""
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 1
},
"component": "",
"_componentId": "93f5czButJJz62NWXvqIWnj",
"handler": "onClick",
"customEventData": ""
},
{
"__type__": "93f5czButJJz62NWXvqIWnj",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"ParamName": {
"__id__": 6
},
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "bd11cbb4-2878-4444-a558-63960f0ca931"
},
"fileId": "68TO0iMPxOwo/9dKtXKedW",
"sync": false
}
]

View File

@ -0,0 +1,8 @@
{
"ver": "1.2.5",
"uuid": "bd11cbb4-2878-4444-a558-63960f0ca931",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

View File

@ -0,0 +1,525 @@
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"asyncLoadAssets": false,
"readonly": false
},
{
"__type__": "cc.Node",
"_name": "TransitionItem",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 6
},
{
"__id__": 10
}
],
"_active": true,
"_components": [
{
"__id__": 14
}
],
"_prefab": {
"__id__": 15
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 350,
"height": 40
},
"_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": "bg",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
},
{
"__id__": 4
}
],
"_prefab": {
"__id__": 5
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 137,
"g": 161,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 350,
"height": 40
},
"_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.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 40,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 350,
"_originalHeight": 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__": "dcfeb2dd-7662-49c9-8df7-3d4f208a752c"
},
"_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__": "15506099-928f-4a8a-a7f7-f308a4bd182e"
},
"fileId": "55K/vcqAVIZpVjAfJj+Fp1",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "arrow",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 7
},
{
"__id__": 8
}
],
"_prefab": {
"__id__": 9
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 74,
"height": 126
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-160,
0,
0,
0,
0,
0,
1,
0.25,
0.25,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 8,
"_left": 5.75,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 6
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "48ff94e9-95ae-47b4-a5d9-38bc3ad7d073"
},
"_type": 0,
"_sizeMode": 1,
"_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__": "15506099-928f-4a8a-a7f7-f308a4bd182e"
},
"fileId": "80v+uHAWVAO7jPPfv9JoX+",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "New Label",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_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": 320,
"height": 40.32
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-145,
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.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 40,
"_left": 30,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 320,
"_originalHeight": 0,
"_id": ""
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "Label",
"_N$string": "Label",
"_fontSize": 24,
"_lineHeight": 32,
"_enableWrapText": false,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 1,
"_N$cacheMode": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "15506099-928f-4a8a-a7f7-f308a4bd182e"
},
"fileId": "f30+KDYe5GSK30P1HjvQMY",
"sync": false
},
{
"__type__": "7372eZ1ldFLxpalJlrK/kxY",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 1
},
"_enabled": true,
"Bg": {
"__id__": 2
},
"Arrow": {
"__id__": 6
},
"Label": {
"__id__": 12
},
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "15506099-928f-4a8a-a7f7-f308a4bd182e"
},
"fileId": "5fPfYDkdVAQqNZnI/VqyX6",
"sync": false
}
]

View File

@ -0,0 +1,8 @@
{
"ver": "1.2.5",
"uuid": "15506099-928f-4a8a-a7f7-f308a4bd182e",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}

View File

@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "d57c1aa9-236d-40c1-b3a2-8fe9cf2500ae",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@ -0,0 +1,270 @@
[
{
"__type__": "cc.SceneAsset",
"_name": "",
"_objFlags": 0,
"_native": "",
"scene": {
"__id__": 1
}
},
{
"__type__": "cc.Scene",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_active": false,
"_components": [],
"_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,
"y": 0
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_is3DNode": true,
"_groupIndex": 0,
"groupIndex": 0,
"autoReleaseAssets": false,
"_id": "e6878baf-3aec-45c2-a716-acea9db4774a"
},
{
"__type__": "cc.Node",
"_name": "Canvas",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 3
}
],
"_active": true,
"_components": [
{
"__id__": 5
},
{
"__id__": 6
},
{
"__id__": 7
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1920,
"height": 1080
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
960,
540,
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": "fbAT5jwT5Eeb6mcKr5NSl/"
},
{
"__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,
443.4050067376326,
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": "82aamOvnBEdaaT/jUUtU9c"
},
{
"__type__": "cc.Camera",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
},
"_enabled": true,
"_cullingMask": 4294967295,
"_clearFlags": 7,
"_backgroundColor": {
"__type__": "cc.Color",
"r": 70,
"g": 70,
"b": 80,
"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": "27pYCI1MVJ657u8kAw3gXD"
},
{
"__type__": "cc.Canvas",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_designResolution": {
"__type__": "cc.Size",
"width": 1920,
"height": 1080
},
"_fitWidth": true,
"_fitHeight": false,
"_id": "17KQ2BFtREq5y9CVgKCWox"
},
{
"__type__": "c88fcIQORxDwo+wUWp77jYA",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_id": "26StewZblEbagM+Phc481k"
},
{
"__type__": "750342nk9dCDrHnqrriGmB+",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_id": "49MK8ebJpFHr6q6NViMphz"
}
]

View File

@ -0,0 +1,7 @@
{
"ver": "1.2.5",
"uuid": "e6878baf-3aec-45c2-a716-acea9db4774a",
"asyncLoadAssets": false,
"autoReleaseAssets": false,
"subMetas": {}
}

View File

@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "b5a2f6f4-10e3-44f2-ab8f-16eb0c1aa3cb",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "f1f329e2-8089-463b-909b-727a96fcc954",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "4d50adb5-7ad5-496a-bfdc-4d59f1630bab",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@ -0,0 +1,24 @@
const { ccclass, property } = cc._decorator;
@ccclass
export default class CanvasAdapt extends cc.Component {
protected onLoad() {
this.adapt();
// 仅web有效
cc.view.setResizeCallback(() => {
this.adapt();
});
}
private adapt() {
let resolutionRatio = cc.Canvas.instance.designResolution.width / cc.Canvas.instance.designResolution.height;
let ratio = cc.winSize.width / cc.winSize.height;
if (ratio > resolutionRatio) {
cc.Canvas.instance.fitHeight = true;
cc.Canvas.instance.fitWidth = false;
} else {
cc.Canvas.instance.fitHeight = false;
cc.Canvas.instance.fitWidth = true;
}
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "75034da7-93d7-420e-b1e7-aabae21a607e",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@ -0,0 +1,36 @@
const { ccclass, property } = cc._decorator;
/** 移动速度 px/s */
const MOVE_SPEED = 200;
/**
*
*/
@ccclass
export default class DragItem extends cc.Component {
/** 触摸开始时的boundingbox */
private _startRect: cc.Rect = null;
public get startRect() { return this._startRect; }
/** 移动动画的目标下标 */
private _toIdx: number = 0;
public onInit(idx: number) {
this._toIdx = idx;
this._startRect = this.node.getBoundingBox();
}
public moveTo(toIdx: number, toY: number) {
if (toIdx === this._toIdx) {
return;
}
this._toIdx = toIdx;
this.node.stopAllActions();
let moveTo = cc.moveTo(Math.abs(this.node.y - toY) / MOVE_SPEED, cc.v2(0, toY));
this.node.runAction(moveTo);
}
public stop() {
this.node.stopAllActions();
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "472003c1-2fb4-444f-a4cb-af3c1a70e9c1",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@ -0,0 +1,184 @@
import Tool from "../util/Tool";
import DragItem from "./DragItem";
const { ccclass, property } = cc._decorator;
/**
*
*/
@ccclass
export default class DragList extends cc.Component {
/** 进行拖拽操作的元素下标 */
private _dragIdx: number = -1;
/** 所有元素 */
private _items: DragItem[] = [];
/**
*
* @param dragIdx
* @param toIdx
*/
private _dragCall: (dragIdx: number, toIdx: number) => void = null;
/** 调用拖拽回调传入的this对象 */
private _target: any = null;
private _layout: cc.Layout = null;
/** 元素容器 */
public get layout() {
if (!this._layout) {
this._layout = this.getComponent(cc.Layout);
}
return this._layout;
}
/** 拖拽开关 */
public canDrag: boolean = true;
protected onLoad() {
this.node.on(cc.Node.EventType.TOUCH_START, this.onTouchStart, this);
this.node.on(cc.Node.EventType.TOUCH_MOVE, this.onTouchMove, this);
this.node.on(cc.Node.EventType.TOUCH_END, this.onTouchEnd, this);
this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.onTouchEnd, this);
}
private onTouchStart(event: cc.Event.EventTouch) {
if (!this.canDrag || this.node.childrenCount <= 1) {
this._dragIdx = -1;
return;
}
let pos = this.node.convertToNodeSpaceAR(event.getLocation());
this._dragIdx = this.getItemIdx(pos);
if (this._dragIdx < 0) {
return;
}
this.layout.enabled = false;
this._items = [];
this.node.children.forEach((e: cc.Node, idx: number) => {
let item = e.getComponent(DragItem);
if (!item) {
item = e.addComponent(DragItem);
}
item.onInit(idx);
this._items.push(item);
});
this._items[this._dragIdx].node.setSiblingIndex(this.node.childrenCount - 1);
}
private onTouchMove(event: cc.Event.EventTouch) {
if (this._dragIdx < 0) {
return;
}
let pos = this.node.convertToNodeSpaceAR(event.getLocation());
// 进行拖拽操作
let yMax = this._items[0].startRect.center.y;
let yMin = this._items[this._items.length - 1].startRect.center.y;
this._items[this._dragIdx].node.y = cc.misc.clampf(pos.y, yMin, yMax);
let curIdx = this.getCurIdx(pos);
if (curIdx < this._dragIdx) {
this._items.forEach((item: DragItem, idx: number) => {
if (idx === this._dragIdx) {
return;
}
if (Tool.inRange(curIdx, this._dragIdx - 1, idx)) {
item.moveTo(idx + 1, this._items[idx + 1].startRect.center.y);
} else {
item.moveTo(idx, this._items[idx].startRect.center.y);
}
});
} else {
this._items.forEach((item: DragItem, idx: number) => {
if (idx === this._dragIdx) {
return;
}
if (Tool.inRange(this._dragIdx + 1, curIdx, idx)) {
item.moveTo(idx - 1, this._items[idx - 1].startRect.center.y);
} else {
item.moveTo(idx, this._items[idx].startRect.center.y);
}
});
}
}
private onTouchEnd(event: cc.Event.EventTouch) {
if (this._dragIdx < 0) {
return;
}
let pos = this.node.convertToNodeSpaceAR(event.getLocation());
// 结束拖拽操作
let curIdx = this.getCurIdx(pos);
this._items[this._dragIdx].node.setSiblingIndex(curIdx);
this._items.forEach((item: DragItem) => {
item.stop();
});
// 触发回调
if (curIdx !== this._dragIdx && this._dragCall) {
if (this._target)
this._dragCall.call(this._target, this._dragIdx, curIdx);
else
this._dragCall(this._dragIdx, curIdx);
}
// 重置
this.layout.enabled = true;
this.layout.updateLayout();
this._dragIdx = -1;
this._items = [];
}
/**
*
*/
private getItemIdx(pos: cc.Vec2) {
for (let i = 0; i < this.node.childrenCount; i++) {
let item = this.node.children[i];
if (item.getBoundingBox().contains(pos)) {
return i;
}
}
return -1;
}
/**
*
*/
private getCurIdx(pos: cc.Vec2) {
let yMax = this._items[0].startRect.center.y;
let yMin = this._items[this._items.length - 1].startRect.center.y;
if (pos.y >= yMax) {
return 0;
} else if (pos.y <= yMin) {
return this._items.length - 1;
}
let idx: number = 0;
let minDis: number = Math.abs(this._items[0].startRect.center.y - pos.y);
for (let i = 1; i < this._items.length; i++) {
let item = this._items[i];
let dis = Math.abs(item.startRect.center.y - pos.y);
if (dis < minDis) {
idx = i;
minDis = dis;
} else {
break;
}
}
return idx;
}
/**
*
*/
public setDragCall(call: (dragIdx: number, toIdx: number) => void, target: any) {
this._dragCall = call;
this._target = target;
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "5b5cd3c9-8509-4ab7-82d7-50cc0d99ffe2",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@ -0,0 +1,72 @@
import Events, { EventName } from "../util/Events";
const { ccclass, property } = cc._decorator;
/**
*
*/
@ccclass
export default class ResizeArea extends cc.Component {
@property(cc.Widget) Target: cc.Widget = null;
@property(cc.Vec2) Limit: cc.Vec2 = cc.v2();
@property({ tooltip: CC_DEV && '节点对齐的是否为左侧' }) isLeft: boolean = true;
private _canvas: HTMLElement = null;
private _startPos: cc.Vec2 = null;
private _startWidth: number = 0;
private _updateDirty: boolean = false;
protected onLoad() {
this._canvas = document.getElementById('GameCanvas');
this.node.on(cc.Node.EventType.TOUCH_START, this.onTouchStart, this);
this.node.on(cc.Node.EventType.TOUCH_MOVE, this.onTouchMove, this);
this.node.on(cc.Node.EventType.MOUSE_ENTER, this.onMouseEnter, this);
this.node.on(cc.Node.EventType.MOUSE_LEAVE, this.onMouseLeave, this);
}
protected lateUpdate() {
if (!this._updateDirty) {
return;
}
this._updateDirty = false;
this.Target.left = 0;
this.Target.right = 0;
this.Target.updateAlignment();
Events.emit(EventName.RESIZE, this.Target.node);
this.updateWidget(this.Target.node);
}
private onTouchStart(event: cc.Event.EventTouch) {
this._canvas.style.cursor = 'w-resize';
this._startPos = event.getLocation();
this._startWidth = this.Target.node.width;
}
private onTouchMove(event: cc.Event.EventTouch) {
let delt = event.getLocation().x - this._startPos.x;
if (!this.isLeft) {
delt = -delt;
}
this.Target.node.width = cc.misc.clampf(this._startWidth + delt, this.Limit.x, this.Limit.y);
this._updateDirty = true;
}
private onMouseEnter(event: cc.Event.EventMouse) {
this._canvas.style.cursor = 'w-resize';
}
private onMouseLeave(event: cc.Event.EventMouse) {
this._canvas.style.cursor = 'default ';
}
private updateWidget(node: cc.Node) {
node.children.forEach((c) => {
let widget = c.getComponent(cc.Widget);
widget && widget.updateAlignment();
this.updateWidget(c);
});
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "ea7dfc04-311b-4106-ac76-07793dca50ae",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "98542223-77d4-420b-9a90-26bc5ab0b531",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@ -0,0 +1,242 @@
/**
*
*/
export enum EventName {
/** 调节节点大小 */
RESIZE,
/** 删除参数 */
PARAM_DELETE,
/** 参数名更改 */
PARAM_NAME_CHANGED,
/** 选中ParamItem */
PARAM_SELECT,
/** 设置状态机视图的显示 */
SET_CUR_STATE_MACHINE,
/** 状态名更改 */
STATE_NAME_CHANGED,
/** AnyState改变坐标 */
ANY_STATE_MOVE,
/** 状态机名更改 */
STATE_MACHINE_NAME_CHANGED,
/** 父状态机节点改变坐标 */
UP_STATE_MACHINE_MOVE,
/** 选择连线连向子状态机内部的状态 */
LINE_TO_MACHINE_STATE,
/** 删除line */
LINE_DELETE,
/** 新增transition */
TRANSITION_ADD,
/** 删除transition */
TRANSITION_DELETE,
/** 点击按钮选中TransitionItem */
TRANSITION_SELECT,
/** 点击按钮选中ConditionItem */
CONDITION_SELECT,
/** 选中multiplier参数 */
MULTIPLIER_SELECT,
/** 隐藏inspector显示的内容 */
INSPECTOR_HIDE,
/** 显示unit信息 */
INSPECTOR_SHOW_UNIT,
/** 显示line信息 */
INSPECTOR_SHOW_LINE,
/** 关闭菜单层 */
CLOSE_MENU,
/** 显示状态机界面右键菜单 */
SHOW_RIGHT_MENU,
/** 显示连线目标状态机内部所有状态选择界面 */
SHOW_LINE_TO_List,
/** 显示添加参数时选择界面 */
SHOW_PARAM_ADD,
/** 显示condition的参数选择界面 */
SHOW_PARAM_SELECT,
/** 显示condition的logic选项 */
SHOW_LOGIC,
/** 显示multiplier选择界面 */
SHOW_MULTIPLIER,
};
/**
* targetOn使用
* @param event
*/
export function preloadEvent(event: EventName) {
return function (target: any, funcName: string, desc: PropertyDescriptor) {
let arr = Events.classMap.get(target.constructor);
if (arr === undefined) {
arr = [];
Events.classMap.set(target.constructor, arr);
} else {
let find = arr.find((e) => {
return e.event === event && e.funcName === funcName;
});
if (find) {
cc.error(`event: ${EventName[event]} 重复载入`);
return;
}
}
arr.push({
event: event,
funcName: funcName
});
};
}
/**
*
*/
type Listener = (arg: any) => void;
/**
*
*/
export default class Events {
/**
*
*/
private static _eventsMap: Map<EventName, Map<Object, Listener[]>> = new Map();
/**
*
*/
public static classMap: Map<Function, Array<{ event: EventName, funcName: string }>> = new Map();
/**
* target构造函数预先绑定的所有事件
* @param target
* @param onSuper
*/
public static targetOn(target: Object, onSuper: boolean = true) {
if (onSuper) {
this.classMap.forEach((value: Array<{ event: EventName, funcName: string }>, key: Function) => {
if (target instanceof key) {
value.forEach((e) => {
this.on(e.event, target[e.funcName], target);
});
}
});
} else {
let arr = this.classMap.get(target.constructor);
if (arr) {
arr.forEach((e) => {
this.on(e.event, target[e.funcName], target);
});
}
}
}
/**
*
* @param event
* @param listener
* @param target
*/
public static on(event: EventName, listener: Listener, target: Object) {
if (!listener || !target) {
cc.error(`event: ${EventName[event]} listener或target不能为空`);
return;
}
let map: Map<Object, Listener[]> = this._eventsMap.get(event);
let list: Listener[] = [];
if (map === undefined) {
map = new Map();
map.set(target, list);
this._eventsMap.set(event, map);
} else {
list = map.get(target);
if (list === undefined) {
list = [];
map.set(target, list);
} else {
let result = list.find((e) => { return e === listener });
if (result) {
cc.error(`event: ${EventName[event]} 重复注册`);
return;
}
}
}
list.push(listener);
}
/**
*
* @param event
* @param listener
* @param target
*/
public static off(event: EventName, listener: Listener, target: Object) {
if (!listener || !target) {
cc.error(`event: ${EventName[event]} listener或target不能为空`);
return;
}
let map: Map<Object, Listener[]> = this._eventsMap.get(event);
if (map === undefined) {
cc.error(`event: ${EventName[event]} 未注册该事件`);
return;
}
let list: Listener[] = map.get(target);
if (list === undefined) {
cc.error(`event: ${EventName[event]} target上未注册该事件`);
return;
}
let index = list.findIndex((e) => { return e === listener; });
if (index < 0) {
cc.error(`event: ${EventName[event]} target上未以该listener注册该事件`);
return;
}
list.splice(index, 1);
if (list.length <= 0) {
map.delete(target);
map.size <= 0 && this._eventsMap.delete(event);
}
}
/**
* target上注册的所有事件
* @param target
*/
public static targetOff(target: Object) {
if (!target) {
cc.error(`event: ${target} target不能为空`);
return;
}
this._eventsMap.forEach((map, event) => {
map.delete(target);
map.size <= 0 && this._eventsMap.delete(event);
});
}
/**
*
* @param event
* @param args
*/
public static emit(event: EventName, ...args: any[]) {
let map: Map<Object, Listener[]> = this._eventsMap.get(event);
if (map === undefined) {
cc.warn(`event: ${EventName[event]} 未注册该事件`);
return;
}
map.forEach((list, target) => {
list.forEach((listener) => {
listener.call(target, ...args);
});
});
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "438a264f-5181-4f14-8330-5b700ab8eac7",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@ -0,0 +1,110 @@
/**
* 使
*/
export interface RecycleNode {
/**
*
*/
unuse(): void;
/**
*
*/
reuse(): void;
}
/**
*
*/
export default class RecyclePool {
private static _poolMap: Map<{ prototype: cc.Component }, cc.Node[]> = new Map();
/**
*
*/
public static size(type: { prototype: cc.Component }): number {
let list = this._poolMap.get(type);
if (list === undefined) {
return 0;
}
return list.length;
}
/**
*
*/
public static clear(type: { prototype: cc.Component }) {
let list = this._poolMap.get(type);
if (list === undefined) {
return;
}
let count = list.length;
for (let i = 0; i < count; ++i) {
list[i].destroy();
}
list.length = 0;
this._poolMap.delete(type);
}
/**
*
*/
public static clearAll() {
this._poolMap.forEach((list: cc.Node[]) => {
list.forEach((node: cc.Node) => {
node.destroy();
});
});
this._poolMap.clear();
}
/**
*
*/
public static get(type: { prototype: cc.Component }): cc.Node {
let list = this._poolMap.get(type);
if (list === undefined || list.length <= 0) {
return null;
}
let last = list.length - 1;
let node = list[last];
list.length = last;
// Invoke pool handler
let handler: any = node.getComponent(type);
if (handler && handler.reuse) {
handler.reuse();
}
return node;
}
/**
*
*/
public static put(type: { prototype: cc.Component }, node: cc.Node) {
if (!node) {
cc.error(`[RecyclePool.put] error: 传入节点为空`);
return;
}
let list = this._poolMap.get(type);
if (list === undefined) {
list = [];
this._poolMap.set(type, list);
} else if (list.indexOf(node) !== -1) {
cc.error(`[RecyclePool.put] error: 不可将节点重复放入节点池中`);
return;
}
node.removeFromParent(false);
// Invoke pool handler
let handler: any = node.getComponent(type);
if (handler && handler.unuse) {
handler.unuse();
}
list.push(node);
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "2650e9f4-6f08-4845-bf8b-31afece7a66b",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@ -0,0 +1,68 @@
/**
*
*/
export default class Res {
/**
*
*/
private static _cacheMap: Map<string, cc.Asset> = new Map();
/**
*
* @param url
*/
public static getLoaded(url: string): any {
let asset = this._cacheMap.get(url);
if (asset === undefined) {
cc.error(`[Res.getLoaded] error: 资源未加载`);
return null;
}
return asset;
}
/**
* resources文件夹下单个资源
* @param url
* @param type
*/
public static async load(url: string, type: typeof cc.Asset): Promise<any> {
let asset = this._cacheMap.get(url);
if (asset) {
return asset;
}
return await new Promise((resolve, reject) => {
cc.loader.loadRes(url, type, (error: Error, resource: cc.Asset) => {
if (error) {
cc.error(`[Res.load] error: ${error}`);
resolve(null);
} else {
this._cacheMap.set(url, resource);
resolve(resource);
}
});
});
}
/**
* resources文件夹下某个文件夹内全部资源
* @param url
* @param type
*/
public static async loadDir(url: string, type: typeof cc.Asset): Promise<any[]> {
return await new Promise((resolve, reject) => {
cc.loader.loadResDir(url, type, (error: Error, resource: any[], urls: string[]) => {
if (error) {
cc.error(`[Res.loadDir] error: ${error}`);
resolve([]);
} else {
urls.forEach((v: string, i: number) => {
this._cacheMap.set(v, resource[i]);
});
resolve(resource);
}
});
});
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "1d8423c7-71dd-417b-8df3-8b9c83e1496b",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@ -0,0 +1,108 @@
/**
*
*/
export default class Tool {
/**
*
* @param arr
*/
public static randArray<T>(arr: Array<T>): T {
if (arr.length <= 0) {
return null;
}
return arr[this.randInt(0, arr.length - 1)];
}
/**
* [min, max]
* @param min
* @param max
*/
public static randInt(min: number, max: number) {
min = Math.ceil(min);
max = Math.floor(max);
if (min >= max) {
return max;
}
return Math.floor(Math.random() * (max - min + 1)) + min;
}
/**
* [min, max)
* @param min
* @param max
*/
public static randFloat(min: number, max: number) {
if (min >= max) {
return max;
}
return Math.random() * (max - min) + min;
}
/**
* value是否在 [min, max]
* @param min
* @param max
* @param value
* @param includeEdge min和max
*/
public static inRange(min: number, max: number, value: number, includeEdge: boolean = true) {
return includeEdge ? value >= min && value <= max : value > min && value < max;
}
/**
*
*/
public static arrayHas<T>(arr: T[], ele: T): boolean {
let idx = arr.findIndex((e) => { return e === ele; });
return idx >= 0;
}
/**
*
*/
public static arraySwap<T>(arr: T[], idx1: number, idx2: number) {
if (idx1 === idx2 || !this.inRange(0, arr.length - 1, idx1) || !this.inRange(0, arr.length - 1, idx2)) {
return;
}
[arr[idx1], arr[idx2]] = [arr[idx2], arr[idx1]];
}
/**
* fromIdx位置移到toIdx位置
*/
public static arrayMove<T>(arr: T[], fromIdx: number, toIdx: number) {
if (fromIdx === toIdx || !this.inRange(0, arr.length - 1, fromIdx) || !this.inRange(0, arr.length - 1, toIdx)) {
return;
}
let from: T[] = arr.splice(fromIdx, 1);
arr.splice(toIdx, 0, from[0]);
}
/**
*
* @param canRepeat false
* @returns
*/
public static arrayAdd<T>(arr: T[], ele: T, canRepeat: boolean = false): boolean {
if (!canRepeat && this.arrayHas(arr, ele)) {
return false;
}
arr.push(ele);
return true;
}
/**
*
* @returns
*/
public static arrayDelete<T>(arr: T[], ele: T): boolean {
let idx = arr.findIndex((e) => { return e === ele; });
if (idx === -1) {
return false;
}
arr.splice(idx, 1);
return true
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "8a83b733-dd4e-4b3d-aa1e-121f58ba4f88",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "e3cf2cb1-5584-4eff-bc09-d578df78b66c",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@ -0,0 +1,86 @@
/** 参数类型 */
export enum ParamType {
COMPLETE = 0,
BOOLEAN = 1,
NUMBER = 2,
TRIGGER = 3,
AUTO_TRIGGER = 4
}
/** 逻辑类型 */
export enum LogicType {
EQUAL = 0,
NOTEQUAL = 1,
GREATER = 2,
LESS = 3,
GREATER_EQUAL = 4,
LESS_EQUAL = 5
}
/** 调用时机 */
export enum CheckType {
/** 每帧调用 */
CHECK_ON_UPDATE = 1,
/** 动画结束 */
CHECK_ON_COMPLETE = 2,
CHECK_ON_TRIGGER = 3
}
/**
*
*/
export interface ParameterData {
/** 参数名 */
param: string;
/** 参数类型 */
type: ParamType;
/** 初始值 */
init: number;
}
/**
*
*/
export interface StateData {
/** 状态名 */
state: string;
/** 动画名 */
motion: string;
/** 动画播放速度 */
speed: number;
/** number类型的参数名用于speed的乘积 */
multiplier: string;
/** 动画是否循环播放 */
loop: boolean;
/** 连线 */
transitions: TransitionData[];
}
/**
* 线
*/
export interface TransitionData {
/** 目标状态 */
toState: string;
/** 是否等动画播放完跳转 */
hasExitTime: boolean;
/** 条件 */
conditions: ConditionData[];
}
/**
*
*/
export interface ConditionData {
/** 此条件对应的参数名 */
param: string;
/** 此条件对应的值 */
value: number;
/** 此条件与值比较的逻辑 */
logic: LogicType;
}
/**
*
*/
export const ANIMATOR_VERSION = '1.0.0';

View File

@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "19b66911-9936-4b92-a13e-de8e933f7fed",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@ -0,0 +1,26 @@
/**
* resources单个资源路径
*/
export const ResUrl = {
PREFAB: {
EDITOR: 'prefab/Editor',
STATE_NODE: 'prefab/StateNode',
STATE_MACHINE_NODE: 'prefab/StateMachineNode',
LINE: 'prefab/Line',
BAR_ITEM: 'prefab/item/BarItem',
TRANSITION_ITEM: 'prefab/item/TransitionItem',
CONDITION_ITEM: 'prefab/item/ConditionItem',
PARAM_ITEM: 'prefab/item/ParamItem',
PARAM_SELECT_ITEM: 'prefab/item/ParamSelectItem',
LINE_TO_SUB_ITEM: 'prefab/item/LineToSubItem',
MULTIPLIER_ITEM: 'prefab/item/MultiplierItem'
}
}
/**
* resources文件夹路径
*/
export const ResDirUrl = {
PREFAB: 'prefab/'
}

View File

@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "e31cd169-3e95-4915-a257-e11daf14f81e",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "0032de99-30c2-4717-8591-e6ef5510b760",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@ -0,0 +1,98 @@
import FsmCtr from "./fsm/FsmCtr";
import InspectorCtr from "./inspector/InspectorCtr";
import Menu from "./menu/Menu";
import ParamCtr from "./parameters/ParamCtr";
const { ccclass, property } = cc._decorator;
@ccclass
export default class Editor extends cc.Component {
@property(FsmCtr) Fsm: FsmCtr = null;
@property(InspectorCtr) Inspector: InspectorCtr = null;
@property(ParamCtr) ParamCtr: ParamCtr = null;
@property(Menu) Menu: Menu = null;
public static Inst: Editor = null;
/** 按下的按键 */
private _keySet: Set<cc.macro.KEY> = new Set();
protected onLoad() {
cc.systemEvent.on(cc.SystemEvent.EventType.KEY_DOWN, this.onKeyDown, this);
cc.systemEvent.on(cc.SystemEvent.EventType.KEY_UP, this.onKeyUp, this);
}
protected onDestroy() {
cc.systemEvent.off(cc.SystemEvent.EventType.KEY_DOWN, this.onKeyDown, this);
cc.systemEvent.off(cc.SystemEvent.EventType.KEY_UP, this.onKeyUp, this);
}
private onKeyDown(event: cc.Event.EventKeyboard) {
this._keySet.add(event.keyCode);
switch (event.keyCode) {
case cc.macro.KEY.s:
if (this._keySet.has(cc.macro.KEY.ctrl)) {
// 保存工程文件
this.saveProject();
}
break;
case cc.macro.KEY.e:
if (this._keySet.has(cc.macro.KEY.ctrl)) {
// 导出状态机runtime数据
this.exportRuntimeData();
}
break;
case cc.macro.KEY.Delete:
// 删除
this.Fsm.deleteCurUnit();
this.Fsm.deleteCurLine();
default:
break;
}
}
private onKeyUp(event: cc.Event.EventKeyboard) {
this._keySet.delete(event.keyCode);
}
private saveProject() {
let data: any = this.Fsm.exportProject();
data.parameters = this.ParamCtr.export();
this.save('animator.json', data);
}
private exportRuntimeData() {
let data: any = this.Fsm.exportRuntimeData();
data.parameters = this.ParamCtr.export();
this.save('runtimeData.json', data);
}
private save(fileName: string, data: any) {
// 存储文件
let content = JSON.stringify(data);
let eleLink = document.createElement('a');
eleLink.download = `${fileName}`;
eleLink.style.display = 'none';
// 字符内容转变成blob地址
let blob = new Blob([content]);
eleLink.href = URL.createObjectURL(blob);
// 触发点击
document.body.appendChild(eleLink);
eleLink.click();
// 移除
document.body.removeChild(eleLink);
}
/**
*
*/
public importProject(data: any) {
if (!data.hasOwnProperty('animator')) {
return;
}
this.ParamCtr.import(data.parameters);
this.Fsm.importProject(data);
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "2ddcfacf-d360-4822-844d-cb7bc61f0968",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@ -0,0 +1,7 @@
{
"ver": "1.0.1",
"uuid": "336c3839-4f7a-4def-b2db-0b89b2b72f99",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}

View File

@ -0,0 +1,39 @@
import { ConditionData, LogicType } from "../../constant/BaseConst";
import ParamItem from "../parameters/ParamItem";
/**
*
*/
export default class Condition {
private _paramItem: ParamItem = null;
public get paramItem() { return this._paramItem; }
public value: number = 0;
public logic: LogicType = LogicType.EQUAL;
constructor(paramItem: ParamItem) {
this.reset(paramItem);
}
/**
*
*/
public destroy() {
}
public reset(paramItem: ParamItem) {
this._paramItem = paramItem;
this.value = 0;
this.logic = LogicType.EQUAL;
}
public getConditionData() {
let data: ConditionData = {
param: this._paramItem.paramName,
value: this.value,
logic: this.logic
};
return data;
}
}

View File

@ -0,0 +1,9 @@
{
"ver": "1.0.5",
"uuid": "2ad76e07-2aca-40af-8bb1-3a90782bf375",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}

View File

@ -0,0 +1,224 @@
import Events, { EventName } from "../../common/util/Events";
import Tool from "../../common/util/Tool";
import { TransitionData } from "../../constant/BaseConst";
import ParamItem from "../parameters/ParamItem";
import StateMachine from "./StateMachine";
import Transition from "./Transition";
/**
*
*/
export default class State {
//#region 静态成员
/** 记录除AnyState外所有状态数据 */
private static _allStates: Set<State> = new Set();
public static getAllStates() {
return this._allStates;
}
private static add(s: State) {
this._allStates.add(s);
}
private static delete(s: State) {
this._allStates.delete(s);
}
/**
*
* @param state state
* @param name
*/
private static getUniqueName(state: State, name: string = 'State') {
let index = 0;
let findName = false;
while (!findName) {
findName = true;
let values = this._allStates.values();
for (let i = 0; i < this._allStates.size; i++) {
let s: State = values.next().value;
if (s === state) {
continue;
}
if (s._name === `${name}${index > 0 ? index : ''}`) {
index++;
findName = false;
break;
}
}
}
return `${name}${index > 0 ? index : ''}`;
}
/**
* State数量AnyState
*/
public static getStateNum(): number {
return this._allStates.size;
}
/**
* State
*/
public static getRandState(): State {
if (this._allStates.size === 0) {
return null;
}
let values = this._allStates.values();
return values.next().value;
}
//#endregion
private _name: string = '';
/** 状态名(唯一) */
public get name() { return this._isAnyState ? 'AnyState' : this._name; }
public set name(v: string) {
if (this._isAnyState || this._name === v) {
return;
}
this._name = State.getUniqueName(this, v);
Events.emit(EventName.STATE_NAME_CHANGED, this);
}
/** 动画名 */
public motion: string = '';
private _speed: number = 1;
/** 动画播放速度 */
public get speed() { return this._speed; }
public set speed(v: number) {
this._speed = v;
}
/** 动画播放速度混合的number类型参数 */
public multiplierParam: ParamItem = null;
/** 动画是否循环播放 */
public loop: boolean = false;
/** 转向别的状态的转换数据 */
private _transitions: Transition[] = [];
private _position: cc.Vec2 = cc.v2(0, 0);
/** 此节点在父状态机中的坐标 */
public get position() { return this._position; }
private _upStateMachine: StateMachine = null;
/** 父状态机 */
public get upStateMachine() { return this._upStateMachine; }
private _isAnyState: boolean = false;
/** 是否为AnyState */
public get isAnyState() { return this._isAnyState; }
constructor(upStateMachine: StateMachine, isAnyState: boolean) {
this._isAnyState = isAnyState;
if (!this._isAnyState) {
this._upStateMachine = upStateMachine;
this._upStateMachine.add(this);
this._name = State.getUniqueName(this);
State.add(this);
}
}
/**
*
*/
public destroy() {
if (!this._isAnyState) {
State.delete(this);
}
this._transitions.forEach((e) => {
e.destroy();
});
this._transitions.length = 0;
}
public changeUpStateMachine(upStateMachine: StateMachine) {
if (!this._isAnyState) {
this._upStateMachine.delete(this, false);
this._upStateMachine = upStateMachine;
this._upStateMachine.add(this);
}
}
public addTransition(toState: State): Transition {
let transition = new Transition(this, toState);
Tool.arrayAdd(this._transitions, transition);
return transition;
}
public deleteTransition(transition: Transition) {
if (Tool.arrayDelete(this._transitions, transition)) {
transition.destroy();
}
}
/**
* Transition
* @param to
* @param cur
*/
public getTransitions(to: State | StateMachine = null, cur: StateMachine = null): Transition[] {
let transitionArr = [];
if (to instanceof State) {
this._transitions.forEach((e) => {
if (to === e.toState) {
transitionArr.push(e);
}
});
} else if (to instanceof StateMachine) {
if (to.has(this)) {
if (!cur) {
cc.error(`[State.getTransitions] error: cur is null`);
return transitionArr;
}
this._transitions.forEach((e) => {
if (!cur.has(e.toState)) {
transitionArr.push(e);
}
});
} else {
this._transitions.forEach((e) => {
if (to.has(e.toState)) {
transitionArr.push(e);
}
});
}
} else {
transitionArr = this._transitions;
}
return transitionArr;
}
/**
* transition数组中元素
*/
public swapTransition(idx1: number, idx2: number) {
Tool.arraySwap(this._transitions, idx1, idx2);
}
/**
*
*/
public moveTransition(fromIdx: number, toIdx: number) {
Tool.arrayMove(this._transitions, fromIdx, toIdx);
}
public getMultiplierName() {
return this.multiplierParam ? this.multiplierParam.paramName : '';
}
public setPosition(x: number | cc.Vec2 | cc.Vec3, y: number = 0) {
this._position = cc.v2(x, y);
}
public getAllTransitionData(): TransitionData[] {
let arr: TransitionData[] = [];
this.getTransitions().forEach((e) => {
arr.push(e.getTransitionData());
});
return arr;
}
}

Some files were not shown because too many files have changed in this diff Show More