mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-26 18:26:23 +00:00
重置配置表
This commit is contained in:
9
JisolGameCocos/assets/resources/config/data.meta
Normal file
9
JisolGameCocos/assets/resources/config/data.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "273309e9-d062-41df-9f3c-dc7671bdbc72",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@@ -12,64 +12,379 @@
|
||||
|
||||
|
||||
|
||||
export namespace TB {export namespace Battle {export namespace Role {
|
||||
export class GRole {
|
||||
export namespace TB {
|
||||
export class TbGRole {
|
||||
|
||||
constructor(_json_: any) {
|
||||
if (_json_.id === undefined) { throw new Error() }
|
||||
this.id = _json_.id
|
||||
if (_json_.name === undefined) { throw new Error() }
|
||||
this.name = _json_.name
|
||||
if (_json_.price === undefined) { throw new Error() }
|
||||
this.price = _json_.price
|
||||
if(_json_.expire_time != undefined) { this.expireTime = _json_.expire_time } else { this.expireTime = undefined }
|
||||
if (_json_.roleName === undefined) { throw new Error() }
|
||||
this.roleName = _json_.roleName
|
||||
if (_json_.spine === undefined) { throw new Error() }
|
||||
this.spine = _json_.spine
|
||||
if (_json_.roleSkillIds === undefined) { throw new Error() }
|
||||
{ this.roleSkillIds = []; for(let _ele of _json_.roleSkillIds) { let _e; _e = _ele; this.roleSkillIds.push(_e);}}
|
||||
if (_json_.roleAttackRange === undefined) { throw new Error() }
|
||||
this.roleAttackRange = _json_.roleAttackRange
|
||||
}
|
||||
|
||||
/**
|
||||
* 这是id
|
||||
* id
|
||||
*/
|
||||
readonly id: number
|
||||
/**
|
||||
* 名字
|
||||
* 角色名称
|
||||
*/
|
||||
readonly name: string
|
||||
readonly roleName: string
|
||||
/**
|
||||
* 价格
|
||||
* 描述
|
||||
*/
|
||||
readonly price: number
|
||||
readonly spine: string
|
||||
/**
|
||||
* 过期时间
|
||||
* 角色技能Id列表
|
||||
*/
|
||||
readonly expireTime: number|undefined
|
||||
readonly roleSkillIds: number[]
|
||||
/**
|
||||
* 角色攻击范围
|
||||
*/
|
||||
readonly roleAttackRange: number
|
||||
|
||||
resolve(tables:Tables)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
}}}
|
||||
}
|
||||
|
||||
|
||||
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 {
|
||||
|
||||
constructor(_json_: any) {
|
||||
if (_json_.id === undefined) { throw new Error() }
|
||||
this.id = _json_.id
|
||||
if (_json_.attackWay === undefined) { throw new Error() }
|
||||
this.attackWay = _json_.attackWay
|
||||
if (_json_.attackArgs === undefined) { throw new Error() }
|
||||
{ this.attackArgs = []; for(let _ele of _json_.attackArgs) { let _e; _e = _ele; this.attackArgs.push(_e);}}
|
||||
}
|
||||
|
||||
/**
|
||||
* 角色Id
|
||||
*/
|
||||
readonly id: number
|
||||
/**
|
||||
* 攻击方式
|
||||
*/
|
||||
readonly attackWay: string
|
||||
/**
|
||||
* 攻击参数
|
||||
*/
|
||||
readonly attackArgs: string[]
|
||||
|
||||
resolve(tables:Tables)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
export namespace TB {
|
||||
export class TbGRoleBattleRes {
|
||||
|
||||
constructor(_json_: any) {
|
||||
if (_json_.id === undefined) { throw new Error() }
|
||||
this.id = _json_.id
|
||||
if (_json_.resName === undefined) { throw new Error() }
|
||||
this.resName = _json_.resName
|
||||
if (_json_.resType === undefined) { throw new Error() }
|
||||
this.resType = _json_.resType
|
||||
if (_json_.resSrc === undefined) { throw new Error() }
|
||||
this.resSrc = _json_.resSrc
|
||||
}
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
readonly id: number
|
||||
/**
|
||||
* 资源名称
|
||||
*/
|
||||
readonly resName: string
|
||||
/**
|
||||
* 资源类型
|
||||
*/
|
||||
readonly resType: string
|
||||
/**
|
||||
* 资源地址
|
||||
*/
|
||||
readonly resSrc: string
|
||||
|
||||
resolve(tables:Tables)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
export namespace TB {
|
||||
export class TbGRoleSkill {
|
||||
|
||||
constructor(_json_: any) {
|
||||
if (_json_.id === undefined) { throw new Error() }
|
||||
this.id = _json_.id
|
||||
if (_json_.skillName === undefined) { throw new Error() }
|
||||
this.skillName = _json_.skillName
|
||||
if (_json_.skillController === undefined) { throw new Error() }
|
||||
this.skillController = _json_.skillController
|
||||
if (_json_.skillArgs === undefined) { throw new Error() }
|
||||
{ this.skillArgs = []; for(let _ele of _json_.skillArgs) { let _e; _e = _ele; this.skillArgs.push(_e);}}
|
||||
if (_json_.skillText === undefined) { throw new Error() }
|
||||
this.skillText = _json_.skillText
|
||||
}
|
||||
|
||||
/**
|
||||
* 角色Id
|
||||
*/
|
||||
readonly id: number
|
||||
/**
|
||||
* 技能名称
|
||||
*/
|
||||
readonly skillName: string
|
||||
/**
|
||||
* 技能控制器
|
||||
*/
|
||||
readonly skillController: string
|
||||
/**
|
||||
* 技能参数
|
||||
*/
|
||||
readonly skillArgs: string[]
|
||||
/**
|
||||
* 技能介绍
|
||||
*/
|
||||
readonly skillText: string
|
||||
|
||||
resolve(tables:Tables)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export class TbGRole{
|
||||
private _dataMap: Map<number, TB.Battle.Role.GRole>
|
||||
private _dataList: TB.Battle.Role.GRole[]
|
||||
private _dataMap: Map<number, TB.TbGRole>
|
||||
private _dataList: TB.TbGRole[]
|
||||
constructor(_json_: any) {
|
||||
this._dataMap = new Map<number, TB.Battle.Role.GRole>()
|
||||
this._dataMap = new Map<number, TB.TbGRole>()
|
||||
this._dataList = []
|
||||
for(var _json2_ of _json_) {
|
||||
let _v: TB.Battle.Role.GRole
|
||||
_v = new TB.Battle.Role.GRole(_json2_)
|
||||
let _v: TB.TbGRole
|
||||
_v = new TB.TbGRole(_json2_)
|
||||
this._dataList.push(_v)
|
||||
this._dataMap.set(_v.id, _v)
|
||||
}
|
||||
}
|
||||
|
||||
getDataMap(): Map<number, TB.Battle.Role.GRole> { return this._dataMap; }
|
||||
getDataList(): TB.Battle.Role.GRole[] { return this._dataList; }
|
||||
getDataMap(): Map<number, TB.TbGRole> { return this._dataMap; }
|
||||
getDataList(): TB.TbGRole[] { return this._dataList; }
|
||||
|
||||
get(key: number): TB.Battle.Role.GRole | undefined { return this._dataMap.get(key); }
|
||||
get(key: number): TB.TbGRole | undefined { return this._dataMap.get(key); }
|
||||
|
||||
resolve(tables:Tables)
|
||||
{
|
||||
for(let data of this._dataList)
|
||||
{
|
||||
data.resolve(tables)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
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[]
|
||||
constructor(_json_: any) {
|
||||
this._dataMap = new Map<number, TB.TbGRoleAttack>()
|
||||
this._dataList = []
|
||||
for(var _json2_ of _json_) {
|
||||
let _v: TB.TbGRoleAttack
|
||||
_v = new TB.TbGRoleAttack(_json2_)
|
||||
this._dataList.push(_v)
|
||||
this._dataMap.set(_v.id, _v)
|
||||
}
|
||||
}
|
||||
|
||||
getDataMap(): Map<number, TB.TbGRoleAttack> { return this._dataMap; }
|
||||
getDataList(): TB.TbGRoleAttack[] { return this._dataList; }
|
||||
|
||||
get(key: number): TB.TbGRoleAttack | undefined { return this._dataMap.get(key); }
|
||||
|
||||
resolve(tables:Tables)
|
||||
{
|
||||
for(let data of this._dataList)
|
||||
{
|
||||
data.resolve(tables)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export class TbGRoleBattleRes{
|
||||
private _dataMap: Map<number, TB.TbGRoleBattleRes>
|
||||
private _dataList: TB.TbGRoleBattleRes[]
|
||||
constructor(_json_: any) {
|
||||
this._dataMap = new Map<number, TB.TbGRoleBattleRes>()
|
||||
this._dataList = []
|
||||
for(var _json2_ of _json_) {
|
||||
let _v: TB.TbGRoleBattleRes
|
||||
_v = new TB.TbGRoleBattleRes(_json2_)
|
||||
this._dataList.push(_v)
|
||||
this._dataMap.set(_v.id, _v)
|
||||
}
|
||||
}
|
||||
|
||||
getDataMap(): Map<number, TB.TbGRoleBattleRes> { return this._dataMap; }
|
||||
getDataList(): TB.TbGRoleBattleRes[] { return this._dataList; }
|
||||
|
||||
get(key: number): TB.TbGRoleBattleRes | undefined { return this._dataMap.get(key); }
|
||||
|
||||
resolve(tables:Tables)
|
||||
{
|
||||
for(let data of this._dataList)
|
||||
{
|
||||
data.resolve(tables)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export class TbGRoleSkill{
|
||||
private _dataMap: Map<number, TB.TbGRoleSkill>
|
||||
private _dataList: TB.TbGRoleSkill[]
|
||||
constructor(_json_: any) {
|
||||
this._dataMap = new Map<number, TB.TbGRoleSkill>()
|
||||
this._dataList = []
|
||||
for(var _json2_ of _json_) {
|
||||
let _v: TB.TbGRoleSkill
|
||||
_v = new TB.TbGRoleSkill(_json2_)
|
||||
this._dataList.push(_v)
|
||||
this._dataMap.set(_v.id, _v)
|
||||
}
|
||||
}
|
||||
|
||||
getDataMap(): Map<number, TB.TbGRoleSkill> { return this._dataMap; }
|
||||
getDataList(): TB.TbGRoleSkill[] { return this._dataList; }
|
||||
|
||||
get(key: number): TB.TbGRoleSkill | undefined { return this._dataMap.get(key); }
|
||||
|
||||
resolve(tables:Tables)
|
||||
{
|
||||
@@ -89,10 +404,26 @@ type JsonLoader = (file: string) => any
|
||||
export class Tables {
|
||||
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;}
|
||||
|
||||
constructor(loader: JsonLoader) {
|
||||
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._TbGRole.resolve(this)
|
||||
this._TbGMap.resolve(this)
|
||||
this._TbGRoleAttack.resolve(this)
|
||||
this._TbGRoleBattleRes.resolve(this)
|
||||
this._TbGRoleSkill.resolve(this)
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "57cb0026-1494-41ca-948c-346b43746aa7",
|
||||
"uuid": "1c41fdd4-f2b5-4bbf-b81e-2245a40e519e",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "372dfc13-f415-4871-98be-49856636b095",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
@@ -1 +0,0 @@
|
||||
{"60001":{"id":60001,"mapName":"天空城","map1":"map/MAP6/MAP6_1/spriteFrame","map2":"map/MAP6/MAP6_2/spriteFrame","map3":"map/MAP6/MAP6_3/spriteFrame","map1OffsetY":100,"map2OffsetY":400,"map3OffsetY":400}}
|
@@ -1 +0,0 @@
|
||||
{"10001":{"id":10001,"roleName":"小石头","spine":"spine/召唤与合成819个Spine/小石头/guaiA1a/spine/guaiA1a","roleSkillIds":[],"roleAttackRange":100},"10002":{"id":10002,"roleName":"坚强小石","spine":"spine/召唤与合成819个Spine/坚强小石/guaiA1a_1/spine/guaiA1a","roleSkillIds":[],"roleAttackRange":100},"10003":{"id":10003,"roleName":"疯狂松鼠","spine":"spine/召唤与合成819个Spine/疯狂松鼠/guaiA4e_2/spine/guaiA4e","roleSkillIds":[40001],"roleAttackRange":500},"10004":{"id":10004,"roleName":"妙蛙种子","spine":"spine/神奇宝贝/001妙蛙种子/spine/001妙蛙种子","roleSkillIds":[40002],"roleAttackRange":350}}
|
@@ -1 +0,0 @@
|
||||
{"10001":{"roleId":10001,"attackWay":"Normal","attackArgs":[]},"10002":{"roleId":10002,"attackWay":"Normal","attackArgs":[]},"10003":{"roleId":10003,"attackWay":"ParabolicBangRemote","attackArgs":["20001","30001","timo5 007","0.6","100","100"]},"10004":{"roleId":10004,"attackWay":"Normal","attackArgs":[]}}
|
@@ -1 +0,0 @@
|
||||
{"20001":{"id":20001,"bulletName":"炸弹","bulletSrc":"bullets/疯狂松鼠/attack/spriteFrame"}}
|
@@ -1 +0,0 @@
|
||||
{"30001":{"id":30001,"effectName":"爆炸","spine":"effect/爆炸效果/shouji_01/spine/shouji_01","animation":"animation"}}
|
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"ver": "2.0.1",
|
||||
"importer": "json",
|
||||
"imported": true,
|
||||
"uuid": "2b1b909f-c98c-40be-8840-601980d86769",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@@ -1 +0,0 @@
|
||||
{"40001":{"id":40001,"skillName":"疯狂松鼠","skillController":"GSkillCrazySquirrel","skillArgs":["5","250","250"],"skillText":"疯狂松鼠的技能 丢出巨大炸弹 轰炸全部玩家"},"40002":{"id":40002,"skillName":"妙蛙种子连击","skillController":"GSkillBulbasaurDoubleHit","skillArgs":["8"],"skillText":"妙蛙种子攻击8次 触发一次射叶子技能"}}
|
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"ver": "2.0.1",
|
||||
"importer": "json",
|
||||
"imported": true,
|
||||
"uuid": "59d1c66b-278d-4af3-8bb9-864840cfbc5f",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@@ -1 +0,0 @@
|
||||
{"50001":{"id":50001,"text":"疯狂松鼠的技能开始 松鼠向天上丢出炸弹","spine":"spine/召唤与合成819个Spine/疯狂松鼠/guaiA4es_2/spine/guaiA4es"},"50002":{"id":50002,"text":"火球","spine":"effect/子弹效果/base_fly_fire/spine/buff_fire"},"50003":{"id":50003,"text":"火球爆炸","spine":"effect/爆炸效果/zhouyu_skill2_2/spine/zhouyu_skill2_2"}}
|
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"ver": "2.0.1",
|
||||
"importer": "json",
|
||||
"imported": true,
|
||||
"uuid": "fc22edae-4f33-449d-9525-61c07e4ad229",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@@ -1 +0,0 @@
|
||||
{"50001":{"id":50001,"text":"疯狂松鼠的技能开始 松鼠向天上丢出炸弹","spine":"spine/召唤与合成819个Spine/疯狂松鼠/guaiA4es_2/spine/guaiA4es"}}
|
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"ver": "2.0.1",
|
||||
"importer": "json",
|
||||
"imported": true,
|
||||
"uuid": "2b4d0d66-c8ee-4b18-996a-bdbd33d4f503",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
9
JisolGameCocos/assets/resources/config/json.meta
Normal file
9
JisolGameCocos/assets/resources/config/json.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "fb208ba4-2f35-427c-bb3a-4090397c970d",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
12
JisolGameCocos/assets/resources/config/json/tbgmap.json
Normal file
12
JisolGameCocos/assets/resources/config/json/tbgmap.json
Normal file
@@ -0,0 +1,12 @@
|
||||
[
|
||||
{
|
||||
"id": 60001,
|
||||
"mapName": "天空城",
|
||||
"map1": "map/MAP6/MAP6_1/spriteFrame",
|
||||
"map2": "map/MAP6/MAP6_2/spriteFrame",
|
||||
"map3": "map/MAP6/MAP6_3/spriteFrame",
|
||||
"map1OffsetY": 100,
|
||||
"map2OffsetY": 400,
|
||||
"map3OffsetY": 400
|
||||
}
|
||||
]
|
@@ -2,7 +2,7 @@
|
||||
"ver": "2.0.1",
|
||||
"importer": "json",
|
||||
"imported": true,
|
||||
"uuid": "9e1a69f7-e3db-4165-abc2-aa96ed577b2d",
|
||||
"uuid": "ca081965-20e1-401b-a6d9-1cec3e644dbb",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
@@ -1,54 +1,34 @@
|
||||
[
|
||||
{
|
||||
"id": 10000,
|
||||
"name": "发型",
|
||||
"price": 100
|
||||
},
|
||||
{
|
||||
"id": 10001,
|
||||
"name": "外套",
|
||||
"price": 100
|
||||
"roleName": "小石头",
|
||||
"spine": "spine/召唤与合成819个Spine/小石头/guaiA1a/spine/guaiA1a",
|
||||
"roleSkillIds": [],
|
||||
"roleAttackRange": 100
|
||||
},
|
||||
{
|
||||
"id": 10002,
|
||||
"name": "上衣",
|
||||
"price": 100
|
||||
"roleName": "坚强小石",
|
||||
"spine": "spine/召唤与合成819个Spine/坚强小石/guaiA1a_1/spine/guaiA1a",
|
||||
"roleSkillIds": [],
|
||||
"roleAttackRange": 100
|
||||
},
|
||||
{
|
||||
"id": 10003,
|
||||
"name": "裙子",
|
||||
"price": 100
|
||||
"roleName": "疯狂松鼠",
|
||||
"spine": "spine/召唤与合成819个Spine/疯狂松鼠/guaiA4e_2/spine/guaiA4e",
|
||||
"roleSkillIds": [
|
||||
40001
|
||||
],
|
||||
"roleAttackRange": 500
|
||||
},
|
||||
{
|
||||
"id": 10004,
|
||||
"name": "袜子",
|
||||
"price": 100
|
||||
},
|
||||
{
|
||||
"id": 10005,
|
||||
"name": "鞋子",
|
||||
"price": 100
|
||||
},
|
||||
{
|
||||
"id": 10006,
|
||||
"name": "发饰",
|
||||
"price": 100
|
||||
},
|
||||
{
|
||||
"id": 10007,
|
||||
"name": "中秋节发饰",
|
||||
"price": 200,
|
||||
"expire_time": 1633881599
|
||||
},
|
||||
{
|
||||
"id": 10008,
|
||||
"name": "中秋节鞋子",
|
||||
"price": 300,
|
||||
"expire_time": 1633967999
|
||||
},
|
||||
{
|
||||
"id": 10009,
|
||||
"name": "礼包",
|
||||
"price": 100
|
||||
"roleName": "妙蛙种子",
|
||||
"spine": "spine/神奇宝贝/001妙蛙种子/spine/001妙蛙种子",
|
||||
"roleSkillIds": [
|
||||
40002
|
||||
],
|
||||
"roleAttackRange": 350
|
||||
}
|
||||
]
|
@@ -2,7 +2,7 @@
|
||||
"ver": "2.0.1",
|
||||
"importer": "json",
|
||||
"imported": true,
|
||||
"uuid": "90a5e164-9bf8-4bcb-b155-444e7ff5e0bc",
|
||||
"uuid": "8783acf4-8ffd-44d0-ac6c-61e76b1867ee",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
@@ -0,0 +1,29 @@
|
||||
[
|
||||
{
|
||||
"id": 10001,
|
||||
"attackWay": "Normal",
|
||||
"attackArgs": []
|
||||
},
|
||||
{
|
||||
"id": 10002,
|
||||
"attackWay": "Normal",
|
||||
"attackArgs": []
|
||||
},
|
||||
{
|
||||
"id": 10003,
|
||||
"attackWay": "ParabolicBangRemote",
|
||||
"attackArgs": [
|
||||
"30002",
|
||||
"30001",
|
||||
"timo5 007",
|
||||
"0.6",
|
||||
"100",
|
||||
"100"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10004,
|
||||
"attackWay": "Normal",
|
||||
"attackArgs": []
|
||||
}
|
||||
]
|
@@ -2,7 +2,7 @@
|
||||
"ver": "2.0.1",
|
||||
"importer": "json",
|
||||
"imported": true,
|
||||
"uuid": "d0ea1d51-329d-4f0e-83cf-33182eaa13f0",
|
||||
"uuid": "c579484c-c7d1-4fd7-ba57-f93003d57a38",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
@@ -0,0 +1,32 @@
|
||||
[
|
||||
{
|
||||
"id": 30001,
|
||||
"resName": "爆炸",
|
||||
"resType": "Spine",
|
||||
"resSrc": "effect/爆炸效果/shouji_01/spine/shouji_01"
|
||||
},
|
||||
{
|
||||
"id": 30002,
|
||||
"resName": "炸弹",
|
||||
"resType": "Sprite",
|
||||
"resSrc": "bullets/疯狂松鼠/attack/spriteFrame"
|
||||
},
|
||||
{
|
||||
"id": 30003,
|
||||
"resName": "疯狂松鼠的技能开始 松鼠向天上丢出炸弹",
|
||||
"resType": "Spine",
|
||||
"resSrc": "spine/召唤与合成819个Spine/疯狂松鼠/guaiA4es_2/spine/guaiA4es"
|
||||
},
|
||||
{
|
||||
"id": 30004,
|
||||
"resName": "火球",
|
||||
"resType": "Spine",
|
||||
"resSrc": "effect/子弹效果/base_fly_fire/spine/buff_fire"
|
||||
},
|
||||
{
|
||||
"id": 30005,
|
||||
"resName": "火球爆炸",
|
||||
"resType": "Spine",
|
||||
"resSrc": "effect/爆炸效果/zhouyu_skill2_2/spine/zhouyu_skill2_2"
|
||||
}
|
||||
]
|
@@ -2,7 +2,7 @@
|
||||
"ver": "2.0.1",
|
||||
"importer": "json",
|
||||
"imported": true,
|
||||
"uuid": "75a65c75-47c9-4167-ba79-55548af8cc79",
|
||||
"uuid": "95a40bf9-994f-4f8c-bd5e-f8bc347becf3",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
@@ -0,0 +1,22 @@
|
||||
[
|
||||
{
|
||||
"id": 40001,
|
||||
"skillName": "疯狂松鼠",
|
||||
"skillController": "GSkillCrazySquirrel",
|
||||
"skillArgs": [
|
||||
"5",
|
||||
"250",
|
||||
"250"
|
||||
],
|
||||
"skillText": "疯狂松鼠的技能 丢出巨大炸弹 轰炸全部玩家"
|
||||
},
|
||||
{
|
||||
"id": 40002,
|
||||
"skillName": "妙蛙种子连击",
|
||||
"skillController": "GSkillBulbasaurDoubleHit",
|
||||
"skillArgs": [
|
||||
"8"
|
||||
],
|
||||
"skillText": "妙蛙种子攻击8次 触发一次射叶子技能"
|
||||
}
|
||||
]
|
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"ver": "2.0.1",
|
||||
"importer": "json",
|
||||
"imported": true,
|
||||
"uuid": "1c448338-21ce-44ac-90b9-bd0b911896bc",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "7dcc424e-cdd8-4b28-ae0a-1a7994590b3a",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
@@ -1,55 +0,0 @@
|
||||
import { JsonUtil } from "../../../../extensions/ngame/assets/ngame/util/JsonUtil";
|
||||
|
||||
export class TableGMap {
|
||||
static TableName: string = "GMap";
|
||||
|
||||
static getAllConfig(): { [id: string]: TableGMap } {
|
||||
return JsonUtil.get(TableGMap.TableName);
|
||||
}
|
||||
|
||||
static getConfig(id: number | string) {
|
||||
return TableGMap.getAllConfig()[id] as TableGMap;
|
||||
}
|
||||
|
||||
private data: any;
|
||||
|
||||
init(id: number) {
|
||||
var table = JsonUtil.get(TableGMap.TableName);
|
||||
this.data = table[id];
|
||||
this._id = id;
|
||||
}
|
||||
/** id */
|
||||
private _id: number = 0;
|
||||
|
||||
/** id */
|
||||
get id(): number {
|
||||
return this.data.id;
|
||||
}
|
||||
/** 地图名称 */
|
||||
get mapName(): string {
|
||||
return this.data.mapName;
|
||||
}
|
||||
/** 地图1(前) */
|
||||
get map1(): string {
|
||||
return this.data.map1;
|
||||
}
|
||||
/** 地图2(后) */
|
||||
get map2(): string {
|
||||
return this.data.map2;
|
||||
}
|
||||
/** 地图3(天空) */
|
||||
get map3(): string {
|
||||
return this.data.map3;
|
||||
}
|
||||
/** 地图1(前) 偏移量Y */
|
||||
get map1OffsetY(): number {
|
||||
return this.data.map1OffsetY;
|
||||
}
|
||||
/** 地图2(后) 偏移量Y */
|
||||
get map2OffsetY(): number {
|
||||
return this.data.map2OffsetY;
|
||||
}
|
||||
/** 地图2(后) 偏移量Y */
|
||||
get map3OffsetY(): number {
|
||||
return this.data.map3OffsetY;
|
||||
}
|
@@ -1,43 +0,0 @@
|
||||
import { JsonUtil } from "../../../../extensions/ngame/assets/ngame/util/JsonUtil";
|
||||
|
||||
export class TableGRole {
|
||||
static TableName: string = "GRole";
|
||||
|
||||
static getAllConfig(): { [id: string]: TableGRole } {
|
||||
return JsonUtil.get(TableGRole.TableName);
|
||||
}
|
||||
|
||||
static getConfig(id: number | string) {
|
||||
return TableGRole.getAllConfig()[id] as TableGRole;
|
||||
}
|
||||
|
||||
private data: any;
|
||||
|
||||
init(id: number) {
|
||||
var table = JsonUtil.get(TableGRole.TableName);
|
||||
this.data = table[id];
|
||||
this._id = id;
|
||||
}
|
||||
/** id */
|
||||
private _id: number = 0;
|
||||
|
||||
/** id */
|
||||
get id(): number {
|
||||
return this.data.id;
|
||||
}
|
||||
/** 角色名称 */
|
||||
get roleName(): string {
|
||||
return this.data.roleName;
|
||||
}
|
||||
/** Spine地址 */
|
||||
get spine(): string {
|
||||
return this.data.spine;
|
||||
}
|
||||
/** 角色技能Id列表 */
|
||||
get roleSkillIds(): number[] {
|
||||
return this.data.roleSkillIds;
|
||||
}
|
||||
/** 角色攻击范围 */
|
||||
get roleAttackRange(): number {
|
||||
return this.data.roleAttackRange;
|
||||
}
|
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "9038eb60-394b-4c67-a5cc-ebd05040f85c",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@@ -1,35 +0,0 @@
|
||||
import { JsonUtil } from "../../../../extensions/ngame/assets/ngame/util/JsonUtil";
|
||||
|
||||
export class TableGRoleAttack {
|
||||
static TableName: string = "GRoleAttack";
|
||||
|
||||
static getAllConfig(): { [id: string]: TableGRoleAttack } {
|
||||
return JsonUtil.get(TableGRoleAttack.TableName);
|
||||
}
|
||||
|
||||
static getConfig(id: number | string) {
|
||||
return TableGRoleAttack.getAllConfig()[id] as TableGRoleAttack;
|
||||
}
|
||||
|
||||
private data: any;
|
||||
|
||||
init(roleId: number) {
|
||||
var table = JsonUtil.get(TableGRoleAttack.TableName);
|
||||
this.data = table[roleId];
|
||||
this._roleId = roleId;
|
||||
}
|
||||
/** 角色Id */
|
||||
private _roleId: number = 0;
|
||||
|
||||
/** 角色Id */
|
||||
get roleId(): number {
|
||||
return this.data.roleId;
|
||||
}
|
||||
/** 攻击方式 */
|
||||
get attackWay(): string {
|
||||
return this.data.attackWay;
|
||||
}
|
||||
/** 攻击参数 */
|
||||
get attackArgs(): string[] {
|
||||
return this.data.attackArgs;
|
||||
}
|
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "4879e3d4-3b08-4e70-af99-add884d50af3",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@@ -1,35 +0,0 @@
|
||||
import { JsonUtil } from "../../../../extensions/ngame/assets/ngame/util/JsonUtil";
|
||||
|
||||
export class TableGRoleAttackBullet {
|
||||
static TableName: string = "GRoleAttackBullet";
|
||||
|
||||
static getAllConfig(): { [id: string]: TableGRoleAttackBullet } {
|
||||
return JsonUtil.get(TableGRoleAttackBullet.TableName);
|
||||
}
|
||||
|
||||
static getConfig(id: number | string) {
|
||||
return TableGRoleAttackBullet.getAllConfig()[id] as TableGRoleAttackBullet;
|
||||
}
|
||||
|
||||
private data: any;
|
||||
|
||||
init(id: number) {
|
||||
var table = JsonUtil.get(TableGRoleAttackBullet.TableName);
|
||||
this.data = table[id];
|
||||
this._id = id;
|
||||
}
|
||||
/** Id */
|
||||
private _id: number = 0;
|
||||
|
||||
/** Id */
|
||||
get id(): number {
|
||||
return this.data.id;
|
||||
}
|
||||
/** 子弹名称 */
|
||||
get bulletName(): string {
|
||||
return this.data.bulletName;
|
||||
}
|
||||
/** 子弹地址 */
|
||||
get bulletSrc(): string {
|
||||
return this.data.bulletSrc;
|
||||
}
|
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "0c4a411b-9551-4944-9662-79468f748d6e",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@@ -1,39 +0,0 @@
|
||||
import { JsonUtil } from "../../../../extensions/ngame/assets/ngame/util/JsonUtil";
|
||||
|
||||
export class TableGRoleAttackEffect {
|
||||
static TableName: string = "GRoleAttackEffect";
|
||||
|
||||
static getAllConfig(): { [id: string]: TableGRoleAttackEffect } {
|
||||
return JsonUtil.get(TableGRoleAttackEffect.TableName);
|
||||
}
|
||||
|
||||
static getConfig(id: number | string) {
|
||||
return TableGRoleAttackEffect.getAllConfig()[id] as TableGRoleAttackEffect;
|
||||
}
|
||||
|
||||
private data: any;
|
||||
|
||||
init(id: number) {
|
||||
var table = JsonUtil.get(TableGRoleAttackEffect.TableName);
|
||||
this.data = table[id];
|
||||
this._id = id;
|
||||
}
|
||||
/** Id */
|
||||
private _id: number = 0;
|
||||
|
||||
/** Id */
|
||||
get id(): number {
|
||||
return this.data.id;
|
||||
}
|
||||
/** 效果名称 */
|
||||
get effectName(): string {
|
||||
return this.data.effectName;
|
||||
}
|
||||
/** spine路径 */
|
||||
get spine(): string {
|
||||
return this.data.spine;
|
||||
}
|
||||
/** 动画名称 */
|
||||
get animation(): string {
|
||||
return this.data.animation;
|
||||
}
|
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "b03efae0-b212-4eb7-8462-2292e6884b51",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@@ -1,43 +0,0 @@
|
||||
import { JsonUtil } from "../../../../extensions/ngame/assets/ngame/util/JsonUtil";
|
||||
|
||||
export class TableGRoleSkill {
|
||||
static TableName: string = "GRoleSkill";
|
||||
|
||||
static getAllConfig(): { [id: string]: TableGRoleSkill } {
|
||||
return JsonUtil.get(TableGRoleSkill.TableName);
|
||||
}
|
||||
|
||||
static getConfig(id: number | string) {
|
||||
return TableGRoleSkill.getAllConfig()[id] as TableGRoleSkill;
|
||||
}
|
||||
|
||||
private data: any;
|
||||
|
||||
init(id: number) {
|
||||
var table = JsonUtil.get(TableGRoleSkill.TableName);
|
||||
this.data = table[id];
|
||||
this._id = id;
|
||||
}
|
||||
/** 技能Id */
|
||||
private _id: number = 0;
|
||||
|
||||
/** 技能Id */
|
||||
get id(): number {
|
||||
return this.data.id;
|
||||
}
|
||||
/** 技能名称 */
|
||||
get skillName(): string {
|
||||
return this.data.skillName;
|
||||
}
|
||||
/** 技能控制器 */
|
||||
get skillController(): string {
|
||||
return this.data.skillController;
|
||||
}
|
||||
/** 技能参数 */
|
||||
get skillArgs(): string[] {
|
||||
return this.data.skillArgs;
|
||||
}
|
||||
/** 技能介绍 */
|
||||
get skillText(): string {
|
||||
return this.data.skillText;
|
||||
}
|
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "44fbcae1-8514-43b3-8a90-3e68b3f84497",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@@ -1,35 +0,0 @@
|
||||
import { JsonUtil } from "../../../../extensions/ngame/assets/ngame/util/JsonUtil";
|
||||
|
||||
export class TableGRoleSkillEffect {
|
||||
static TableName: string = "GRoleSkillEffect";
|
||||
|
||||
static getAllConfig(): { [id: string]: TableGRoleSkillEffect } {
|
||||
return JsonUtil.get(TableGRoleSkillEffect.TableName);
|
||||
}
|
||||
|
||||
static getConfig(id: number | string) {
|
||||
return TableGRoleSkillEffect.getAllConfig()[id] as TableGRoleSkillEffect;
|
||||
}
|
||||
|
||||
private data: any;
|
||||
|
||||
init(id: number) {
|
||||
var table = JsonUtil.get(TableGRoleSkillEffect.TableName);
|
||||
this.data = table[id];
|
||||
this._id = id;
|
||||
}
|
||||
/** 技能SpineId */
|
||||
private _id: number = 0;
|
||||
|
||||
/** 技能SpineId */
|
||||
get id(): number {
|
||||
return this.data.id;
|
||||
}
|
||||
/** 说明 */
|
||||
get text(): string {
|
||||
return this.data.text;
|
||||
}
|
||||
/** spine路径 */
|
||||
get spine(): string {
|
||||
return this.data.spine;
|
||||
}
|
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "2b4ecb72-b2fb-43c5-8712-3eb6b4c4abe9",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@@ -1,35 +0,0 @@
|
||||
import { JsonUtil } from "../../../../extensions/ngame/assets/ngame/util/JsonUtil";
|
||||
|
||||
export class TableGRoleSkillSpine {
|
||||
static TableName: string = "GRoleSkillSpine";
|
||||
|
||||
static getAllConfig(): { [id: string]: TableGRoleSkillSpine } {
|
||||
return JsonUtil.get(TableGRoleSkillSpine.TableName);
|
||||
}
|
||||
|
||||
static getConfig(id: number | string) {
|
||||
return TableGRoleSkillSpine.getAllConfig()[id] as TableGRoleSkillSpine;
|
||||
}
|
||||
|
||||
private data: any;
|
||||
|
||||
init(id: number) {
|
||||
var table = JsonUtil.get(TableGRoleSkillSpine.TableName);
|
||||
this.data = table[id];
|
||||
this._id = id;
|
||||
}
|
||||
/** 技能SpineId */
|
||||
private _id: number = 0;
|
||||
|
||||
/** 技能SpineId */
|
||||
get id(): number {
|
||||
return this.data.id;
|
||||
}
|
||||
/** 说明 */
|
||||
get text(): string {
|
||||
return this.data.text;
|
||||
}
|
||||
/** spine路径 */
|
||||
get spine(): string {
|
||||
return this.data.spine;
|
||||
}
|
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "19c80511-21b9-4037-b717-48720ff61578",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@@ -16,16 +16,11 @@ import axios from "../../extensions/ngame/assets/plugins/axios.js";
|
||||
import GBattleModeManager from "./battle/GBattleModeManager";
|
||||
import { GLayer, UIConfig } from "./ui/UIConfig";
|
||||
import JLoaderSystem from "../../extensions/ngame/assets/ngame/system/JLoaderSystem";
|
||||
import { TableGRole } from "../resources/config/ts/TableGRole";
|
||||
import { sp } from "cc";
|
||||
import { TableGRoleAttack } from "../resources/config/ts/TableGRoleAttack";
|
||||
import { SpriteFrame } from "cc";
|
||||
import { TableGRoleAttackBullet } from "../resources/config/ts/TableGRoleAttackBullet";
|
||||
import { TableGRoleAttackEffect } from "../resources/config/ts/TableGRoleAttackEffect";
|
||||
import { TableGRoleSkill } from "../resources/config/ts/TableGRoleSkill";
|
||||
import { TableGRoleSkillEffect } from "../resources/config/ts/TableGRoleSkillEffect";
|
||||
import { TableGMap } from "../resources/config/ts/TableGMap";
|
||||
import Loading from "../../extensions/ngame/assets/ngame/util/Loading";
|
||||
import { TB, Tables } from "../resources/config/data/schema";
|
||||
import { JsonAsset } from "cc";
|
||||
|
||||
let IP = "kyu.jisol.cn";
|
||||
|
||||
@@ -104,37 +99,33 @@ export abstract class JNGSyncProtoBase<T> extends JNSyncFrameProtoComponent<T>{
|
||||
|
||||
}
|
||||
|
||||
export var TD:Tables = null;
|
||||
//读写config
|
||||
export class JNGConfig extends SystemBase{
|
||||
|
||||
static loading = "JNGConfig";
|
||||
|
||||
//配置JSON加载
|
||||
jsons:JsonLoad[] = [
|
||||
{name:TableGRole.TableName}, //角色
|
||||
{name:TableGRoleAttack.TableName}, //角色攻击
|
||||
{name:TableGRoleAttackBullet.TableName}, //角色攻击子弹
|
||||
{name:TableGRoleAttackEffect.TableName}, //角色攻击特效
|
||||
{name:TableGRoleSkill.TableName}, //角色技能
|
||||
{name:TableGRoleSkillEffect.TableName}, //角色技能特效
|
||||
{name:TableGMap.TableName}, //游戏地图
|
||||
].map((table) => {
|
||||
return {
|
||||
name:table.name,
|
||||
bundle:"resources",
|
||||
path:"config/game/"
|
||||
}
|
||||
});
|
||||
|
||||
async onInit(): Promise<any> {
|
||||
|
||||
app.loading.setCurrent(JNGConfig.loading);
|
||||
|
||||
for (const key in this.jsons) {
|
||||
const load = this.jsons[key];
|
||||
let json2 = resources.getDirWithPath("config/json/",JsonAsset).map((info) => {
|
||||
let args = info.path.split("/");
|
||||
return {
|
||||
name:args[args.length - 1],
|
||||
bundle:"resources",
|
||||
path:"config/json/"
|
||||
}
|
||||
})
|
||||
|
||||
for (const key in json2) {
|
||||
const load = json2[key];
|
||||
await JsonUtil.load(load);
|
||||
}
|
||||
|
||||
TD = new Tables((file) => JsonUtil.get(file))
|
||||
console.log(TD);
|
||||
|
||||
app.loading.ok(JNGConfig.loading);
|
||||
}
|
||||
|
||||
@@ -146,10 +137,11 @@ export class JLoaderBattle extends JLoaderSystem{
|
||||
static loading = "JLoaderBattle";
|
||||
static loadingInit = "JLoaderBattle_Init";
|
||||
|
||||
skData:{[id:number]:sp.SkeletonData} = {}; //角色Spine
|
||||
bullets:{[id:number]:SpriteFrame} = {}; //子弹
|
||||
effects:{[id:number]:sp.SkeletonData} = {}; //Spine特效
|
||||
maps:{[id:number]:SpriteFrame[]} = {}; //地图
|
||||
roleSpine:{[id:number]:sp.SkeletonData} = {}; //角色Spine
|
||||
roleResImage:{[id:number]:SpriteFrame} = {}; //角色战斗素材图片
|
||||
roleResSpine:{[id:number]:sp.SkeletonData} = {}; //角色战斗素材Spine
|
||||
effects:{[id:number]:sp.SkeletonData} = {}; //Spine特效
|
||||
maps:{[id:number]:SpriteFrame[]} = {}; //地图
|
||||
|
||||
async onInit(): Promise<any> {
|
||||
|
||||
@@ -162,43 +154,33 @@ export class JLoaderBattle extends JLoaderSystem{
|
||||
app.loading.setCurrent(JLoaderBattle.loadingInit);
|
||||
|
||||
//将配置表的角色都读取出来
|
||||
for (const info of Object.values(TableGRole.getAllConfig())) {
|
||||
this.skData[info.id] = await (new Promise(r => {
|
||||
for (const info of TD.TbGRole.getDataMap().values()) {
|
||||
this.roleSpine[info.id] = await (new Promise(r => {
|
||||
this.bundle.load(info.spine,sp.SkeletonData,(err,data) => {
|
||||
r(data);
|
||||
})
|
||||
}))
|
||||
}
|
||||
|
||||
//将所有子弹读取出来
|
||||
for (const info of Object.values(TableGRoleAttackBullet.getAllConfig())) {
|
||||
this.bullets[info.id] = await (new Promise(r => {
|
||||
this.bundle.load(info.bulletSrc,SpriteFrame,(err,data) => {
|
||||
r(data);
|
||||
})
|
||||
}))
|
||||
}
|
||||
|
||||
//攻击特效读取
|
||||
for (const info of Object.values(TableGRoleAttackEffect.getAllConfig())) {
|
||||
this.effects[info.id] = await (new Promise(r => {
|
||||
this.bundle.load(info.spine,sp.SkeletonData,(err,data) => {
|
||||
r(data);
|
||||
})
|
||||
}))
|
||||
}
|
||||
|
||||
//技能特效读取
|
||||
for (const info of Object.values(TableGRoleSkillEffect.getAllConfig())) {
|
||||
this.effects[info.id] = await (new Promise(r => {
|
||||
this.bundle.load(info.spine,sp.SkeletonData,(err,data) => {
|
||||
r(data);
|
||||
})
|
||||
}))
|
||||
//读取角色战斗素材
|
||||
for(const info of TD.TbGRoleBattleRes.getDataMap().values()){
|
||||
if(info.resType == "Spine"){
|
||||
this.roleResSpine[info.id] = await (new Promise(r => {
|
||||
this.bundle.load(info.resSrc,sp.SkeletonData,(err,data) => {
|
||||
r(data);
|
||||
})
|
||||
}))
|
||||
}else{
|
||||
this.roleResImage[info.id] = await (new Promise(r => {
|
||||
this.bundle.load(info.resSrc,SpriteFrame,(err,data) => {
|
||||
r(data);
|
||||
})
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
//读取地图
|
||||
for (const info of Object.values(TableGMap.getAllConfig())) {
|
||||
for (const info of TD.TbGMap.getDataMap().values()) {
|
||||
|
||||
this.maps[info.id] = await (Promise.all(["1","2","3"].map(index => `map${index}`).map(key => {
|
||||
return new Promise<SpriteFrame>(r => {
|
||||
@@ -234,5 +216,5 @@ export const app = {
|
||||
[JNGConfig.loading]:{title:"加载配置文件"},
|
||||
[JLoaderBattle.loading]:{title:"加载战斗资源"},
|
||||
[JLoaderBattle.loadingInit]:{title:"初始化战斗资源"},
|
||||
})
|
||||
}),
|
||||
}
|
@@ -2,7 +2,6 @@ import { _decorator, Component, director, instantiate, Node, Prefab } from 'cc';
|
||||
import { app } from './App';
|
||||
import { JNGame } from '../../extensions/ngame/assets/ngame/JNGame';
|
||||
import { JNSyncAction } from '../../extensions/ngame/assets/ngame/sync/JNSyncAction';
|
||||
import { TableGRole } from '../resources/config/ts/TableGRole';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('Main')
|
||||
@@ -24,13 +23,11 @@ export class Main extends Component {
|
||||
{path:"proto/GDemo"}
|
||||
]);
|
||||
|
||||
console.log("TableGRole",TableGRole.getAllConfig())
|
||||
|
||||
//发生帧同步开始
|
||||
app.socket.Send(JNSyncAction.NSyncFrameStart);
|
||||
|
||||
// 创建世界
|
||||
// director.getScene().addChild(instantiate(this.WorldPrefab));
|
||||
director.getScene().addChild(instantiate(this.WorldPrefab));
|
||||
|
||||
}
|
||||
|
||||
|
@@ -1,14 +1,10 @@
|
||||
import { Node } from "cc";
|
||||
import { TableGRoleAttack } from "../../../../resources/config/ts/TableGRoleAttack";
|
||||
import GRoleBase from "../role/GRoleBase";
|
||||
import GAttackNormal from "./GAttackNormal";
|
||||
import GAttackParabolicBangRemote from "./GAttackParabolicBangRemote";
|
||||
import { UITransform } from "cc";
|
||||
import GButtleBase from "../bullet/GButtleBase";
|
||||
import { GFSMAnimBase } from "../fsm/GFSMAnimBase";
|
||||
import GFSMBase from "../fsm/GFSMBase";
|
||||
import GRoleDefault from "../role/GRoleDefault";
|
||||
import GNode from "../common/GNode";
|
||||
import { TB } from "../../../../resources/config/data/schema";
|
||||
|
||||
//攻击子弹类
|
||||
export class GAttackBullet{
|
||||
@@ -26,7 +22,7 @@ export class GAttackBullet{
|
||||
|
||||
//攻击方式基类
|
||||
export interface GAttackBase{
|
||||
attack(role:GRoleDefault,info:TableGRoleAttack);
|
||||
attack(role:GRoleDefault,info:TB.TbGRoleAttack);
|
||||
}
|
||||
|
||||
//攻击方式
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { TableGRoleAttack } from "../../../../resources/config/ts/TableGRoleAttack";
|
||||
import { TB } from "../../../../resources/config/data/schema";
|
||||
import GRoleDefault from "../role/GRoleDefault";
|
||||
import { GAttackBase } from "./GAttack";
|
||||
|
||||
@@ -6,7 +6,7 @@ import { GAttackBase } from "./GAttack";
|
||||
//普通攻击
|
||||
export default class GAttackNormal implements GAttackBase{
|
||||
|
||||
attack(role: GRoleDefault, info: TableGRoleAttack) {
|
||||
attack(role: GRoleDefault, info: TB.TbGRoleAttack) {
|
||||
role.fsm.enemy.onHit();
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import { SpriteFrame } from "cc";
|
||||
import { TableGRoleAttack } from "../../../../resources/config/ts/TableGRoleAttack";
|
||||
import { app } from "../../../App";
|
||||
import { TD, app } from "../../../App";
|
||||
import GRoleBase from "../role/GRoleBase";
|
||||
import { GAttackBase, GAttackBullet } from "./GAttack";
|
||||
import GButtleDefault from "../bullet/GButtleDefault";
|
||||
@@ -9,10 +8,10 @@ import { bezier } from "cc";
|
||||
import { v2 } from "cc";
|
||||
import { Vec2 } from "cc";
|
||||
import GEffectUtil from "../common/GEffectUtil";
|
||||
import { TableGRoleAttackEffect } from "../../../../resources/config/ts/TableGRoleAttackEffect";
|
||||
import GDetection from "../common/GDetection";
|
||||
import { rect } from "cc";
|
||||
import GRoleDefault from "../role/GRoleDefault";
|
||||
import { TB } from "../../../../resources/config/data/schema";
|
||||
|
||||
/**
|
||||
* 抛物线 爆炸普攻
|
||||
@@ -20,15 +19,15 @@ import GRoleDefault from "../role/GRoleDefault";
|
||||
*/
|
||||
export default class GAttackParabolicRemote implements GAttackBase{
|
||||
|
||||
attack(role: GRoleDefault, info: TableGRoleAttack): void {
|
||||
attack(role: GRoleDefault, info: TB.TbGRoleAttack): void {
|
||||
|
||||
let enemy = role.fsm.enemy;
|
||||
if(!enemy) return;
|
||||
|
||||
let image:SpriteFrame = app.battleRes.bullets[info.attackArgs[0]];
|
||||
let image:SpriteFrame = app.battleRes.roleResImage[info.attackArgs[0]];
|
||||
let bang = {
|
||||
ske: app.battleRes.effects[info.attackArgs[1]],
|
||||
info: TableGRoleAttackEffect.getConfig(info.attackArgs[1])
|
||||
ske: app.battleRes.roleResSpine[info.attackArgs[1]],
|
||||
info: TD.TbGRoleBattleRes.get(parseInt(info.attackArgs[1]))
|
||||
};
|
||||
let bone = role.spine.findBone(info.attackArgs[2]);
|
||||
let scale:number = parseFloat(info.attackArgs[3]);
|
||||
@@ -73,7 +72,7 @@ export default class GAttackParabolicRemote implements GAttackBase{
|
||||
let effect = GEffectUtil.createOne(bang.ske);
|
||||
role.mode.addGNode(effect.node,bullet.node.worldPosition);
|
||||
//获取默认动画
|
||||
effect.setAnimation(0,bang.info.animation,false);
|
||||
effect.setAnimation(0,"animation",false);
|
||||
//销毁
|
||||
bullet.node.destroy();
|
||||
|
||||
|
@@ -1,11 +1,9 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import { app, JNGSyncBase } from '../../../../App';
|
||||
import { SpriteFrame } from 'cc';
|
||||
import { TableGMap } from '../../../../../resources/config/ts/TableGMap';
|
||||
import { Sprite } from 'cc';
|
||||
import { UITransform } from 'cc';
|
||||
import { v3 } from 'cc';
|
||||
import { Vec2 } from 'cc';
|
||||
import { size } from 'cc';
|
||||
import GNode from '../GNode';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
@@ -3,13 +3,11 @@ import GObject, { GTowards } from "../GObject";
|
||||
import { JNFrameInfo } from "../../../../../extensions/ngame/assets/ngame/sync/frame/JNSyncFrame";
|
||||
import { Vec2 } from "cc";
|
||||
import { v3 } from "cc";
|
||||
import { TableGRole } from "../../../../resources/config/ts/TableGRole";
|
||||
import { TableGRoleSkill } from "../../../../resources/config/ts/TableGRoleSkill";
|
||||
import { GSkill, GSkillBase, GSkillState } from "../../skill/GSkill";
|
||||
import JNSkeleton from "../../../../../extensions/ngame/assets/ngame/sync/frame/game/spine/JNFrameSkeleton";
|
||||
import { GFSMAnimBase } from "../fsm/GFSMAnimBase";
|
||||
import GFSMBase from "../fsm/GFSMBase";
|
||||
import { app } from "../../../App";
|
||||
import { TB } from "../../../../resources/config/data/schema";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
export enum GRoleAnimEvent{
|
||||
@@ -23,7 +21,7 @@ export default abstract class GRoleBase<T> extends GObject<T>{
|
||||
spine:JNSkeleton;
|
||||
|
||||
//角色
|
||||
role:TableGRole;
|
||||
role:TB.TbGRole;
|
||||
|
||||
//状态机
|
||||
fsm:GFSMBase;
|
||||
@@ -80,9 +78,9 @@ export default abstract class GRoleBase<T> extends GObject<T>{
|
||||
}
|
||||
|
||||
//初始化
|
||||
protected init(role:TableGRole){
|
||||
protected init(role:TB.TbGRole){
|
||||
if(this.spine)
|
||||
this.spine.skeletonData = app.battleRes.skData[role.id];
|
||||
this.spine.skeletonData = app.battleRes.roleSpine[role.id];
|
||||
}
|
||||
|
||||
//创建一个状态机
|
||||
|
@@ -2,19 +2,18 @@ import { _decorator } from "cc";
|
||||
import GRoleBase, { GRoleAnimEvent } from "./GRoleBase";
|
||||
import { ProgressBar } from "cc";
|
||||
import { JNFrameInfo } from "../../../../../extensions/ngame/assets/ngame/sync/frame/JNSyncFrame";
|
||||
import { TableGRole } from "../../../../resources/config/ts/TableGRole";
|
||||
import { GFSMAnimBase, GFSMBattleAminEnum } from "../fsm/GFSMAnimBase";
|
||||
import { GFSMDefaultAnim } from "../fsm/Default/GFSMDefaultAnim";
|
||||
import GFSMDefault from "../fsm/Default/GFSMDefault";
|
||||
import { JEasing } from "../../../../../extensions/ngame/assets/ngame/sync/frame/game/tween/JNFrameTween";
|
||||
import { TableGRoleAttack } from "../../../../resources/config/ts/TableGRoleAttack";
|
||||
import { GAttack } from "../attack/GAttack";
|
||||
import { v2 } from "cc";
|
||||
import { GTactical } from "../../entity/GTactical";
|
||||
import { Vec2 } from "cc";
|
||||
import { GSkill, GSkillBase, GSkillState } from "../../skill/GSkill";
|
||||
import { TableGRoleSkill } from "../../../../resources/config/ts/TableGRoleSkill";
|
||||
import JNFrameTime from "../../../../../extensions/ngame/assets/ngame/sync/frame/game/time/JNFrameTime";
|
||||
import { TB } from "../../../../resources/config/data/schema";
|
||||
import { TD } from "../../../App";
|
||||
const { property,ccclass } = _decorator;
|
||||
|
||||
//默认角色类
|
||||
@@ -77,7 +76,7 @@ export default class GRoleDefault extends GRoleBase<{}>{
|
||||
}
|
||||
|
||||
//初始化
|
||||
onInit(type:number,role:TableGRole,tactical:GTactical,tacticalIndex:number){
|
||||
onInit(type:number,role:TB.TbGRole,tactical:GTactical,tacticalIndex:number){
|
||||
super.init(role);
|
||||
this.type = type;
|
||||
|
||||
@@ -89,7 +88,7 @@ export default class GRoleDefault extends GRoleBase<{}>{
|
||||
|
||||
// 设置技能
|
||||
this.skills = role.roleSkillIds.map(skillId => {
|
||||
let info = TableGRoleSkill.getConfig(skillId);
|
||||
let info = TD.TbGRoleSkill.get(skillId);
|
||||
return (new GSkill[info.skillController]()).bind(this,info);
|
||||
})
|
||||
|
||||
@@ -123,7 +122,7 @@ export default class GRoleDefault extends GRoleBase<{}>{
|
||||
if(!this.fsm.enemy) return;
|
||||
console.log(`播放动画[${this.nId}] onAttack`,this.fsm.enemy.nId)
|
||||
//敌人扣血
|
||||
let info = TableGRoleAttack.getConfig(this.role.id);
|
||||
let info = TD.TbGRoleAttack.get(this.role.id);
|
||||
(new GAttack[info.attackWay]()).attack(this,info);
|
||||
this.attackCallbacks.forEach(fun => fun());
|
||||
}
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import { TableGRole } from "../../../resources/config/ts/TableGRole";
|
||||
import { GFSMAnimBase } from "../base/fsm/GFSMAnimBase";
|
||||
import GFSMBase from "../base/fsm/GFSMBase";
|
||||
import { TB } from "../../../resources/config/data/schema";
|
||||
import { TD } from "../../App";
|
||||
import GRoleBase from "../base/role/GRoleBase";
|
||||
|
||||
//角色工具类
|
||||
@@ -17,13 +16,13 @@ export class GRoleUtil{
|
||||
}
|
||||
|
||||
//通过Id 获取 GRole
|
||||
static getGRole(id:number):TableGRole{
|
||||
let info:TableGRole;
|
||||
if(!(info = TableGRole.getConfig(id))) return null;
|
||||
static getGRole(id:number):TB.TbGRole{
|
||||
let info:TB.TbGRole;
|
||||
if(!(info = TD.TbGRole.get(id))) return null;
|
||||
return info
|
||||
}
|
||||
|
||||
static getGRoles(ids:number[]):TableGRole[]{
|
||||
static getGRoles(ids:number[]):TB.TbGRole[]{
|
||||
return ids.map(id => GRoleUtil.getGRole(id));
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import { Vec2 } from "cc";
|
||||
import { TableGRole } from "../../../resources/config/ts/TableGRole";
|
||||
import GBaseMode from "../GBaseMode";
|
||||
import { GRoleUtil } from "../entity/GRole";
|
||||
import { GTactical } from "../entity/GTactical";
|
||||
@@ -12,11 +11,11 @@ import { JNFrameInfo } from "../../../../extensions/ngame/assets/ngame/sync/fram
|
||||
import { GMapLoop } from "../base/common/map/GMapLoop";
|
||||
import { Node } from "cc";
|
||||
import JNFrameTime from "../../../../extensions/ngame/assets/ngame/sync/frame/game/time/JNFrameTime";
|
||||
import { TableGMap } from "../../../resources/config/ts/TableGMap";
|
||||
import { app } from "../../App";
|
||||
import { TD, app } from "../../App";
|
||||
import { v3 } from "cc";
|
||||
import { v2 } from "cc";
|
||||
import GFSMOnHookMode from "./OnHook/GFSMOnHookMode";
|
||||
import { TB } from "../../../resources/config/data/schema";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
//挂机模式状态
|
||||
@@ -37,7 +36,7 @@ export interface GOnHookInfo{
|
||||
//阵法
|
||||
tactical: GTactical;
|
||||
//宠物列表
|
||||
roles: TableGRole[];
|
||||
roles: TB.TbGRole[];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -80,7 +79,7 @@ export default class GOnHookMode extends GBaseMode<{}>{
|
||||
enemyRoles: GRoleDefault[] = [];
|
||||
|
||||
//地图信息
|
||||
mapInfo:TableGMap;
|
||||
mapInfo:TB.TbGMap;
|
||||
|
||||
//每一波怪的距离
|
||||
everyX:number = 600;
|
||||
@@ -113,7 +112,7 @@ export default class GOnHookMode extends GBaseMode<{}>{
|
||||
this.fsm = new GFSMOnHookMode(this);
|
||||
|
||||
//初始化地图
|
||||
this.mapInfo = TableGMap.getConfig(60001);
|
||||
this.mapInfo = TD.TbGMap.get(60001);
|
||||
this.map1.init(app.battleRes.maps[60001][0],1);
|
||||
this.map2.init(app.battleRes.maps[60001][1],1);
|
||||
this.map3.init(app.battleRes.maps[60001][2],1,app.battleRes.maps[60001][1].width,app.battleRes.maps[60001][1].height);
|
||||
@@ -169,7 +168,7 @@ export default class GOnHookMode extends GBaseMode<{}>{
|
||||
}
|
||||
|
||||
//生成宠物
|
||||
onGenRole(type: GOnHookModePlayerEnum,index:number,info:TableGRole) {
|
||||
onGenRole(type: GOnHookModePlayerEnum,index:number,info:TB.TbGRole) {
|
||||
|
||||
let tactical = this.getInfo(type).tactical;
|
||||
let pos:Vec2 = this.getInfo(type).tactical.getPosition(index);
|
||||
|
@@ -5,9 +5,9 @@ import { Prefab } from "cc";
|
||||
import { instantiate } from "cc";
|
||||
import { Vec2 } from "cc";
|
||||
import { GRoleUtil } from "../entity/GRole";
|
||||
import { TableGRole } from "../../../resources/config/ts/TableGRole";
|
||||
import GRoleDefault from "../base/role/GRoleDefault";
|
||||
import { v3 } from "cc";
|
||||
import { TB } from "../../../resources/config/data/schema";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
//PVP 角色
|
||||
@@ -21,7 +21,7 @@ export interface GPVPModePlayerInfo{
|
||||
//阵法
|
||||
tactical: GTactical;
|
||||
//宠物列表
|
||||
roles: TableGRole[];
|
||||
roles: TB.TbGRole[];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -79,7 +79,7 @@ export default class GPVPMode extends GBaseMode<{}>{
|
||||
}
|
||||
|
||||
//生成角色
|
||||
onGenRole(type: GPVPModePlayerEnum,index:number,info:TableGRole) {
|
||||
onGenRole(type: GPVPModePlayerEnum,index:number,info:TB.TbGRole) {
|
||||
|
||||
let tactical = this.getInfo(type).tactical;
|
||||
let pos:Vec2 = this.getInfo(type).tactical.getPosition(index);
|
||||
|
@@ -1,8 +1,7 @@
|
||||
import { TableGRoleSkill } from "../../../resources/config/ts/TableGRoleSkill";
|
||||
import GRoleBase from "../base/role/GRoleBase";
|
||||
import GSkillCrazySquirrel from "./RoleSkill/疯狂松鼠/GSkillCrazySquirrel";
|
||||
import GSkillBulbasaurDoubleHit from "./RoleSkill/妙蛙种子/GSkillBulbasaurDoubleHit";
|
||||
import GRoleDefault from "../base/role/GRoleDefault";
|
||||
import { TB } from "../../../resources/config/data/schema";
|
||||
|
||||
//技能状态
|
||||
export enum GSkillState{
|
||||
@@ -15,7 +14,7 @@ export enum GSkillState{
|
||||
export interface GSkillBase {
|
||||
|
||||
//设置
|
||||
bind(role:GRoleDefault,info:TableGRoleSkill):GSkillBase;
|
||||
bind(role:GRoleDefault,info:TB.TbGRoleSkill):GSkillBase;
|
||||
|
||||
//是否允许释放
|
||||
isRelease():boolean;
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import { TableGRoleSkill } from "../../../resources/config/ts/TableGRoleSkill";
|
||||
import GRoleBase from "../base/role/GRoleBase";
|
||||
import { TB } from "../../../resources/config/data/schema";
|
||||
import GRoleDefault from "../base/role/GRoleDefault";
|
||||
import { GSkillBase, GSkillState } from "./GSkill";
|
||||
|
||||
@@ -12,7 +11,7 @@ export default abstract class GSkillAngerBase implements GSkillBase {
|
||||
//怒气最大值
|
||||
angerMax:number = 0;
|
||||
|
||||
bind(role: GRoleDefault, info: TableGRoleSkill): GSkillBase {
|
||||
bind(role: GRoleDefault, info: TB.TbGRoleSkill): GSkillBase {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
isRelease(): boolean {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { TableGRoleSkill } from "../../../resources/config/ts/TableGRoleSkill";
|
||||
import { TB } from "../../../resources/config/data/schema";
|
||||
import GRoleBase from "../base/role/GRoleBase";
|
||||
import GRoleDefault from "../base/role/GRoleDefault";
|
||||
import { GSkillBase, GSkillState } from "./GSkill";
|
||||
@@ -12,7 +12,7 @@ export default abstract class GSkillCDBase implements GSkillBase {
|
||||
//冷却时间
|
||||
cdTime:number = 0;
|
||||
|
||||
bind(role:GRoleDefault,info: TableGRoleSkill):GSkillCDBase {
|
||||
bind(role:GRoleDefault,info: TB.TbGRoleSkill):GSkillCDBase {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { TableGRoleSkill } from "../../../../../resources/config/ts/TableGRoleSkill";
|
||||
import { TB } from "../../../../../resources/config/data/schema";
|
||||
import GRoleBase from "../../../base/role/GRoleBase";
|
||||
import GRoleDefault from "../../../base/role/GRoleDefault";
|
||||
import GSkillAngerBase from "../../GSkillAngerBase";
|
||||
@@ -6,9 +6,9 @@ import GSkillAngerBase from "../../GSkillAngerBase";
|
||||
export default class GSkillBulbasaurDoubleHit extends GSkillAngerBase{
|
||||
|
||||
role:GRoleDefault;
|
||||
info: TableGRoleSkill;
|
||||
info: TB.TbGRoleSkill;
|
||||
|
||||
bind(role:GRoleDefault,info: TableGRoleSkill):GSkillBulbasaurDoubleHit {
|
||||
bind(role:GRoleDefault,info: TB.TbGRoleSkill):GSkillBulbasaurDoubleHit {
|
||||
//技能冷却
|
||||
this.role = role;
|
||||
this.info = info;
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import { v2 } from "cc";
|
||||
import { JTween } from "../../../../../../extensions/ngame/assets/ngame/sync/frame/game/tween/JNFrameTween";
|
||||
import { TableGRoleSkill } from "../../../../../resources/config/ts/TableGRoleSkill";
|
||||
import { app } from "../../../../App";
|
||||
import GSpine from "../../../base/common/GSpine";
|
||||
import GRoleBase from "../../../base/role/GRoleBase";
|
||||
@@ -10,6 +9,7 @@ import GBaseMode from "../../../GBaseMode";
|
||||
import GDetection from "../../../base/common/GDetection";
|
||||
import { rect } from "cc";
|
||||
import GRoleDefault from "../../../base/role/GRoleDefault";
|
||||
import { TB } from "../../../../../resources/config/data/schema";
|
||||
|
||||
/**
|
||||
* 疯狂松鼠技能
|
||||
@@ -18,9 +18,9 @@ import GRoleDefault from "../../../base/role/GRoleDefault";
|
||||
export default class GSkillCrazySquirrel extends GSkillCDBase{
|
||||
|
||||
role:GRoleDefault;
|
||||
info: TableGRoleSkill;
|
||||
info: TB.TbGRoleSkill;
|
||||
|
||||
bind(role:GRoleDefault,info: TableGRoleSkill):GSkillCrazySquirrel {
|
||||
bind(role:GRoleDefault,info: TB.TbGRoleSkill):GSkillCrazySquirrel {
|
||||
//技能冷却
|
||||
this.cdTatal = parseInt(info.skillArgs[0]);
|
||||
this.role = role;
|
||||
@@ -40,14 +40,14 @@ export default class GSkillCrazySquirrel extends GSkillCDBase{
|
||||
let ah = parseInt(this.info.skillArgs[2]);
|
||||
|
||||
//出现松鼠丢炸弹
|
||||
GSpine.onPlayAnotherSpine(this.role,app.battleRes.effects[50001],"skill",{
|
||||
GSpine.onPlayAnotherSpine(this.role,app.battleRes.roleResSpine[30003],"skill",{
|
||||
end:() => {
|
||||
//从天而降
|
||||
let pos = enemy.v2World.add(v2(0,1000));
|
||||
let end = enemy.v2World;
|
||||
|
||||
//生成火球
|
||||
let spine = GSpine.onCreateSpine(app.battleRes.effects[50002]);
|
||||
let spine = GSpine.onCreateSpine(app.battleRes.roleResSpine[30004]);
|
||||
this.role.mode.addGNode(spine.node,pos);
|
||||
spine.setAnimation(0,"animation",true);
|
||||
spine.node.angle = 90;
|
||||
@@ -59,7 +59,7 @@ export default class GSkillCrazySquirrel extends GSkillCDBase{
|
||||
.onComplete(() => {
|
||||
let world = spine.node.worldPosition;
|
||||
spine.node.destroy();
|
||||
GSpine.onPlaySceneSpine(scene,v2(world.x,world.y),app.battleRes.effects[50003],"animation");
|
||||
GSpine.onPlaySceneSpine(scene,v2(world.x,world.y),app.battleRes.roleResSpine[30005],"animation");
|
||||
console.log(GDetection.testAABBRole(rect(world.x,world.y,aw,ah)).length)
|
||||
GDetection.testAABBRole(rect(world.x,world.y,aw,ah)).forEach(role =>{
|
||||
role.onHit();
|
||||
|
Reference in New Issue
Block a user