mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-26 18:26:23 +00:00
提交新手引导
This commit is contained in:
@@ -7,10 +7,10 @@
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"isBundle": true,
|
||||
"bundleConfigID": "514cB4o1lDLr4YHgRwsEVt",
|
||||
"bundleName": "resources",
|
||||
"priority": 8,
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
"isRemoteBundle": {},
|
||||
"bundleConfigID": "514cB4o1lDLr4YHgRwsEVt"
|
||||
}
|
||||
}
|
||||
|
@@ -147,7 +147,7 @@
|
||||
},
|
||||
"_depth": 1,
|
||||
"_stencil": 0,
|
||||
"_clearFlags": 7,
|
||||
"_clearFlags": 6,
|
||||
"_rect": {
|
||||
"__type__": "cc.Rect",
|
||||
"x": 0,
|
||||
|
9
JisolGameCocos/assets/resources/config/TbGGlobalEnum.ts
Normal file
9
JisolGameCocos/assets/resources/config/TbGGlobalEnum.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
//全局表枚举
|
||||
export enum TbGGlobalEnum{
|
||||
|
||||
SELECT_PET_ID = 70001, //选择宠物配置表Id
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "d9c2c57c-b824-4392-b668-64d669f5d31d",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@@ -12,6 +12,39 @@
|
||||
|
||||
|
||||
|
||||
export namespace TB {
|
||||
export class TbGGlobal {
|
||||
|
||||
constructor(_json_: any) {
|
||||
if (_json_.id === undefined) { throw new Error() }
|
||||
this.id = _json_.id
|
||||
if (_json_.args === undefined) { throw new Error() }
|
||||
this.args = _json_.args
|
||||
if (_json_.tig === undefined) { throw new Error() }
|
||||
this.tig = _json_.tig
|
||||
}
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
readonly id: number
|
||||
/**
|
||||
* 全局表参数
|
||||
*/
|
||||
readonly args: string
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
readonly tig: string
|
||||
|
||||
resolve(tables:Tables)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
export namespace TB {
|
||||
export class TbGRole {
|
||||
|
||||
@@ -57,69 +90,6 @@ export class TbGRole {
|
||||
}
|
||||
|
||||
|
||||
export namespace TB {
|
||||
export class TbGMap {
|
||||
|
||||
constructor(_json_: any) {
|
||||
if (_json_.id === undefined) { throw new Error() }
|
||||
this.id = _json_.id
|
||||
if (_json_.mapName === undefined) { throw new Error() }
|
||||
this.mapName = _json_.mapName
|
||||
if (_json_.map1 === undefined) { throw new Error() }
|
||||
this.map1 = _json_.map1
|
||||
if (_json_.map2 === undefined) { throw new Error() }
|
||||
this.map2 = _json_.map2
|
||||
if (_json_.map3 === undefined) { throw new Error() }
|
||||
this.map3 = _json_.map3
|
||||
if (_json_.map1OffsetY === undefined) { throw new Error() }
|
||||
this.map1OffsetY = _json_.map1OffsetY
|
||||
if (_json_.map2OffsetY === undefined) { throw new Error() }
|
||||
this.map2OffsetY = _json_.map2OffsetY
|
||||
if (_json_.map3OffsetY === undefined) { throw new Error() }
|
||||
this.map3OffsetY = _json_.map3OffsetY
|
||||
}
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
readonly id: number
|
||||
/**
|
||||
* 地图名称
|
||||
*/
|
||||
readonly mapName: string
|
||||
/**
|
||||
* 地图1(前)
|
||||
*/
|
||||
readonly map1: string
|
||||
/**
|
||||
* 地图2(后)
|
||||
*/
|
||||
readonly map2: string
|
||||
/**
|
||||
* 地图3(天空)
|
||||
*/
|
||||
readonly map3: string
|
||||
/**
|
||||
* 地图1(前) 偏移量Y
|
||||
*/
|
||||
readonly map1OffsetY: number
|
||||
/**
|
||||
* 地图2(后) 偏移量Y
|
||||
*/
|
||||
readonly map2OffsetY: number
|
||||
/**
|
||||
* 地图2(后) 偏移量Y
|
||||
*/
|
||||
readonly map3OffsetY: number
|
||||
|
||||
resolve(tables:Tables)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
export namespace TB {
|
||||
export class TbGRoleAttack {
|
||||
|
||||
@@ -237,6 +207,101 @@ export class TbGRoleSkill {
|
||||
}
|
||||
|
||||
|
||||
export namespace TB {
|
||||
export class TbGMap {
|
||||
|
||||
constructor(_json_: any) {
|
||||
if (_json_.id === undefined) { throw new Error() }
|
||||
this.id = _json_.id
|
||||
if (_json_.mapName === undefined) { throw new Error() }
|
||||
this.mapName = _json_.mapName
|
||||
if (_json_.map1 === undefined) { throw new Error() }
|
||||
this.map1 = _json_.map1
|
||||
if (_json_.map2 === undefined) { throw new Error() }
|
||||
this.map2 = _json_.map2
|
||||
if (_json_.map3 === undefined) { throw new Error() }
|
||||
this.map3 = _json_.map3
|
||||
if (_json_.map1OffsetY === undefined) { throw new Error() }
|
||||
this.map1OffsetY = _json_.map1OffsetY
|
||||
if (_json_.map2OffsetY === undefined) { throw new Error() }
|
||||
this.map2OffsetY = _json_.map2OffsetY
|
||||
if (_json_.map3OffsetY === undefined) { throw new Error() }
|
||||
this.map3OffsetY = _json_.map3OffsetY
|
||||
}
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
readonly id: number
|
||||
/**
|
||||
* 地图名称
|
||||
*/
|
||||
readonly mapName: string
|
||||
/**
|
||||
* 地图1(前)
|
||||
*/
|
||||
readonly map1: string
|
||||
/**
|
||||
* 地图2(后)
|
||||
*/
|
||||
readonly map2: string
|
||||
/**
|
||||
* 地图3(天空)
|
||||
*/
|
||||
readonly map3: string
|
||||
/**
|
||||
* 地图1(前) 偏移量Y
|
||||
*/
|
||||
readonly map1OffsetY: number
|
||||
/**
|
||||
* 地图2(后) 偏移量Y
|
||||
*/
|
||||
readonly map2OffsetY: number
|
||||
/**
|
||||
* 地图2(后) 偏移量Y
|
||||
*/
|
||||
readonly map3OffsetY: number
|
||||
|
||||
resolve(tables:Tables)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export class TbGGlobal{
|
||||
private _dataMap: Map<number, TB.TbGGlobal>
|
||||
private _dataList: TB.TbGGlobal[]
|
||||
constructor(_json_: any) {
|
||||
this._dataMap = new Map<number, TB.TbGGlobal>()
|
||||
this._dataList = []
|
||||
for(var _json2_ of _json_) {
|
||||
let _v: TB.TbGGlobal
|
||||
_v = new TB.TbGGlobal(_json2_)
|
||||
this._dataList.push(_v)
|
||||
this._dataMap.set(_v.id, _v)
|
||||
}
|
||||
}
|
||||
|
||||
getDataMap(): Map<number, TB.TbGGlobal> { return this._dataMap; }
|
||||
getDataList(): TB.TbGGlobal[] { return this._dataList; }
|
||||
|
||||
get(key: number): TB.TbGGlobal | undefined { return this._dataMap.get(key); }
|
||||
|
||||
resolve(tables:Tables)
|
||||
{
|
||||
for(let data of this._dataList)
|
||||
{
|
||||
data.resolve(tables)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export class TbGRole{
|
||||
@@ -271,38 +336,6 @@ export class TbGRole{
|
||||
|
||||
|
||||
|
||||
export class TbGMap{
|
||||
private _dataMap: Map<number, TB.TbGMap>
|
||||
private _dataList: TB.TbGMap[]
|
||||
constructor(_json_: any) {
|
||||
this._dataMap = new Map<number, TB.TbGMap>()
|
||||
this._dataList = []
|
||||
for(var _json2_ of _json_) {
|
||||
let _v: TB.TbGMap
|
||||
_v = new TB.TbGMap(_json2_)
|
||||
this._dataList.push(_v)
|
||||
this._dataMap.set(_v.id, _v)
|
||||
}
|
||||
}
|
||||
|
||||
getDataMap(): Map<number, TB.TbGMap> { return this._dataMap; }
|
||||
getDataList(): TB.TbGMap[] { return this._dataList; }
|
||||
|
||||
get(key: number): TB.TbGMap | undefined { return this._dataMap.get(key); }
|
||||
|
||||
resolve(tables:Tables)
|
||||
{
|
||||
for(let data of this._dataList)
|
||||
{
|
||||
data.resolve(tables)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export class TbGRoleAttack{
|
||||
private _dataMap: Map<number, TB.TbGRoleAttack>
|
||||
private _dataList: TB.TbGRoleAttack[]
|
||||
@@ -399,31 +432,67 @@ export class TbGRoleSkill{
|
||||
|
||||
|
||||
|
||||
export class TbGMap{
|
||||
private _dataMap: Map<number, TB.TbGMap>
|
||||
private _dataList: TB.TbGMap[]
|
||||
constructor(_json_: any) {
|
||||
this._dataMap = new Map<number, TB.TbGMap>()
|
||||
this._dataList = []
|
||||
for(var _json2_ of _json_) {
|
||||
let _v: TB.TbGMap
|
||||
_v = new TB.TbGMap(_json2_)
|
||||
this._dataList.push(_v)
|
||||
this._dataMap.set(_v.id, _v)
|
||||
}
|
||||
}
|
||||
|
||||
getDataMap(): Map<number, TB.TbGMap> { return this._dataMap; }
|
||||
getDataList(): TB.TbGMap[] { return this._dataList; }
|
||||
|
||||
get(key: number): TB.TbGMap | undefined { return this._dataMap.get(key); }
|
||||
|
||||
resolve(tables:Tables)
|
||||
{
|
||||
for(let data of this._dataList)
|
||||
{
|
||||
data.resolve(tables)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
type JsonLoader = (file: string) => any
|
||||
|
||||
export class Tables {
|
||||
private _TbGGlobal: TbGGlobal
|
||||
get TbGGlobal(): TbGGlobal { return this._TbGGlobal;}
|
||||
private _TbGRole: TbGRole
|
||||
get TbGRole(): TbGRole { return this._TbGRole;}
|
||||
private _TbGMap: TbGMap
|
||||
get TbGMap(): TbGMap { return this._TbGMap;}
|
||||
private _TbGRoleAttack: TbGRoleAttack
|
||||
get TbGRoleAttack(): TbGRoleAttack { return this._TbGRoleAttack;}
|
||||
private _TbGRoleBattleRes: TbGRoleBattleRes
|
||||
get TbGRoleBattleRes(): TbGRoleBattleRes { return this._TbGRoleBattleRes;}
|
||||
private _TbGRoleSkill: TbGRoleSkill
|
||||
get TbGRoleSkill(): TbGRoleSkill { return this._TbGRoleSkill;}
|
||||
private _TbGMap: TbGMap
|
||||
get TbGMap(): TbGMap { return this._TbGMap;}
|
||||
|
||||
constructor(loader: JsonLoader) {
|
||||
this._TbGGlobal = new TbGGlobal(loader('tbgglobal'))
|
||||
this._TbGRole = new TbGRole(loader('tbgrole'))
|
||||
this._TbGMap = new TbGMap(loader('tbgmap'))
|
||||
this._TbGRoleAttack = new TbGRoleAttack(loader('tbgroleattack'))
|
||||
this._TbGRoleBattleRes = new TbGRoleBattleRes(loader('tbgrolebattleres'))
|
||||
this._TbGRoleSkill = new TbGRoleSkill(loader('tbgroleskill'))
|
||||
this._TbGMap = new TbGMap(loader('tbgmap'))
|
||||
|
||||
this._TbGGlobal.resolve(this)
|
||||
this._TbGRole.resolve(this)
|
||||
this._TbGMap.resolve(this)
|
||||
this._TbGRoleAttack.resolve(this)
|
||||
this._TbGRoleBattleRes.resolve(this)
|
||||
this._TbGRoleSkill.resolve(this)
|
||||
this._TbGMap.resolve(this)
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,7 @@
|
||||
[
|
||||
{
|
||||
"id": 70001,
|
||||
"args": "[10004,10001,10002]",
|
||||
"tig": "新手引导选择宠物[妙蛙种子,小石头,疯狂石头]"
|
||||
}
|
||||
]
|
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"ver": "2.0.1",
|
||||
"importer": "json",
|
||||
"imported": true,
|
||||
"uuid": "1bab3314-296c-4ade-91fa-a20dee0a3243",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
9
JisolGameCocos/assets/resources/demo.meta
Normal file
9
JisolGameCocos/assets/resources/demo.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "d1b3b996-3e05-4157-a712-8073277b2be8",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@@ -59,22 +59,25 @@
|
||||
},
|
||||
{
|
||||
"__id__": 161
|
||||
},
|
||||
{
|
||||
"__id__": 167
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 167
|
||||
"__id__": 182
|
||||
},
|
||||
{
|
||||
"__id__": 169
|
||||
"__id__": 184
|
||||
},
|
||||
{
|
||||
"__id__": 171
|
||||
"__id__": 186
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 173
|
||||
"__id__": 188
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@@ -3979,6 +3982,369 @@
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Button-005",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 168
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 174
|
||||
},
|
||||
{
|
||||
"__id__": 176
|
||||
},
|
||||
{
|
||||
"__id__": 178
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 181
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -122.21,
|
||||
"y": 388.865,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 33554432,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Label",
|
||||
"_objFlags": 512,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 167
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 169
|
||||
},
|
||||
{
|
||||
"__id__": 171
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 173
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 33554432,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 168
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 170
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 40
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "181opkbsFLlJNymR3M4uvu"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Label",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 168
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 172
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_string": "关闭页面",
|
||||
"_horizontalAlign": 1,
|
||||
"_verticalAlign": 1,
|
||||
"_actualFontSize": 20,
|
||||
"_fontSize": 20,
|
||||
"_fontFamily": "Arial",
|
||||
"_lineHeight": 40,
|
||||
"_overflow": 1,
|
||||
"_enableWrapText": false,
|
||||
"_font": null,
|
||||
"_isSystemFontUsed": true,
|
||||
"_spacingX": 0,
|
||||
"_isItalic": false,
|
||||
"_isBold": false,
|
||||
"_isUnderline": false,
|
||||
"_underlineHeight": 2,
|
||||
"_cacheMode": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "81YMncu2NHsagDuwTq7/U6"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "d3Bd/9nkpON4BJ8l9e8YpR",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 167
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 175
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 40
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "f2A4s7sxNJZoPz5Yxd1Kjo"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 167
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 177
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 1,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_useGrayscale": false,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "d5zsQW2rJHwJgz15jlkPil"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Button",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 167
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 179
|
||||
},
|
||||
"clickEvents": [
|
||||
{
|
||||
"__id__": 180
|
||||
}
|
||||
],
|
||||
"_interactable": true,
|
||||
"_transition": 2,
|
||||
"_normalColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 214,
|
||||
"g": 214,
|
||||
"b": 214,
|
||||
"a": 255
|
||||
},
|
||||
"_hoverColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 211,
|
||||
"g": 211,
|
||||
"b": 211,
|
||||
"a": 255
|
||||
},
|
||||
"_pressedColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_disabledColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 124,
|
||||
"g": 124,
|
||||
"b": 124,
|
||||
"a": 255
|
||||
},
|
||||
"_normalSprite": {
|
||||
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_hoverSprite": {
|
||||
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_pressedSprite": {
|
||||
"__uuid__": "544e49d6-3f05-4fa8-9a9e-091f98fc2ce8@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_disabledSprite": {
|
||||
"__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_duration": 0.1,
|
||||
"_zoomScale": 1.2,
|
||||
"_target": {
|
||||
"__id__": 167
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "36ADMzWDFFrJ4Zovw7UC0Q"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.ClickEvent",
|
||||
"target": {
|
||||
"__id__": 1
|
||||
},
|
||||
"component": "",
|
||||
"_componentId": "15051raQgZN6J5ICgY2OfSS",
|
||||
"handler": "close",
|
||||
"customEventData": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "33JGU4WUBFUY+HahE3PBE8",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
@@ -3989,7 +4355,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 168
|
||||
"__id__": 183
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
@@ -4017,7 +4383,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 170
|
||||
"__id__": 185
|
||||
},
|
||||
"_alignFlags": 45,
|
||||
"_target": null,
|
||||
@@ -4053,8 +4419,10 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 172
|
||||
"__id__": 187
|
||||
},
|
||||
"mask": false,
|
||||
"maskOpcity": 80,
|
||||
"frameText": {
|
||||
"__id__": 19
|
||||
},
|
||||
|
846
JisolGameCocos/assets/resources/prefab/ui/主页/MainView.prefab
Normal file
846
JisolGameCocos/assets/resources/prefab/ui/主页/MainView.prefab
Normal file
@@ -0,0 +1,846 @@
|
||||
[
|
||||
{
|
||||
"__type__": "cc.Prefab",
|
||||
"_name": "MainView",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_native": "",
|
||||
"data": {
|
||||
"__id__": 1
|
||||
},
|
||||
"optimizationPolicy": 0,
|
||||
"persistent": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "MainView",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": null,
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 2
|
||||
},
|
||||
{
|
||||
"__id__": 10
|
||||
},
|
||||
{
|
||||
"__id__": 16
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 31
|
||||
},
|
||||
{
|
||||
"__id__": 33
|
||||
},
|
||||
{
|
||||
"__id__": 35
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 37
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 720,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 33554432,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "bg",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 3
|
||||
},
|
||||
{
|
||||
"__id__": 5
|
||||
},
|
||||
{
|
||||
"__id__": 7
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 9
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 33554432,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 4
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 720,
|
||||
"height": 1280
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "8ftYzn1eBL/KI9lfvctDGE"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 6
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "7d8f9b89-4fd1-4c9f-a3ab-38ec7cded7ca@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 0,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_useGrayscale": false,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "72OG0M5ThEtaIaziixD4R1"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 8
|
||||
},
|
||||
"_alignFlags": 45,
|
||||
"_target": null,
|
||||
"_left": 0,
|
||||
"_right": 0,
|
||||
"_top": 0,
|
||||
"_bottom": 0,
|
||||
"_horizontalCenter": 0,
|
||||
"_verticalCenter": 0,
|
||||
"_isAbsLeft": true,
|
||||
"_isAbsRight": true,
|
||||
"_isAbsTop": true,
|
||||
"_isAbsBottom": true,
|
||||
"_isAbsHorizontalCenter": true,
|
||||
"_isAbsVerticalCenter": true,
|
||||
"_originalWidth": 720,
|
||||
"_originalHeight": 720,
|
||||
"_alignMode": 2,
|
||||
"_lockFlags": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "8ejneRsd9FXLr6cGBBG0Rk"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "85bQbPz7FPkaRPL/kSAwAE",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "spine",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 11
|
||||
},
|
||||
{
|
||||
"__id__": 13
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 15
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 33554432,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 12
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "57eZ8/fvZJMrM7Wj3WO68q"
|
||||
},
|
||||
{
|
||||
"__type__": "sp.Skeleton",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 14
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_skeletonData": null,
|
||||
"defaultSkin": "",
|
||||
"defaultAnimation": "",
|
||||
"_premultipliedAlpha": true,
|
||||
"_timeScale": 1,
|
||||
"_preCacheMode": -1,
|
||||
"_cacheMode": 0,
|
||||
"_defaultCacheMode": 0,
|
||||
"_sockets": [],
|
||||
"_useTint": false,
|
||||
"_debugMesh": false,
|
||||
"_debugBones": false,
|
||||
"_debugSlots": false,
|
||||
"_enableBatch": false,
|
||||
"loop": true,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "37W02pxDdPjqDU8/T4AAOl"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "3aPdHbGrlJEpmRvxGxJCdp",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Button",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 17
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 23
|
||||
},
|
||||
{
|
||||
"__id__": 25
|
||||
},
|
||||
{
|
||||
"__id__": 27
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 30
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": -364.234,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 33554432,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Label",
|
||||
"_objFlags": 512,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 16
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 18
|
||||
},
|
||||
{
|
||||
"__id__": 20
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 22
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 33554432,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 17
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 19
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 40
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "a9+SjkwpRBtLeZcty/qH1n"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Label",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 17
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 21
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_string": "核心战斗",
|
||||
"_horizontalAlign": 1,
|
||||
"_verticalAlign": 1,
|
||||
"_actualFontSize": 20,
|
||||
"_fontSize": 20,
|
||||
"_fontFamily": "Arial",
|
||||
"_lineHeight": 40,
|
||||
"_overflow": 1,
|
||||
"_enableWrapText": false,
|
||||
"_font": null,
|
||||
"_isSystemFontUsed": true,
|
||||
"_spacingX": 0,
|
||||
"_isItalic": false,
|
||||
"_isBold": false,
|
||||
"_isUnderline": false,
|
||||
"_underlineHeight": 2,
|
||||
"_cacheMode": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "2dawV4XTdMuYnCbtT3Cljm"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "69jWhf9aNOtL1KLSUC4G5j",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 16
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 24
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 40
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "fblznbfCtPipV+qIiTc2gG"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 16
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 26
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 1,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_useGrayscale": false,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "b6zPpk3tRATK2kgUd5aGfi"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Button",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 16
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 28
|
||||
},
|
||||
"clickEvents": [
|
||||
{
|
||||
"__id__": 29
|
||||
}
|
||||
],
|
||||
"_interactable": true,
|
||||
"_transition": 2,
|
||||
"_normalColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 214,
|
||||
"g": 214,
|
||||
"b": 214,
|
||||
"a": 255
|
||||
},
|
||||
"_hoverColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 211,
|
||||
"g": 211,
|
||||
"b": 211,
|
||||
"a": 255
|
||||
},
|
||||
"_pressedColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_disabledColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 124,
|
||||
"g": 124,
|
||||
"b": 124,
|
||||
"a": 255
|
||||
},
|
||||
"_normalSprite": {
|
||||
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_hoverSprite": {
|
||||
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_pressedSprite": {
|
||||
"__uuid__": "544e49d6-3f05-4fa8-9a9e-091f98fc2ce8@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_disabledSprite": {
|
||||
"__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_duration": 0.1,
|
||||
"_zoomScale": 1.2,
|
||||
"_target": {
|
||||
"__id__": 16
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "81yU6sKR9D5rgF4SxiwMUz"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.ClickEvent",
|
||||
"target": {
|
||||
"__id__": 1
|
||||
},
|
||||
"component": "",
|
||||
"_componentId": "b51bfKvsidNPKBbFirAFgQI",
|
||||
"handler": "onClickHome",
|
||||
"customEventData": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "60FAaYqK9Ia5BCiy9jtGNo",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 32
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 720,
|
||||
"height": 1280
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "1dgJxmIH5HIpXD6y0/xMwI"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 34
|
||||
},
|
||||
"_alignFlags": 45,
|
||||
"_target": null,
|
||||
"_left": 720,
|
||||
"_right": -720,
|
||||
"_top": 0,
|
||||
"_bottom": 0,
|
||||
"_horizontalCenter": 0,
|
||||
"_verticalCenter": 0,
|
||||
"_isAbsLeft": true,
|
||||
"_isAbsRight": true,
|
||||
"_isAbsTop": true,
|
||||
"_isAbsBottom": true,
|
||||
"_isAbsHorizontalCenter": true,
|
||||
"_isAbsVerticalCenter": true,
|
||||
"_originalWidth": 100,
|
||||
"_originalHeight": 100,
|
||||
"_alignMode": 2,
|
||||
"_lockFlags": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "582zBz6m5DKqmkTkiS/LE0"
|
||||
},
|
||||
{
|
||||
"__type__": "b51bfKvsidNPKBbFirAFgQI",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 36
|
||||
},
|
||||
"mask": false,
|
||||
"maskOpcity": 80,
|
||||
"spine": {
|
||||
"__id__": 13
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "76LGqkFbVGmYN33BpKxb+5"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "08xLpDDa9NlK3pgR7XiOqb",
|
||||
"instance": null,
|
||||
"targetOverrides": null
|
||||
}
|
||||
]
|
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.49",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "a9de536f-0262-4e1b-92ee-b0c5b27ae808",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "MainView"
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,12 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option java_package = "cn.jisol.ngame.proto";
|
||||
import "google/protobuf/any.proto";
|
||||
|
||||
//测试输入
|
||||
message GDemoMessage {
|
||||
//是否攻击
|
||||
bool isAttack = 1;
|
||||
//是否奔跑
|
||||
bool isRun = 2;
|
||||
}
|
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"ver": "1.0.2",
|
||||
"importer": "text",
|
||||
"imported": true,
|
||||
"uuid": "c9f4975a-e568-4d6c-af34-98620327eaf1",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@@ -18,16 +18,17 @@ import JLoaderSystem from "../../extensions/ngame/assets/ngame/system/JLoaderSys
|
||||
import { sp } from "cc";
|
||||
import { SpriteFrame } from "cc";
|
||||
import Loading from "../../extensions/ngame/assets/ngame/util/Loading";
|
||||
import { TB, Tables } from "../resources/config/data/schema";
|
||||
import { Tables } from "../resources/config/data/schema";
|
||||
import { JsonAsset } from "cc";
|
||||
import { GAction } from "./consts/GActionEnum";
|
||||
import { StorageData, StorageEnum } from "./consts/GData";
|
||||
import { JAPI, JAPIConfig } from "../../extensions/ngame/assets/ngame/util/JAPI";
|
||||
import { API } from "./consts/API";
|
||||
import { AppData } from "./AppData";
|
||||
|
||||
let APIPath = `https://api.pet.jisol.cn`
|
||||
let WsPath = `wss://api.pet.jisol.cn/websocket`
|
||||
let APIPath = `http://localhost:8080`
|
||||
let WsPath = `ws://localhost:8080/websocket`
|
||||
// let APIPath = `https://api.pet.jisol.cn`
|
||||
// let WsPath = `wss://api.pet.jisol.cn/websocket`
|
||||
|
||||
//重写UI
|
||||
class JNGLayer extends JNLayer{
|
||||
|
@@ -1,42 +1,32 @@
|
||||
import SystemBase from "../../extensions/ngame/assets/ngame/system/SystemBase";
|
||||
import { app } from "./App";
|
||||
import { API, NewsContext, PlayerInfoOV } from "./consts/API";
|
||||
|
||||
import BaseData from "./data/BaseData";
|
||||
import PlayerData from "./data/PlayerData";
|
||||
import PlayerPetData from "./data/PlayerPetData";
|
||||
|
||||
//数据类 (用于初始化游戏信息)
|
||||
export class AppData extends SystemBase{
|
||||
|
||||
static loading = "AppData";
|
||||
|
||||
//玩家信息
|
||||
static PLAYER_INFO:string = "PLAYER_INFO";
|
||||
|
||||
get loadings():{[key:string]:Function}{
|
||||
return {
|
||||
[AppData.PLAYER_INFO]:API.GetPlayerInfo, //玩家信息
|
||||
}
|
||||
}
|
||||
|
||||
data:{[key:string]:any} = {};
|
||||
loadings:BaseData[] = [
|
||||
PlayerData.getIns(), //玩家信息
|
||||
PlayerPetData.getIns(), //玩家宠物信息
|
||||
];
|
||||
|
||||
async onInit(): Promise<any> {
|
||||
|
||||
app.loading.setCurrent(AppData.loading);
|
||||
|
||||
//加载信息
|
||||
let keys = Object.keys(this.loadings);
|
||||
for (let index = 0; index < keys.length; index++) {
|
||||
this.data[keys[index]] = (await this.loadings[keys[index]]());
|
||||
//初始化所有数据类
|
||||
for (let index = 0; index < this.loadings.length; index++) {
|
||||
const data = this.loadings[index];
|
||||
await data.onInit();
|
||||
}
|
||||
|
||||
app.loading.ok(AppData.loading);
|
||||
|
||||
}
|
||||
|
||||
//获取玩家信息
|
||||
getPlayerInfo():PlayerInfoOV{
|
||||
return this.data[AppData.PLAYER_INFO];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@@ -19,9 +19,7 @@ export class Main extends Component {
|
||||
director.getScene().addChild(instantiate(this.UIPrefab));
|
||||
|
||||
//加载 APP
|
||||
await JNGame.Init(app,[
|
||||
{path:"proto/GDemo"}
|
||||
]);
|
||||
await JNGame.Init(app);
|
||||
|
||||
//发生帧同步开始
|
||||
app.socket.Send(JNSyncAction.NSyncFrameStart);
|
||||
|
@@ -39,7 +39,7 @@ export default class GAttackParabolicRemote implements GAttackBase{
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`播放动画[GAttackParabolicRemote]`,role.nId,enemy.nId)
|
||||
// console.log(`播放动画[GAttackParabolicRemote]`,role.nId,enemy.nId)
|
||||
|
||||
console.log(role.spine,bone);
|
||||
let bullet = GAttackBullet.create(GButtleDefault,{
|
||||
|
@@ -151,7 +151,7 @@ export abstract class GFSMAnimBase extends GFSMBase{
|
||||
|
||||
//播放动画
|
||||
if(!info.track){
|
||||
console.log(`${frame.index} 播放动画-${this.spine.getComponent(GObject).nId}-`,info);
|
||||
// console.log(`${frame.index} 播放动画-${this.spine.getComponent(GObject).nId}-`,info);
|
||||
info.track = this.spine.setAnimation(this.trackIndex,info.animName,!!info.isLoop);
|
||||
this.onStartListener(info.track);
|
||||
}
|
||||
|
@@ -120,7 +120,7 @@ export default class GRoleDefault extends GRoleBase<{}>{
|
||||
//攻击
|
||||
onAttack(){
|
||||
if(!this.fsm.enemy) return;
|
||||
console.log(`播放动画[${this.nId}] onAttack`,this.fsm.enemy.nId)
|
||||
// console.log(`播放动画[${this.nId}] onAttack`,this.fsm.enemy.nId)
|
||||
//敌人扣血
|
||||
let info = TD.TbGRoleAttack.get(this.role.id);
|
||||
(new GAttack[info.attackWay]()).attack(this,info);
|
||||
|
@@ -34,15 +34,25 @@ export interface PlayerInfoOV{
|
||||
playerCreateTime:number, //玩家创建时间
|
||||
novice: false, //是否过引导
|
||||
}
|
||||
export interface PlayerPetOV{
|
||||
petId:number, //宠物唯一Id
|
||||
petPlayerId:number; //宠物的玩家Id
|
||||
petTbId:number; //宠物配置表Id
|
||||
petGrade:number; //宠物等级
|
||||
}
|
||||
|
||||
export const API = {
|
||||
|
||||
UserRegister : async () => RData(await app.api.post(`/user/register`)) as UserVO, //玩家注册
|
||||
UserLogin : async (account:string,password:string) => RData(await app.api.post(`/user/login`,{userId:account,userPass:password})) as UserLoginVO, //玩家登录
|
||||
GetPlayerInfo : async () => RData(await app.api.get(`/game/player/info`),false) as NewsContext, //获取玩家信息
|
||||
GetPlayerInfo : async () => RData(await app.api.get(`/game/player/info`),false) as PlayerInfoOV, //获取玩家信息
|
||||
|
||||
/********** 新手引导接口 *****************/
|
||||
SavePlayerInfo : async (playerName:string,novice:boolean = true) => (await app.api.post(`/game/player/info/save`,{playerName,novice})).data as NewsContext, //保存玩家信息
|
||||
SelectNovicePet: async (petId:number) => RData(await app.api.post(`/game/novice/select/${petId}`),true), //选择新手引导宠物
|
||||
|
||||
|
||||
/********** 宠物接口 ******************/
|
||||
GetPlayerPets: async () => RData(await app.api.get(`/game/pet/list`),false) as PlayerPetOV[], //获取玩家全部宠物
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,9 @@
|
||||
import { sys } from "cc";
|
||||
|
||||
export enum UIPetAnim{
|
||||
std = "std",
|
||||
}
|
||||
|
||||
export enum StorageEnum{
|
||||
|
||||
Token = "Storage_Token", // Token
|
||||
|
9
JisolGameCocos/assets/script/data.meta
Normal file
9
JisolGameCocos/assets/script/data.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "0265ac40-ac86-4146-990a-88283cb5ac58",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
11
JisolGameCocos/assets/script/data/BaseData.ts
Normal file
11
JisolGameCocos/assets/script/data/BaseData.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import Singleton from "../../../extensions/ngame/assets/ngame/util/Singleton";
|
||||
|
||||
|
||||
//数据基类
|
||||
export default abstract class BaseData extends Singleton {
|
||||
|
||||
//初始化
|
||||
abstract onInit();
|
||||
|
||||
}
|
||||
|
9
JisolGameCocos/assets/script/data/BaseData.ts.meta
Normal file
9
JisolGameCocos/assets/script/data/BaseData.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "3cace79b-36b5-4fd4-acfa-88a4b210e3ab",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
21
JisolGameCocos/assets/script/data/PlayerData.ts
Normal file
21
JisolGameCocos/assets/script/data/PlayerData.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { API, PlayerInfoOV } from "../consts/API";
|
||||
import BaseData from "./BaseData";
|
||||
|
||||
|
||||
//玩家数据
|
||||
export default class PlayerData extends BaseData{
|
||||
|
||||
data:PlayerInfoOV;
|
||||
|
||||
async onInit() {
|
||||
console.log("PlayerData",await API.GetPlayerInfo())
|
||||
this.data = (await API.GetPlayerInfo());
|
||||
}
|
||||
|
||||
//获取玩家信息
|
||||
getInfo():PlayerInfoOV{
|
||||
return this.data;
|
||||
}
|
||||
}
|
||||
|
||||
|
9
JisolGameCocos/assets/script/data/PlayerData.ts.meta
Normal file
9
JisolGameCocos/assets/script/data/PlayerData.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "58cb2be1-1279-405e-8c89-17a35ca0cd6d",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
39
JisolGameCocos/assets/script/data/PlayerPetData.ts
Normal file
39
JisolGameCocos/assets/script/data/PlayerPetData.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import { API, PlayerInfoOV, PlayerPetOV } from "../consts/API";
|
||||
import BaseData from "./BaseData";
|
||||
|
||||
|
||||
//玩家宠物数据
|
||||
export default class PlayerPetData extends BaseData{
|
||||
|
||||
//玩家宠物列表
|
||||
datas:PlayerPetOV[] = [];
|
||||
|
||||
async onInit() {
|
||||
|
||||
//更新玩家宠物
|
||||
await this.UpdatePlayerPet();
|
||||
|
||||
}
|
||||
|
||||
//获取全部宠物
|
||||
getData(){
|
||||
return this.datas;
|
||||
}
|
||||
|
||||
//更新玩家宠物
|
||||
async UpdatePlayerPet(){
|
||||
//获取全部宠物
|
||||
this.datas = await API.GetPlayerPets();
|
||||
}
|
||||
|
||||
//选择宠物
|
||||
async SelectNovicePet(petId:number){
|
||||
await API.SelectNovicePet(petId);
|
||||
//更新玩家宠物列表
|
||||
await this.UpdatePlayerPet();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
9
JisolGameCocos/assets/script/data/PlayerPetData.ts.meta
Normal file
9
JisolGameCocos/assets/script/data/PlayerPetData.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "405fd125-2ba1-48b5-bc15-7f6e14569271",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@@ -16,7 +16,6 @@ export class HomeView extends JNGLayerBase {
|
||||
frameText:Label;
|
||||
|
||||
async onLoad(){
|
||||
app.layer.Open(GUI.Tips,{text:(await API.GetPlayerInfo()).msg});
|
||||
}
|
||||
|
||||
update(){
|
||||
|
29
JisolGameCocos/assets/script/ui/Home/MainView.ts
Normal file
29
JisolGameCocos/assets/script/ui/Home/MainView.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { _decorator, Component, Label, Node } from 'cc';
|
||||
import { app, JNGLayerBase } from '../../App';
|
||||
import { sp } from 'cc';
|
||||
import PlayerPetData from '../../data/PlayerPetData';
|
||||
import { GUI } from '../UIConfig';
|
||||
import { UIPetAnim } from '../../consts/GData';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('MainView')
|
||||
export class MainView extends JNGLayerBase {
|
||||
|
||||
//宠物
|
||||
@property(sp.Skeleton)
|
||||
spine:sp.Skeleton;
|
||||
|
||||
onJNLoad(data?: any): void {
|
||||
//显示被选择的宠物
|
||||
this.spine.skeletonData = app.battleRes.roleSpine[PlayerPetData.getIns().getData()[0].petTbId];
|
||||
this.spine.setAnimation(0,UIPetAnim.std,true);
|
||||
}
|
||||
|
||||
//点击回到之前的主页
|
||||
onClickHome(){
|
||||
app.layer.Open(GUI.Home);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
1
JisolGameCocos/assets/script/ui/Home/MainView.ts.meta
Normal file
1
JisolGameCocos/assets/script/ui/Home/MainView.ts.meta
Normal file
@@ -0,0 +1 @@
|
||||
{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"b51bf2af-b227-4d3c-a05b-162ac0160408","files":[],"subMetas":{},"userData":{}}
|
@@ -35,7 +35,7 @@ export default class LoadingView extends JNGLayerBase {
|
||||
await NoviceManager.getIns().onStart();
|
||||
|
||||
//关闭加载页
|
||||
await app.layer.Open(GUI.Home);
|
||||
await app.layer.Open(GUI.Main);
|
||||
app.layer.Close(GUI.Loading);
|
||||
|
||||
}
|
||||
|
@@ -1,5 +1,7 @@
|
||||
import Singleton from "../../../../extensions/ngame/assets/ngame/util/Singleton";
|
||||
import { app } from "../../App";
|
||||
import PlayerData from "../../data/PlayerData";
|
||||
import PlayerPetData from "../../data/PlayerPetData";
|
||||
import { GUI } from "../UIConfig";
|
||||
|
||||
export default class NoviceManager extends Singleton{
|
||||
@@ -7,11 +9,19 @@ export default class NoviceManager extends Singleton{
|
||||
//新手引导执行
|
||||
async onStart(){
|
||||
|
||||
if(!(app.data.getPlayerInfo().novice)){
|
||||
//获取玩家信息是否引导过
|
||||
if(!(PlayerData.getIns().data.novice)){
|
||||
//如果没有过引导则打开引导页面
|
||||
await app.layer.OpenToClose(GUI.NoviceNamingView);
|
||||
}
|
||||
|
||||
//获取玩家信息是否选择过宠物(有没有宠物)
|
||||
//如果没有宠物则弹出让玩家选择宠物
|
||||
if(PlayerPetData.getIns().getData().length == 0){
|
||||
//没有宠物则弹出选择宠物页面
|
||||
await app.layer.OpenToClose(GUI.NoviceSelectPetView);
|
||||
}
|
||||
|
||||
console.log("新手引导结束");
|
||||
|
||||
}
|
||||
|
@@ -1,9 +1,83 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import { JNGLayerBase } from '../../App';
|
||||
import { JNGLayerBase, TD, app } from '../../App';
|
||||
import { TbGGlobalEnum } from '../../../resources/config/TbGGlobalEnum';
|
||||
import { _decorator,Node } from 'cc';
|
||||
import { sp } from 'cc';
|
||||
import { UIPetAnim } from '../../consts/GData';
|
||||
import { Sprite } from 'cc';
|
||||
import { Color } from 'cc';
|
||||
import { API } from '../../consts/API';
|
||||
import { GUI } from '../UIConfig';
|
||||
import PlayerPetData from '../../data/PlayerPetData';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
|
||||
@ccclass('NoviceSelectPetView')
|
||||
export class NoviceSelectPetView extends JNGLayerBase {
|
||||
|
||||
//选择宠物的节点
|
||||
@property([Node])
|
||||
selects:Node[] = [];
|
||||
|
||||
//可选择宠物的列表
|
||||
petIds:number[];
|
||||
//选择index
|
||||
index:number = 0;
|
||||
|
||||
async onJNLoad(data?: any) {
|
||||
|
||||
super.onJNLoad();
|
||||
|
||||
//加载配置表 (找到可选择的宠物Id)
|
||||
let info = TD.TbGGlobal.get(TbGGlobalEnum.SELECT_PET_ID);
|
||||
this.petIds = JSON.parse(info.args);
|
||||
|
||||
//显示宠物
|
||||
this.selects.forEach((item,index) => {
|
||||
//获取Spine组件
|
||||
let spine = item.getComponentInChildren(sp.Skeleton);
|
||||
//设置显示的角色
|
||||
spine.skeletonData = app.battleRes.roleSpine[this.petIds[index]];
|
||||
//全部角色播放等待动画
|
||||
spine.setAnimation(0,UIPetAnim.std,true);
|
||||
})
|
||||
|
||||
this.onUpdateView();
|
||||
|
||||
}
|
||||
|
||||
//更新UI
|
||||
onUpdateView(){
|
||||
|
||||
this.selects.forEach(item => {
|
||||
item.getComponent(Sprite).color = new Color("8D8D8D");
|
||||
})
|
||||
|
||||
//被选择赋黑
|
||||
this.selects[this.index].getComponent(Sprite).color = new Color("#000000");
|
||||
|
||||
}
|
||||
|
||||
//点击选择
|
||||
onClickSelect(e,data){
|
||||
|
||||
let index = parseInt(data);
|
||||
|
||||
this.index = index;
|
||||
|
||||
//更新UI
|
||||
this.onUpdateView();
|
||||
|
||||
}
|
||||
|
||||
//点击确定
|
||||
async onClickOk(){
|
||||
|
||||
//向服务器确认选择
|
||||
console.log(await PlayerPetData.getIns().SelectNovicePet(this.petIds[this.index]));
|
||||
app.layer.Open(GUI.Tips,{text:"选择宠物成功 欢迎来到宠物世界..."});
|
||||
//关闭页面
|
||||
app.layer.CloseNode(this.node);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@@ -18,6 +18,7 @@ export enum GUI{
|
||||
NoviceSelectPetView = "NoviceSelectPetView", //新手引导页面 - 选择宠物
|
||||
|
||||
Home = "Home", //主页面
|
||||
Main = "Main", //主页面2
|
||||
}
|
||||
|
||||
|
||||
@@ -82,6 +83,16 @@ export const UIConfig:{ [key: string]: JNLayerInfo; } = {
|
||||
backInfo:{key:"position",start:v3(0,0,0),end:v3(-720,0,0)}
|
||||
},
|
||||
},
|
||||
[GUI.Main]:{
|
||||
layer:GLayer.View,
|
||||
uri: "prefab/ui/主页/MainView",
|
||||
anims:{
|
||||
front:JNLayerAnim.Enlarge,
|
||||
back:JNLayerAnim.Smaller,
|
||||
frontInfo:{key:"position",start:v3(720,0,0),end:v3(0,0,0)},
|
||||
backInfo:{key:"position",start:v3(0,0,0),end:v3(-720,0,0)}
|
||||
},
|
||||
},
|
||||
...UISystemConfig, //系统页面
|
||||
...UINoviceConfig, //新手引导页面
|
||||
}
|
||||
|
Reference in New Issue
Block a user