重构战斗资源加载 , 新添加宠物

This commit is contained in:
DESKTOP-5RP3AKU\Jisol
2023-12-07 02:14:18 +08:00
parent 1dbbc6c79b
commit 931f580082
257 changed files with 15654 additions and 348 deletions

View File

@@ -17,6 +17,7 @@ import com.google.gson.JsonObject;
public final class TbBattleResource extends AbstractBean {
public TbBattleResource(JsonObject _buf) {
id = _buf.get("id").getAsInt();
name = _buf.get("name").getAsString();
path = _buf.get("path").getAsString();
type = _buf.get("type").getAsInt();
}
@@ -29,12 +30,16 @@ public final class TbBattleResource extends AbstractBean {
* id
*/
public final int id;
/**
* 资源介绍
*/
public final String name;
/**
* 资源路径
*/
public final String path;
/**
* 资源类型(0.Spine)
* 资源类型(0.Spine,1.Sprite)
*/
public final int type;
@@ -47,6 +52,7 @@ public final class TbBattleResource extends AbstractBean {
public String toString() {
return "{ "
+ "(format_field_name __code_style field.name):" + id + ","
+ "(format_field_name __code_style field.name):" + name + ","
+ "(format_field_name __code_style field.name):" + path + ","
+ "(format_field_name __code_style field.name):" + type + ","
+ "}";

View File

@@ -18,9 +18,9 @@ public final class TbGMap extends AbstractBean {
public TbGMap(JsonObject _buf) {
id = _buf.get("id").getAsInt();
mapName = _buf.get("mapName").getAsString();
map1 = _buf.get("map1").getAsString();
map2 = _buf.get("map2").getAsString();
map3 = _buf.get("map3").getAsString();
map1 = _buf.get("map1").getAsInt();
map2 = _buf.get("map2").getAsInt();
map3 = _buf.get("map3").getAsInt();
map1OffsetY = _buf.get("map1OffsetY").getAsInt();
map2OffsetY = _buf.get("map2OffsetY").getAsInt();
map3OffsetY = _buf.get("map3OffsetY").getAsInt();
@@ -42,15 +42,15 @@ public final class TbGMap extends AbstractBean {
/**
* 地图1(前)
*/
public final String map1;
public final int map1;
/**
* 地图2(后)
*/
public final String map2;
public final int map2;
/**
* 地图3(天空)
*/
public final String map3;
public final int map3;
/**
* 地图1(前) 偏移量Y
*/

View File

@@ -18,7 +18,7 @@ public final class TbGRole extends AbstractBean {
public TbGRole(JsonObject _buf) {
id = _buf.get("id").getAsInt();
roleName = _buf.get("roleName").getAsString();
spine = _buf.get("spine").getAsString();
spine = _buf.get("spine").getAsInt();
{ com.google.gson.JsonArray _json0_ = _buf.get("roleSkillIds").getAsJsonArray(); int __n0 = _json0_.size(); roleSkillIds = new int[__n0]; int __index0=0; for(JsonElement __e0 : _json0_) { int __v0; __v0 = __e0.getAsInt(); roleSkillIds[__index0++] = __v0; } }
roleAttackRange = _buf.get("roleAttackRange").getAsInt();
}
@@ -36,9 +36,9 @@ public final class TbGRole extends AbstractBean {
*/
public final String roleName;
/**
* 描述
* 角色Spine资源Id
*/
public final String spine;
public final int spine;
/**
* 角色技能Id列表
*/

View File

@@ -1,61 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg.TB;
import luban.*;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
public final class TbGRoleBattleRes extends AbstractBean {
public TbGRoleBattleRes(JsonObject _buf) {
id = _buf.get("id").getAsInt();
resName = _buf.get("resName").getAsString();
resType = _buf.get("resType").getAsString();
resSrc = _buf.get("resSrc").getAsString();
}
public static TbGRoleBattleRes deserialize(JsonObject _buf) {
return new cfg.TB.TbGRoleBattleRes(_buf);
}
/**
* id
*/
public final int id;
/**
* 资源名称
*/
public final String resName;
/**
* 资源类型
*/
public final String resType;
/**
* 资源地址
*/
public final String resSrc;
public static final int __ID__ = -29806215;
@Override
public int getTypeId() { return __ID__; }
@Override
public String toString() {
return "{ "
+ "(format_field_name __code_style field.name):" + id + ","
+ "(format_field_name __code_style field.name):" + resName + ","
+ "(format_field_name __code_style field.name):" + resType + ","
+ "(format_field_name __code_style field.name):" + resSrc + ","
+ "}";
}
}

View File

@@ -25,8 +25,6 @@ public final class Tables
public cfg.TbGRole getTbGRole() { return _tbgrole; }
private final cfg.TbGRoleAttack _tbgroleattack;
public cfg.TbGRoleAttack getTbGRoleAttack() { return _tbgroleattack; }
private final cfg.TbGRoleBattleRes _tbgrolebattleres;
public cfg.TbGRoleBattleRes getTbGRoleBattleRes() { return _tbgrolebattleres; }
private final cfg.TbGRoleSkill _tbgroleskill;
public cfg.TbGRoleSkill getTbGRoleSkill() { return _tbgroleskill; }
private final cfg.TbGMap _tbgmap;
@@ -58,7 +56,6 @@ public final class Tables
_tbgglobal = new cfg.TbGGlobal(loader.load("tbgglobal"));
_tbgrole = new cfg.TbGRole(loader.load("tbgrole"));
_tbgroleattack = new cfg.TbGRoleAttack(loader.load("tbgroleattack"));
_tbgrolebattleres = new cfg.TbGRoleBattleRes(loader.load("tbgrolebattleres"));
_tbgroleskill = new cfg.TbGRoleSkill(loader.load("tbgroleskill"));
_tbgmap = new cfg.TbGMap(loader.load("tbgmap"));
_tbgonhookglobal = new cfg.TbGOnHookGlobal(loader.load("tbgonhookglobal"));

View File

@@ -1,37 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg;
import luban.*;
import com.google.gson.JsonElement;
public final class TbGRoleBattleRes {
private final java.util.HashMap<Integer, cfg.TB.TbGRoleBattleRes> _dataMap;
private final java.util.ArrayList<cfg.TB.TbGRoleBattleRes> _dataList;
public TbGRoleBattleRes(JsonElement _buf) {
_dataMap = new java.util.HashMap<Integer, cfg.TB.TbGRoleBattleRes>();
_dataList = new java.util.ArrayList<cfg.TB.TbGRoleBattleRes>();
for (com.google.gson.JsonElement _e_ : _buf.getAsJsonArray()) {
cfg.TB.TbGRoleBattleRes _v;
_v = cfg.TB.TbGRoleBattleRes.deserialize(_e_.getAsJsonObject());
_dataList.add(_v);
_dataMap.put(_v.id, _v);
}
}
public java.util.HashMap<Integer, cfg.TB.TbGRoleBattleRes> getDataMap() { return _dataMap; }
public java.util.ArrayList<cfg.TB.TbGRoleBattleRes> getDataList() { return _dataList; }
public cfg.TB.TbGRoleBattleRes get(int key) { return _dataMap.get(key); }
}

View File

@@ -1 +1,98 @@
[]
[
{
"id": 130001,
"name": "宠物:小石头",
"path": "spine/召唤与合成819个Spine/小石头/guaiA1a/spine/guaiA1a",
"type": 0
},
{
"id": 130002,
"name": "宠物:坚强小石",
"path": "spine/召唤与合成819个Spine/坚强小石/guaiA1a_1/spine/guaiA1a",
"type": 0
},
{
"id": 130003,
"name": "宠物:疯狂松鼠",
"path": "spine/召唤与合成819个Spine/疯狂松鼠/guaiA4e_2/spine/guaiA4e",
"type": 0
},
{
"id": 130004,
"name": "宠物:妙蛙种子",
"path": "spine/神奇宝贝/001妙蛙种子/spine/001妙蛙种子",
"type": 0
},
{
"id": 130005,
"name": "宠物:雷吉艾斯",
"path": "spine/神奇宝贝/378雷吉艾斯/spine/378雷吉艾斯",
"type": 0
},
{
"id": 140001,
"name": "爆炸",
"path": "effect/爆炸效果/shouji_01/spine/shouji_01",
"type": 0
},
{
"id": 140002,
"name": "炸弹",
"path": "bullets/疯狂松鼠/attack/spriteFrame",
"type": 1
},
{
"id": 140003,
"name": "疯狂松鼠的技能开始 松鼠向天上丢出炸弹",
"path": "spine/召唤与合成819个Spine/疯狂松鼠/guaiA4es_2/spine/guaiA4es",
"type": 0
},
{
"id": 140004,
"name": "火球",
"path": "effect/子弹效果/base_fly_fire/spine/buff_fire",
"type": 0
},
{
"id": 140005,
"name": "火球爆炸",
"path": "effect/爆炸效果/zhouyu_skill2_2/spine/zhouyu_skill2_2",
"type": 0
},
{
"id": 150001,
"name": "天空城:地图1(前)",
"path": "map/MAP6/MAP6_1/spriteFrame",
"type": 1
},
{
"id": 150002,
"name": "天空城:地图2(后)",
"path": "map/MAP6/MAP6_2/spriteFrame",
"type": 1
},
{
"id": 150003,
"name": "天空城:地图3(天空)",
"path": "map/MAP6/MAP6_3/spriteFrame",
"type": 1
},
{
"id": 150004,
"name": "魔法镇:地图1(前)",
"path": "map/MAP4/MAP4_1/spriteFrame",
"type": 1
},
{
"id": 150005,
"name": "魔法镇:地图2(后)",
"path": "map/MAP4/MAP4_2/spriteFrame",
"type": 1
},
{
"id": 150006,
"name": "魔法镇:地图3(天空)",
"path": "map/MAP4/MAP4_3/spriteFrame",
"type": 1
}
]

View File

@@ -2,9 +2,9 @@
{
"id": 60001,
"mapName": "天空城",
"map1": "map/MAP6/MAP6_1/spriteFrame",
"map2": "map/MAP6/MAP6_2/spriteFrame",
"map3": "map/MAP6/MAP6_3/spriteFrame",
"map1": 150001,
"map2": 150002,
"map3": 150003,
"map1OffsetY": 80,
"map2OffsetY": 520,
"map3OffsetY": 520,
@@ -13,9 +13,9 @@
{
"id": 60002,
"mapName": "魔法镇",
"map1": "map/MAP4/MAP4_1/spriteFrame",
"map2": "map/MAP4/MAP4_2/spriteFrame",
"map3": "map/MAP4/MAP4_3/spriteFrame",
"map1": 150004,
"map2": 150005,
"map3": 150006,
"map1OffsetY": 80,
"map2OffsetY": 520,
"map3OffsetY": 520,

View File

@@ -18,7 +18,8 @@
"mapImage": "ui/map/魔法镇_图片/spriteFrame",
"mapId": 60002,
"petIds": [
10004
10004,
10005
],
"sign": "",
"introduce": "魔法阵 这里有魔法精灵~"

View File

@@ -2,21 +2,21 @@
{
"id": 10001,
"roleName": "小石头",
"spine": "spine/召唤与合成819个Spine/小石头/guaiA1a/spine/guaiA1a",
"spine": 130001,
"roleSkillIds": [],
"roleAttackRange": 100
},
{
"id": 10002,
"roleName": "坚强小石",
"spine": "spine/召唤与合成819个Spine/坚强小石/guaiA1a_1/spine/guaiA1a",
"spine": 130002,
"roleSkillIds": [],
"roleAttackRange": 100
},
{
"id": 10003,
"roleName": "疯狂松鼠",
"spine": "spine/召唤与合成819个Spine/疯狂松鼠/guaiA4e_2/spine/guaiA4e",
"spine": 130003,
"roleSkillIds": [
40001
],
@@ -25,10 +25,17 @@
{
"id": 10004,
"roleName": "妙蛙种子",
"spine": "spine/神奇宝贝/001妙蛙种子/spine/001妙蛙种子",
"spine": 130004,
"roleSkillIds": [
40002
],
"roleAttackRange": 350
},
{
"id": 10005,
"roleName": "雷吉艾斯",
"spine": 130005,
"roleSkillIds": [],
"roleAttackRange": 350
}
]

View File

@@ -13,8 +13,8 @@
"id": 10003,
"attackWay": "ParabolicBangRemote",
"attackArgs": [
"30002",
"30001",
"140002",
"140001",
"timo5 007",
"0.6",
"100",
@@ -25,5 +25,10 @@
"id": 10004,
"attackWay": "Normal",
"attackArgs": []
},
{
"id": 10005,
"attackWay": "Normal",
"attackArgs": []
}
]

View File

@@ -1,32 +0,0 @@
[
{
"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"
}
]