Compare commits
17
Commits
e2fdb660ab
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0077e3449d | ||
|
|
e0488cc790 | ||
|
|
4ac79f0101 | ||
|
|
91b8e177c5 | ||
|
|
051c075183 | ||
|
|
c61eb7fb68 | ||
|
|
02f4c67464 | ||
|
|
ba25ec1926 | ||
|
|
92e1ea0d55 | ||
|
|
1e4d3ef8d7 | ||
|
|
88ed35e757 | ||
|
|
421f8bf619 | ||
|
|
17ee268416 | ||
|
|
5fbeec2476 | ||
|
|
9c54905f85 | ||
|
|
b628a8537c | ||
|
|
091a29db63 |
@@ -0,0 +1,109 @@
|
|||||||
|
---
|
||||||
|
name: code-hygiene
|
||||||
|
description: >-
|
||||||
|
Inspect and clean up code in Unity project according to AGENTS.md
|
||||||
|
null-checking rules, error handling specifications, and anti-defensive programming guidelines.
|
||||||
|
Use this skill whenever the user asks to format code per AGENTS.md, clean up redundant null checks,
|
||||||
|
remove over-defensive fallbacks, or review code hygiene.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Code Hygiene & Defensive Cleanup
|
||||||
|
|
||||||
|
本技能用于规范 Unity 项目中的 C# 代码质量,消除过度防御(Over-Defensive Programming)、冗余判空与静默吞错,严格对齐 `AGENTS.md` 规范与敏捷“Fail Fast”(快速失败)原则。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 一、三项核心红线(AGENTS.md 必须遵守)
|
||||||
|
|
||||||
|
1. **声明处已初始化的变量,之后绝对不判空**
|
||||||
|
- 坏:字段或局部变量已有 `= new List<T>()` / `= new Dictionary<...>()`,后续还写 `if (_list != null)`。
|
||||||
|
- 好:直接使用 `_list.Add(...)`、`_list.Clear()`。
|
||||||
|
|
||||||
|
2. **严禁静态兜底与静默回退(Fail Fast 原则)**
|
||||||
|
- 坏:找不到数据、缺少配置或解析异常时,返回硬编码默认值(如 `global != null ? global.Time : 250` 或 `if (cfg == null) return 10;`)。
|
||||||
|
- 好:异常路径直接 `Log.Error(...)` 报错并中断执行(`return` / 抛异常),绝不用伪造数据让程序带病运行。
|
||||||
|
|
||||||
|
3. **UI 序列化字段与 View 自动绑定字段不做判空**
|
||||||
|
- 坏:`if (View != null && View.sortButton != null)`、`[SerializeField] private Button _btn; ... if (_btn != null)`。
|
||||||
|
- 好:默认信任 Inspector 和 `UIAssetsTools` 自动绑定。若没绑定本应报错暴露,不加空防御掩盖。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 二、六项常见“没必要”的过度防御与坏味道
|
||||||
|
|
||||||
|
在 Unity / UGF / C# 实际开发中,以下写法通常是冗余、降低代码可读性且增加维护负担的:
|
||||||
|
|
||||||
|
### 1. 集合遍历前的非空/长度双重检查
|
||||||
|
- **没必要**:
|
||||||
|
```csharp
|
||||||
|
if (list != null && list.Count > 0)
|
||||||
|
{
|
||||||
|
foreach (var item in list) { ... }
|
||||||
|
}
|
||||||
|
```
|
||||||
|
- **原则**:若列表规范为非空对象(即使为空也是包含 0 个元素的空列表),`foreach` 会自动直接跳过,根本无需任何 `if` 守卫:
|
||||||
|
```csharp
|
||||||
|
foreach (var item in list) { ... }
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. LINQ 与内建构造返回值的非空检查
|
||||||
|
- **没必要**:
|
||||||
|
```csharp
|
||||||
|
var results = items.Where(x => x.Active).ToList();
|
||||||
|
if (results != null) { ... } // ToList() 永远返回新 List 实例,永不为 null
|
||||||
|
```
|
||||||
|
- **原则**:直接使用 LINQ 投影/转换结果。
|
||||||
|
|
||||||
|
### 3. 内部私有辅助方法的层层重复防御
|
||||||
|
- **没必要**:公有入口方法已经做了入参断言/校验,拆分出来的内部私有方法 `private void ApplyCore(Item item)` 每一层都再写一遍 `if (item == null) return;`。
|
||||||
|
- **原则**:私有方法属于内部信任边界,保持干净直白,将校验集中在业务入口。
|
||||||
|
|
||||||
|
### 4. 字典的双重查找(Double Lookup)
|
||||||
|
- **没必要**:
|
||||||
|
```csharp
|
||||||
|
if (_dict.ContainsKey(key))
|
||||||
|
{
|
||||||
|
var val = _dict[key];
|
||||||
|
...
|
||||||
|
}
|
||||||
|
```
|
||||||
|
- **原则**:统一使用 `TryGetValue`,减少一次哈希哈希计算与冗余判断:
|
||||||
|
```csharp
|
||||||
|
if (_dict.TryGetValue(key, out var val))
|
||||||
|
{
|
||||||
|
...
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 5. 静默吞异常的空 Try-Catch
|
||||||
|
- **没必要**:
|
||||||
|
```csharp
|
||||||
|
try { DoSomething(); }
|
||||||
|
catch (Exception) { /* 留空,或者只 Log.Warning 假装没事 */ }
|
||||||
|
```
|
||||||
|
- **原则**:非预期异常必须 `Log.Error(...)` 暴露上下文并附带具体错误信息,绝不能掩盖致命逻辑错误或数据存盘缺失。
|
||||||
|
|
||||||
|
### 6. MonoBehaviour/实例方法内的自我判空
|
||||||
|
- **没必要**:在普通实例方法内部写 `if (this == null)`,或对由 Unity 生命周期保证的对象进行反复探测。
|
||||||
|
- **原则**:信任正常的组件调用生命周期。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 三、代码排查与清理步骤(Runbook)
|
||||||
|
|
||||||
|
当用户发出整理请求时,按以下流程执行:
|
||||||
|
|
||||||
|
1. **识别范围**:
|
||||||
|
- 检查 `git status` 涉及修改的文件,或针对用户指定的代码文件。
|
||||||
|
2. **逐项审查**:
|
||||||
|
- [ ] 检查是否有 `[SerializeField]`、`View.xxx` 的判空,有则移除。
|
||||||
|
- [ ] 检查声明处赋值(如 `= new ...`)字段的二次判空,有则移除。
|
||||||
|
- [ ] 检查是否有配置读取、存档读取的三元默认值回退(`?:` 魔法数字),改为 `Log.Error` 并中断。
|
||||||
|
- [ ] 检查 `foreach` 外层是否有冗余的 `if (list != null && list.Count > 0)` 嵌套,若列表非空则拍平。
|
||||||
|
- [ ] 检查是否有空 `catch` 吞错。
|
||||||
|
3. **推演逻辑边界(静态检查)**:
|
||||||
|
- 确认移除防御后不会导致不可预知的崩溃;
|
||||||
|
- 确认异常路径是否确实按规范输出了 `Log.Error`。
|
||||||
|
4. **汇报改动**:
|
||||||
|
- 列出修改的文件路径;
|
||||||
|
- 简要说明移除了哪些冗余防御或规范了哪些异常断言。
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# CodeGraph data files — local to each machine, not for committing.
|
||||||
|
# Ignore everything in .codegraph/ except this file itself, so transient
|
||||||
|
# files (the database, daemon.pid, sockets, logs) never show up in git.
|
||||||
|
*
|
||||||
|
!.gitignore
|
||||||
+1
-5
@@ -88,9 +88,5 @@ crashlytics-build.properties
|
|||||||
|
|
||||||
~$*.xlsx
|
~$*.xlsx
|
||||||
Assets/GameMain/Configs/ResourceBuilder.xml
|
Assets/GameMain/Configs/ResourceBuilder.xml
|
||||||
/.dotnet
|
|
||||||
/.omx
|
|
||||||
/.vscode
|
/.vscode
|
||||||
/openspec/changes/archive
|
/Tools/make_atlas/input
|
||||||
/.omc
|
|
||||||
/.claude
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# AGENTS.md — SBE(Seek-Battle-Evacuate)
|
# AGENTS.md
|
||||||
|
|
||||||
单人 3d 类吸血鬼幸存者游戏原型。Unity 2022.3.62f3,框架为 GameFramework(UGF,源码在 `Assets/GameFramework/`),配置表用 Luban,插件有 UniTask、DOTween 等。
|
单人 3d 类吸血鬼幸存者游戏原型。Unity 2022.3.62f3,框架为 GameFramework(UGF,源码在 `Assets/GameFramework/`),配置表用 Luban,插件有 UniTask、DOTween 等。
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
- UGF 只对顶级 Form 调用 `OnInit/OnOpen/OnClose` 生命周期;**嵌套 Form 的这些方法永远不会执行**。事件绑定用幂等模式(`_listenersBound` 标志 + `EnsureXxx()`),放在能力入口(如 `Refresh`)里。
|
- UGF 只对顶级 Form 调用 `OnInit/OnOpen/OnClose` 生命周期;**嵌套 Form 的这些方法永远不会执行**。事件绑定用幂等模式(`_listenersBound` 标志 + `EnsureXxx()`),放在能力入口(如 `Refresh`)里。
|
||||||
- 子 Form 只提供能力(public 方法,幂等可重入),数据由调用方传入;只有顶级 Form 有编排权。子组件向上通信用 `GameEntry.Event.Fire` + `XxxEventArgs`(放 `Scripts/Base/Event/UIForm/`,`ReferencePool` + `Create`/`Clear`),禁止反向持有父 Form。
|
- 子 Form 只提供能力(public 方法,幂等可重入),数据由调用方传入;只有顶级 Form 有编排权。子组件向上通信用 `GameEntry.Event.Fire` + `XxxEventArgs`(放 `Scripts/Base/Event/UIForm/`,`ReferencePool` + `Create`/`Clear`),禁止反向持有父 Form。
|
||||||
|
|
||||||
## Luban 约定(详见 `Docs/Tech/01_LubanDataTable.md`)
|
## Luban 约定(详见 `docs/tech/01_LubanDataTable.md`)
|
||||||
|
|
||||||
- 表名小写 `tbxxxconfig`:Excel 表名、导出文件名、`Tables` 构造参数、`TableNames` 数组四处必须一致。
|
- 表名小写 `tbxxxconfig`:Excel 表名、导出文件名、`Tables` 构造参数、`TableNames` 数组四处必须一致。
|
||||||
- 访问入口 `GameEntry.Luban.Get<T>(id)` / `GetTable<T>()`;单行表(`mode=one`,如 `tbglobalconfig`)不注册访问器,走 `Tables.TbXxxConfig.Data`。
|
- 访问入口 `GameEntry.Luban.Get<T>(id)` / `GetTable<T>()`;单行表(`mode=one`,如 `tbglobalconfig`)不注册访问器,走 `Tables.TbXxxConfig.Data`。
|
||||||
@@ -36,6 +36,7 @@
|
|||||||
- 不做静态回退(不用默认值/兜底逻辑静默继续);异常路径直接 `Log.Error(...)` 抛出(UGF 的 `Log`,支持格式串,如 `Log.Error("Entity data is invalid.")`)。
|
- 不做静态回退(不用默认值/兜底逻辑静默继续);异常路径直接 `Log.Error(...)` 抛出(UGF 的 `Log`,支持格式串,如 `Log.Error("Entity data is invalid.")`)。
|
||||||
- UI 的序列化字段(`[SerializeField]` 及 View 生成的引用)**不做判空检查**,默认已在 Inspector 中赋值。
|
- UI 的序列化字段(`[SerializeField]` 及 View 生成的引用)**不做判空检查**,默认已在 Inspector 中赋值。
|
||||||
- GameEntry 中提供的静态入口不对其进行判空,默认其不为空。
|
- GameEntry 中提供的静态入口不对其进行判空,默认其不为空。
|
||||||
|
- 对于从 Luban 中取出的数据,默认其是有效且不为空的,代码里不对其做任何有效性检测
|
||||||
|
|
||||||
## 代码风格
|
## 代码风格
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -9,7 +9,7 @@
|
|||||||
"attackRange": 1.5,
|
"attackRange": 1.5,
|
||||||
"speed": 3,
|
"speed": 3,
|
||||||
"coinDrop": 5,
|
"coinDrop": 5,
|
||||||
"expDrop": 1,
|
"expDrop": 20,
|
||||||
"dropPercent": 0.3,
|
"dropPercent": 0.3,
|
||||||
"scale": 1,
|
"scale": 1,
|
||||||
"color": "#44FF44",
|
"color": "#44FF44",
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
"attackRange": 8,
|
"attackRange": 8,
|
||||||
"speed": 2.5,
|
"speed": 2.5,
|
||||||
"coinDrop": 4,
|
"coinDrop": 4,
|
||||||
"expDrop": 2,
|
"expDrop": 20,
|
||||||
"dropPercent": 0.2,
|
"dropPercent": 0.2,
|
||||||
"scale": 1,
|
"scale": 1,
|
||||||
"color": "#FF44FF",
|
"color": "#FF44FF",
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
"attackRange": 1.2,
|
"attackRange": 1.2,
|
||||||
"speed": 6,
|
"speed": 6,
|
||||||
"coinDrop": 3,
|
"coinDrop": 3,
|
||||||
"expDrop": 1,
|
"expDrop": 25,
|
||||||
"dropPercent": 0.4,
|
"dropPercent": 0.4,
|
||||||
"scale": 0.5,
|
"scale": 0.5,
|
||||||
"color": "#FF4444",
|
"color": "#FF4444",
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
"attackRange": 1.8,
|
"attackRange": 1.8,
|
||||||
"speed": 2.5,
|
"speed": 2.5,
|
||||||
"coinDrop": 6,
|
"coinDrop": 6,
|
||||||
"expDrop": 2,
|
"expDrop": 25,
|
||||||
"dropPercent": 0.3,
|
"dropPercent": 0.3,
|
||||||
"scale": 1.3,
|
"scale": 1.3,
|
||||||
"color": "#CCCCCC",
|
"color": "#CCCCCC",
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
"attackRange": 2.5,
|
"attackRange": 2.5,
|
||||||
"speed": 1.5,
|
"speed": 1.5,
|
||||||
"coinDrop": 10,
|
"coinDrop": 10,
|
||||||
"expDrop": 3,
|
"expDrop": 30,
|
||||||
"dropPercent": 0.25,
|
"dropPercent": 0.25,
|
||||||
"scale": 2,
|
"scale": 2,
|
||||||
"color": "#888888",
|
"color": "#888888",
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
"attackRange": 10,
|
"attackRange": 10,
|
||||||
"speed": 3,
|
"speed": 3,
|
||||||
"coinDrop": 5,
|
"coinDrop": 5,
|
||||||
"expDrop": 2,
|
"expDrop": 30,
|
||||||
"dropPercent": 0.3,
|
"dropPercent": 0.3,
|
||||||
"scale": 0.8,
|
"scale": 0.8,
|
||||||
"color": "#88CCFF",
|
"color": "#88CCFF",
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
"attackRange": 12,
|
"attackRange": 12,
|
||||||
"speed": 2,
|
"speed": 2,
|
||||||
"coinDrop": 8,
|
"coinDrop": 8,
|
||||||
"expDrop": 3,
|
"expDrop": 30,
|
||||||
"dropPercent": 0.2,
|
"dropPercent": 0.2,
|
||||||
"scale": 1.2,
|
"scale": 1.2,
|
||||||
"color": "#FF8800",
|
"color": "#FF8800",
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
FollowCameraFollowCamera.prefabPlayer␍Player.prefab
|
FollowCameraFollowCamera.prefabPlayer␍Player.prefab
|
||||||
MeleeEnemyMeleeEnemy.prefabRemoteEnemyRemoteEnemy.prefabWeaponKnifeWeaponKnife.prefab␍WeaponHandgunWeaponHandgun.prefabWeaponSlashWeaponSlash.prefabWeaponLightningWeaponLightning.prefabWeaponLanceWeaponLance.prefab
|
MeleeEnemyMeleeEnemy.prefabRemoteEnemyRemoteEnemy.prefabWeaponKnifeWeaponKnife.prefab␍WeaponHandgunWeaponHandgun.prefabWeaponSlashWeaponSlash.prefabWeaponLightningWeaponLightning.prefabWeaponLanceWeaponLance.prefab
|
||||||
CoinEntityCoinEntity.prefab ExpEntityExpEntity.prefab
|
CoinEntityCoinEntity.prefab ExpEntityExpEntity.prefab
|
||||||
|
ProjectileProjectile.prefab
|
||||||
@@ -42,5 +42,9 @@
|
|||||||
{
|
{
|
||||||
"assetName": "ExpEntity",
|
"assetName": "ExpEntity",
|
||||||
"prefabPath": "ExpEntity.prefab"
|
"prefabPath": "ExpEntity.prefab"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"assetName": "Projectile",
|
||||||
|
"prefabPath": "Projectile.prefab"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
HUDHpText {0} / {1}
|
||||||
|
HUDExpTextLv.{0}HUDCoinText <sprite name="coin" index=0> {0}HUDCPUTimeCostTextCPU Frame: {0:F2} msHUDEnemyCountText
|
||||||
|
Enemy: {0}LevelUpRefreshCostText(刷新 -{0} <sprite name="coin" index=0>␍ShopTitleText商店 (Lv.{0})ShopContinueButtonText继续 (Lv.{0})ShopPlayerCoinText<sprite name="coin"> {0}ShopRefreshCostText 刷新 -{0} <sprite name="coin">WeaponListTitle武器 ({0}/{1})␍PropListTitle道具 ({0})ShopGoodsCostText {0} <sprite name="coin" index=0>TooltipRecycleButtonText'出售 {0} <sprite name="coin" index=0>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 09ee293d7e6c7b5478b17ac940bcfb8e
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "HUDHpText",
|
||||||
|
"format": "{0} / {1}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "HUDExpText",
|
||||||
|
"format": "Lv.{0}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "HUDCoinText",
|
||||||
|
"format": "<sprite name=\"coin\" index=0> {0}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "HUDCPUTimeCostText",
|
||||||
|
"format": "CPU Frame: {0:F2} ms"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "HUDEnemyCountText",
|
||||||
|
"format": "Enemy: {0}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "LevelUpRefreshCostText",
|
||||||
|
"format": "刷新 -{0} <sprite name=\"coin\" index=0>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ShopTitleText",
|
||||||
|
"format": "商店 (Lv.{0})"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ShopContinueButtonText",
|
||||||
|
"format": "继续 (Lv.{0})"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ShopPlayerCoinText",
|
||||||
|
"format": "<sprite name=\"coin\"> {0}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ShopRefreshCostText",
|
||||||
|
"format": "刷新 -{0} <sprite name=\"coin\">"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WeaponListTitle",
|
||||||
|
"format": "武器 ({0}/{1})"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "PropListTitle",
|
||||||
|
"format": "道具 ({0})"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ShopGoodsCostText",
|
||||||
|
"format": "{0} <sprite name=\"coin\" index=0>"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "TooltipRecycleButtonText",
|
||||||
|
"format": "出售 {0} <sprite name=\"coin\" index=0>"
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5c1d742cd5d626e4e867ec0ca8482db7
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
@@ -1,5 +1,38 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"weaponCapacity": 6
|
"weaponCapacity": 6,
|
||||||
|
"propMaxCount": -1,
|
||||||
|
"playerEntity": "Player",
|
||||||
|
"absorbSpeed": 12,
|
||||||
|
"collectDistance": 0.5,
|
||||||
|
"defaultAbsorbRange": 4,
|
||||||
|
"weaponRecycleRate": 0.3,
|
||||||
|
"shopGoodsCount": 4,
|
||||||
|
"shopPriceRandomPercent": 0.05,
|
||||||
|
"shopMinPrice": 1,
|
||||||
|
"levelUpRefreshPriceBase": 2,
|
||||||
|
"levelUpRewardCount": 4,
|
||||||
|
"spawnEnemyMaxCount": 5000,
|
||||||
|
"enemySpawnDistanceMin": 14,
|
||||||
|
"enemySpawnDistanceMax": 18,
|
||||||
|
"weaponRotateSpeed": 5,
|
||||||
|
"weaponBaseCrit": 0.05,
|
||||||
|
"playerGroupName": "Player",
|
||||||
|
"enemyGroupName": "Enemy",
|
||||||
|
"projectileGroupName": "Projectile",
|
||||||
|
"dropGroupName": "Drop",
|
||||||
|
"effectGroupNmae": "Effect",
|
||||||
|
"minDamage": 1,
|
||||||
|
"maxDodgeRate": 900,
|
||||||
|
"minSpawnRateScale": 100,
|
||||||
|
"projectileLifeTime": 3000,
|
||||||
|
"projectileHeightOffset": 600,
|
||||||
|
"projectileSpeed": 12000,
|
||||||
|
"projectileEntity": "Projectile",
|
||||||
|
"damageTextYOffset": 1100,
|
||||||
|
"entityAsyncTimeout": 30000,
|
||||||
|
"critMultiplier": 1.5,
|
||||||
|
"enemyBodyRadius": 450,
|
||||||
|
"enemySeparationIterations": 2
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
Binary file not shown.
@@ -2,151 +2,201 @@
|
|||||||
{
|
{
|
||||||
"id": 1001,
|
"id": 1001,
|
||||||
"goodsType": 1,
|
"goodsType": 1,
|
||||||
"propId": 1001,
|
"refId": 1001
|
||||||
"weaponType": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1002,
|
"id": 1002,
|
||||||
"goodsType": 2,
|
"goodsType": 1,
|
||||||
"propId": 0,
|
"refId": 1002
|
||||||
"weaponType": 1
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1003,
|
"id": 1003,
|
||||||
"goodsType": 1,
|
"goodsType": 1,
|
||||||
"propId": 1002,
|
"refId": 1003
|
||||||
"weaponType": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1004,
|
"id": 1004,
|
||||||
"goodsType": 1,
|
"goodsType": 1,
|
||||||
"propId": 1003,
|
"refId": 1004
|
||||||
"weaponType": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1005,
|
"id": 1005,
|
||||||
"goodsType": 1,
|
"goodsType": 1,
|
||||||
"propId": 1004,
|
"refId": 1005
|
||||||
"weaponType": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1006,
|
"id": 1006,
|
||||||
"goodsType": 2,
|
"goodsType": 1,
|
||||||
"propId": 0,
|
"refId": 1006
|
||||||
"weaponType": 2
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1007,
|
"id": 1007,
|
||||||
"goodsType": 1,
|
"goodsType": 1,
|
||||||
"propId": 1005,
|
"refId": 1007
|
||||||
"weaponType": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1008,
|
"id": 1008,
|
||||||
"goodsType": 1,
|
"goodsType": 1,
|
||||||
"propId": 1006,
|
"refId": 1008
|
||||||
"weaponType": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1009,
|
"id": 1009,
|
||||||
"goodsType": 1,
|
"goodsType": 1,
|
||||||
"propId": 1007,
|
"refId": 1009
|
||||||
"weaponType": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1010,
|
"id": 1010,
|
||||||
"goodsType": 1,
|
"goodsType": 1,
|
||||||
"propId": 1008,
|
"refId": 1010
|
||||||
"weaponType": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1011,
|
"id": 1011,
|
||||||
"goodsType": 1,
|
"goodsType": 1,
|
||||||
"propId": 1009,
|
"refId": 1011
|
||||||
"weaponType": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1012,
|
"id": 1012,
|
||||||
"goodsType": 1,
|
"goodsType": 1,
|
||||||
"propId": 1010,
|
"refId": 1012
|
||||||
"weaponType": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1013,
|
"id": 1013,
|
||||||
"goodsType": 1,
|
"goodsType": 1,
|
||||||
"propId": 1011,
|
"refId": 1013
|
||||||
"weaponType": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1014,
|
"id": 1014,
|
||||||
"goodsType": 1,
|
"goodsType": 1,
|
||||||
"propId": 1012,
|
"refId": 1014
|
||||||
"weaponType": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1015,
|
"id": 1015,
|
||||||
"goodsType": 1,
|
"goodsType": 1,
|
||||||
"propId": 1013,
|
"refId": 1015
|
||||||
"weaponType": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1016,
|
"id": 1016,
|
||||||
"goodsType": 1,
|
"goodsType": 1,
|
||||||
"propId": 1014,
|
"refId": 1016
|
||||||
"weaponType": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1017,
|
"id": 1017,
|
||||||
"goodsType": 1,
|
"goodsType": 1,
|
||||||
"propId": 1015,
|
"refId": 1017
|
||||||
"weaponType": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1018,
|
"id": 1018,
|
||||||
"goodsType": 1,
|
"goodsType": 1,
|
||||||
"propId": 1016,
|
"refId": 1018
|
||||||
"weaponType": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1019,
|
"id": 1019,
|
||||||
"goodsType": 1,
|
"goodsType": 1,
|
||||||
"propId": 1017,
|
"refId": 1019
|
||||||
"weaponType": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1020,
|
"id": 1020,
|
||||||
"goodsType": 1,
|
"goodsType": 1,
|
||||||
"propId": 1018,
|
"refId": 1020
|
||||||
"weaponType": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1021,
|
"id": 2001,
|
||||||
"goodsType": 1,
|
|
||||||
"propId": 1019,
|
|
||||||
"weaponType": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 1022,
|
|
||||||
"goodsType": 1,
|
|
||||||
"propId": 1020,
|
|
||||||
"weaponType": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 1023,
|
|
||||||
"goodsType": 2,
|
"goodsType": 2,
|
||||||
"propId": 0,
|
"refId": 1001
|
||||||
"weaponType": 3
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1024,
|
"id": 2002,
|
||||||
"goodsType": 2,
|
"goodsType": 2,
|
||||||
"propId": 0,
|
"refId": 1002
|
||||||
"weaponType": 4
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1025,
|
"id": 2003,
|
||||||
"goodsType": 2,
|
"goodsType": 2,
|
||||||
"propId": 0,
|
"refId": 1003
|
||||||
"weaponType": 5
|
},
|
||||||
|
{
|
||||||
|
"id": 2004,
|
||||||
|
"goodsType": 2,
|
||||||
|
"refId": 1004
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2005,
|
||||||
|
"goodsType": 2,
|
||||||
|
"refId": 2001
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2006,
|
||||||
|
"goodsType": 2,
|
||||||
|
"refId": 2002
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2007,
|
||||||
|
"goodsType": 2,
|
||||||
|
"refId": 2003
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2008,
|
||||||
|
"goodsType": 2,
|
||||||
|
"refId": 2004
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2009,
|
||||||
|
"goodsType": 2,
|
||||||
|
"refId": 3001
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2010,
|
||||||
|
"goodsType": 2,
|
||||||
|
"refId": 3002
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2011,
|
||||||
|
"goodsType": 2,
|
||||||
|
"refId": 3003
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2012,
|
||||||
|
"goodsType": 2,
|
||||||
|
"refId": 3004
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2013,
|
||||||
|
"goodsType": 2,
|
||||||
|
"refId": 4001
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2014,
|
||||||
|
"goodsType": 2,
|
||||||
|
"refId": 4002
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2015,
|
||||||
|
"goodsType": 2,
|
||||||
|
"refId": 4003
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2016,
|
||||||
|
"goodsType": 2,
|
||||||
|
"refId": 4004
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2017,
|
||||||
|
"goodsType": 2,
|
||||||
|
"refId": 5001
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2018,
|
||||||
|
"goodsType": 2,
|
||||||
|
"refId": 5002
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2019,
|
||||||
|
"goodsType": 2,
|
||||||
|
"refId": 5003
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2020,
|
||||||
|
"goodsType": 2,
|
||||||
|
"refId": 5004
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
Binary file not shown.
@@ -2,7 +2,6 @@
|
|||||||
{
|
{
|
||||||
"Id": 1001,
|
"Id": 1001,
|
||||||
"WhiteWeight": 75,
|
"WhiteWeight": 75,
|
||||||
"GreenWeight": 20,
|
|
||||||
"BlueWeight": 4,
|
"BlueWeight": 4,
|
||||||
"PurpleWeight": 1,
|
"PurpleWeight": 1,
|
||||||
"RedWeight": 0
|
"RedWeight": 0
|
||||||
@@ -10,7 +9,6 @@
|
|||||||
{
|
{
|
||||||
"Id": 1002,
|
"Id": 1002,
|
||||||
"WhiteWeight": 75,
|
"WhiteWeight": 75,
|
||||||
"GreenWeight": 20,
|
|
||||||
"BlueWeight": 4,
|
"BlueWeight": 4,
|
||||||
"PurpleWeight": 1,
|
"PurpleWeight": 1,
|
||||||
"RedWeight": 0
|
"RedWeight": 0
|
||||||
@@ -18,7 +16,6 @@
|
|||||||
{
|
{
|
||||||
"Id": 1003,
|
"Id": 1003,
|
||||||
"WhiteWeight": 75,
|
"WhiteWeight": 75,
|
||||||
"GreenWeight": 20,
|
|
||||||
"BlueWeight": 4,
|
"BlueWeight": 4,
|
||||||
"PurpleWeight": 1,
|
"PurpleWeight": 1,
|
||||||
"RedWeight": 0
|
"RedWeight": 0
|
||||||
@@ -26,7 +23,6 @@
|
|||||||
{
|
{
|
||||||
"Id": 1004,
|
"Id": 1004,
|
||||||
"WhiteWeight": 30,
|
"WhiteWeight": 30,
|
||||||
"GreenWeight": 50,
|
|
||||||
"BlueWeight": 15,
|
"BlueWeight": 15,
|
||||||
"PurpleWeight": 4,
|
"PurpleWeight": 4,
|
||||||
"RedWeight": 1
|
"RedWeight": 1
|
||||||
@@ -34,7 +30,6 @@
|
|||||||
{
|
{
|
||||||
"Id": 1005,
|
"Id": 1005,
|
||||||
"WhiteWeight": 30,
|
"WhiteWeight": 30,
|
||||||
"GreenWeight": 50,
|
|
||||||
"BlueWeight": 15,
|
"BlueWeight": 15,
|
||||||
"PurpleWeight": 4,
|
"PurpleWeight": 4,
|
||||||
"RedWeight": 1
|
"RedWeight": 1
|
||||||
@@ -42,7 +37,6 @@
|
|||||||
{
|
{
|
||||||
"Id": 1006,
|
"Id": 1006,
|
||||||
"WhiteWeight": 10,
|
"WhiteWeight": 10,
|
||||||
"GreenWeight": 20,
|
|
||||||
"BlueWeight": 40,
|
"BlueWeight": 40,
|
||||||
"PurpleWeight": 20,
|
"PurpleWeight": 20,
|
||||||
"RedWeight": 10
|
"RedWeight": 10
|
||||||
@@ -50,7 +44,6 @@
|
|||||||
{
|
{
|
||||||
"Id": 1007,
|
"Id": 1007,
|
||||||
"WhiteWeight": 10,
|
"WhiteWeight": 10,
|
||||||
"GreenWeight": 20,
|
|
||||||
"BlueWeight": 40,
|
"BlueWeight": 40,
|
||||||
"PurpleWeight": 20,
|
"PurpleWeight": 20,
|
||||||
"RedWeight": 10
|
"RedWeight": 10
|
||||||
@@ -58,7 +51,6 @@
|
|||||||
{
|
{
|
||||||
"Id": 1008,
|
"Id": 1008,
|
||||||
"WhiteWeight": 10,
|
"WhiteWeight": 10,
|
||||||
"GreenWeight": 20,
|
|
||||||
"BlueWeight": 40,
|
"BlueWeight": 40,
|
||||||
"PurpleWeight": 20,
|
"PurpleWeight": 20,
|
||||||
"RedWeight": 10
|
"RedWeight": 10
|
||||||
@@ -66,7 +58,6 @@
|
|||||||
{
|
{
|
||||||
"Id": 1009,
|
"Id": 1009,
|
||||||
"WhiteWeight": 10,
|
"WhiteWeight": 10,
|
||||||
"GreenWeight": 20,
|
|
||||||
"BlueWeight": 40,
|
"BlueWeight": 40,
|
||||||
"PurpleWeight": 20,
|
"PurpleWeight": 20,
|
||||||
"RedWeight": 10
|
"RedWeight": 10
|
||||||
@@ -74,7 +65,6 @@
|
|||||||
{
|
{
|
||||||
"Id": 1010,
|
"Id": 1010,
|
||||||
"WhiteWeight": 10,
|
"WhiteWeight": 10,
|
||||||
"GreenWeight": 20,
|
|
||||||
"BlueWeight": 40,
|
"BlueWeight": 40,
|
||||||
"PurpleWeight": 20,
|
"PurpleWeight": 20,
|
||||||
"RedWeight": 10
|
"RedWeight": 10
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
┐ИХ┌▄Х┌┴2Х┌▄Х┌┴┐ЙГ┴≥И╫©2Г┴≥И╫©┐КХ└▒2Х└▒┐ЛИ╪╩Е╜░ 2И╪╩Е╜░┐МХ┘©2Х┘©┐НГ°╪Г²⌡2Г°╪Г²⌡┐ОХ┌▄Х┌┴─√Х┌▄Х┌┴┐ПГ┴≥И╫©─√Г┴≥И╫©┐ЯХ└▒─√Х└▒┐РИ╪╩Е╜░ ─√И╪╩Е╜░┐СХ┘©─√Х┘©┐ТГ°╪Г²⌡─√Г°╪Г²⌡┐УХ┌▄Х┌┴│,Х┌▄Х┌┴┐ЖГ┴≥И╫©│,Г┴≥И╫©┐ВХ└▒│,Х└▒┐ЬИ╪╩Е╜░ │,И╪╩Е╜░┐ЫХ┘©│,Х┘©┐ЗГ°╪Г²⌡│,Г°╪Г²⌡
|
┐ИХ┌▄Х┌┴млL=─хХ┌▄Х┌┴┐ЙГ┴≥И╫©млL=─хГ┴≥И╫©┐КХ└▒ млL=─хХ└▒┐ЛИ╪╩Е╜░млL=─хИ╪╩Е╜░┐МХ┘©млL=─хХ┘©┐НГ°╪Г²⌡млL=─хГ°╪Г²⌡┐ОХ┌▄Х┌┴ ≥>─хХ┌▄Х┌┴┐ПГ┴≥И╫© ≥>─хГ┴≥И╫©┐ЯХ└▒ ≥>─хХ└▒┐РИ╪╩Е╜░ ≥>─хИ╪╩Е╜░┐СХ┘© ≥>─хХ┘©┐ТГ°╪Г²⌡ ≥>─хГ°╪Г²⌡┐УХ┌▄Х┌┴ ≥≥>─хХ┌▄Х┌┴┐ЖГ┴≥И╫© ≥≥>─хГ┴≥И╫©┐ВХ└▒ ≥≥>─хХ└▒┐ЬИ╪╩Е╜░ ≥≥>─хИ╪╩Е╜░┐ЫХ┘© ≥≥>─хХ┘©┐ЗГ°╪Г²⌡ ≥≥>─хГ°╪Г²⌡
|
||||||
@@ -3,11 +3,11 @@
|
|||||||
"id": 1001,
|
"id": 1001,
|
||||||
"title": "肌肉",
|
"title": "肌肉",
|
||||||
"rarity": 1,
|
"rarity": 1,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 3,
|
"statType": 4,
|
||||||
"value": 50,
|
"value": 0.05,
|
||||||
"isPercent": true
|
"modifierType": 200
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "肌肉"
|
"sprite": "肌肉"
|
||||||
@@ -16,11 +16,11 @@
|
|||||||
"id": 1002,
|
"id": 1002,
|
||||||
"title": "牙齿",
|
"title": "牙齿",
|
||||||
"rarity": 1,
|
"rarity": 1,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 3,
|
"statType": 4,
|
||||||
"value": 50,
|
"value": 0.05,
|
||||||
"isPercent": true
|
"modifierType": 200
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "牙齿"
|
"sprite": "牙齿"
|
||||||
@@ -29,11 +29,11 @@
|
|||||||
"id": 1003,
|
"id": 1003,
|
||||||
"title": "脑",
|
"title": "脑",
|
||||||
"rarity": 1,
|
"rarity": 1,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 6,
|
"statType": 9,
|
||||||
"value": 50,
|
"value": 0.05,
|
||||||
"isPercent": true
|
"modifierType": 200
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "脑"
|
"sprite": "脑"
|
||||||
@@ -42,11 +42,11 @@
|
|||||||
"id": 1004,
|
"id": 1004,
|
||||||
"title": "鼻子",
|
"title": "鼻子",
|
||||||
"rarity": 1,
|
"rarity": 1,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 9,
|
"statType": 8,
|
||||||
"value": 50,
|
"value": 0.05,
|
||||||
"isPercent": true
|
"modifierType": 200
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "鼻子"
|
"sprite": "鼻子"
|
||||||
@@ -55,11 +55,11 @@
|
|||||||
"id": 1005,
|
"id": 1005,
|
||||||
"title": "腿",
|
"title": "腿",
|
||||||
"rarity": 1,
|
"rarity": 1,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 2,
|
"statType": 14,
|
||||||
"value": 50,
|
"value": 0.05,
|
||||||
"isPercent": true
|
"modifierType": 200
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "腿"
|
"sprite": "腿"
|
||||||
@@ -68,11 +68,11 @@
|
|||||||
"id": 1006,
|
"id": 1006,
|
||||||
"title": "眼睛",
|
"title": "眼睛",
|
||||||
"rarity": 1,
|
"rarity": 1,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 1,
|
"statType": 1,
|
||||||
"value": 50,
|
"value": 0.05,
|
||||||
"isPercent": true
|
"modifierType": 200
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "眼睛"
|
"sprite": "眼睛"
|
||||||
@@ -81,11 +81,11 @@
|
|||||||
"id": 1007,
|
"id": 1007,
|
||||||
"title": "肌肉",
|
"title": "肌肉",
|
||||||
"rarity": 2,
|
"rarity": 2,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 3,
|
"statType": 4,
|
||||||
"value": 150,
|
"value": 0.15,
|
||||||
"isPercent": true
|
"modifierType": 200
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "肌肉"
|
"sprite": "肌肉"
|
||||||
@@ -94,11 +94,11 @@
|
|||||||
"id": 1008,
|
"id": 1008,
|
||||||
"title": "牙齿",
|
"title": "牙齿",
|
||||||
"rarity": 2,
|
"rarity": 2,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 3,
|
"statType": 4,
|
||||||
"value": 150,
|
"value": 0.15,
|
||||||
"isPercent": true
|
"modifierType": 200
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "牙齿"
|
"sprite": "牙齿"
|
||||||
@@ -107,11 +107,11 @@
|
|||||||
"id": 1009,
|
"id": 1009,
|
||||||
"title": "脑",
|
"title": "脑",
|
||||||
"rarity": 2,
|
"rarity": 2,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 6,
|
"statType": 9,
|
||||||
"value": 150,
|
"value": 0.15,
|
||||||
"isPercent": true
|
"modifierType": 200
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "脑"
|
"sprite": "脑"
|
||||||
@@ -120,11 +120,11 @@
|
|||||||
"id": 1010,
|
"id": 1010,
|
||||||
"title": "鼻子",
|
"title": "鼻子",
|
||||||
"rarity": 2,
|
"rarity": 2,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 9,
|
"statType": 8,
|
||||||
"value": 150,
|
"value": 0.15,
|
||||||
"isPercent": true
|
"modifierType": 200
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "鼻子"
|
"sprite": "鼻子"
|
||||||
@@ -133,11 +133,11 @@
|
|||||||
"id": 1011,
|
"id": 1011,
|
||||||
"title": "腿",
|
"title": "腿",
|
||||||
"rarity": 2,
|
"rarity": 2,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 2,
|
"statType": 14,
|
||||||
"value": 150,
|
"value": 0.15,
|
||||||
"isPercent": true
|
"modifierType": 200
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "腿"
|
"sprite": "腿"
|
||||||
@@ -146,11 +146,11 @@
|
|||||||
"id": 1012,
|
"id": 1012,
|
||||||
"title": "眼睛",
|
"title": "眼睛",
|
||||||
"rarity": 2,
|
"rarity": 2,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 1,
|
"statType": 1,
|
||||||
"value": 150,
|
"value": 0.15,
|
||||||
"isPercent": true
|
"modifierType": 200
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "眼睛"
|
"sprite": "眼睛"
|
||||||
@@ -159,11 +159,11 @@
|
|||||||
"id": 1013,
|
"id": 1013,
|
||||||
"title": "肌肉",
|
"title": "肌肉",
|
||||||
"rarity": 3,
|
"rarity": 3,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 3,
|
"statType": 4,
|
||||||
"value": 300,
|
"value": 0.3,
|
||||||
"isPercent": true
|
"modifierType": 200
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "肌肉"
|
"sprite": "肌肉"
|
||||||
@@ -172,11 +172,11 @@
|
|||||||
"id": 1014,
|
"id": 1014,
|
||||||
"title": "牙齿",
|
"title": "牙齿",
|
||||||
"rarity": 3,
|
"rarity": 3,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 3,
|
"statType": 4,
|
||||||
"value": 300,
|
"value": 0.3,
|
||||||
"isPercent": true
|
"modifierType": 200
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "牙齿"
|
"sprite": "牙齿"
|
||||||
@@ -185,11 +185,11 @@
|
|||||||
"id": 1015,
|
"id": 1015,
|
||||||
"title": "脑",
|
"title": "脑",
|
||||||
"rarity": 3,
|
"rarity": 3,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 6,
|
"statType": 9,
|
||||||
"value": 300,
|
"value": 0.3,
|
||||||
"isPercent": true
|
"modifierType": 200
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "脑"
|
"sprite": "脑"
|
||||||
@@ -198,11 +198,11 @@
|
|||||||
"id": 1016,
|
"id": 1016,
|
||||||
"title": "鼻子",
|
"title": "鼻子",
|
||||||
"rarity": 3,
|
"rarity": 3,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 9,
|
"statType": 8,
|
||||||
"value": 300,
|
"value": 0.3,
|
||||||
"isPercent": true
|
"modifierType": 200
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "鼻子"
|
"sprite": "鼻子"
|
||||||
@@ -211,11 +211,11 @@
|
|||||||
"id": 1017,
|
"id": 1017,
|
||||||
"title": "腿",
|
"title": "腿",
|
||||||
"rarity": 3,
|
"rarity": 3,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 2,
|
"statType": 14,
|
||||||
"value": 300,
|
"value": 0.3,
|
||||||
"isPercent": true
|
"modifierType": 200
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "腿"
|
"sprite": "腿"
|
||||||
@@ -224,11 +224,11 @@
|
|||||||
"id": 1018,
|
"id": 1018,
|
||||||
"title": "眼睛",
|
"title": "眼睛",
|
||||||
"rarity": 3,
|
"rarity": 3,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 1,
|
"statType": 1,
|
||||||
"value": 300,
|
"value": 0.3,
|
||||||
"isPercent": true
|
"modifierType": 200
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "眼睛"
|
"sprite": "眼睛"
|
||||||
|
|||||||
Binary file not shown.
@@ -4,16 +4,16 @@
|
|||||||
"name": "铁护腕",
|
"name": "铁护腕",
|
||||||
"rarity": 1,
|
"rarity": 1,
|
||||||
"price": 120,
|
"price": 120,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 3,
|
"statType": 5,
|
||||||
"value": 10,
|
"value": 10,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": 4,
|
"statType": 12,
|
||||||
"value": 12,
|
"value": 12,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "铁护腕"
|
"sprite": "铁护腕"
|
||||||
@@ -23,21 +23,21 @@
|
|||||||
"name": "狂战士药剂",
|
"name": "狂战士药剂",
|
||||||
"rarity": 2,
|
"rarity": 2,
|
||||||
"price": 250,
|
"price": 250,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 1,
|
"statType": 1,
|
||||||
"value": 53,
|
"value": 53,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": 5,
|
"statType": 8,
|
||||||
"value": 90,
|
"value": 0.09,
|
||||||
"isPercent": true
|
"modifierType": 200
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": 3,
|
"statType": 5,
|
||||||
"value": 11,
|
"value": 11,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "狂战士药剂"
|
"sprite": "狂战士药剂"
|
||||||
@@ -47,21 +47,21 @@
|
|||||||
"name": "龙鳞护符",
|
"name": "龙鳞护符",
|
||||||
"rarity": 3,
|
"rarity": 3,
|
||||||
"price": 330,
|
"price": 330,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 6,
|
"statType": 9,
|
||||||
"value": 15,
|
"value": 15,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": 7,
|
"statType": 5,
|
||||||
"value": 21,
|
"value": 21,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": 4,
|
"statType": 12,
|
||||||
"value": 23,
|
"value": 23,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "龙鳞护符"
|
"sprite": "龙鳞护符"
|
||||||
@@ -69,13 +69,13 @@
|
|||||||
{
|
{
|
||||||
"id": 1004,
|
"id": 1004,
|
||||||
"name": "泰坦壁垒",
|
"name": "泰坦壁垒",
|
||||||
"rarity": 5,
|
"rarity": 4,
|
||||||
"price": 423,
|
"price": 423,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 4,
|
"statType": 12,
|
||||||
"value": 79,
|
"value": 79,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "泰坦壁垒"
|
"sprite": "泰坦壁垒"
|
||||||
@@ -85,16 +85,16 @@
|
|||||||
"name": "轻便短靴",
|
"name": "轻便短靴",
|
||||||
"rarity": 1,
|
"rarity": 1,
|
||||||
"price": 120,
|
"price": 120,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 2,
|
"statType": 14,
|
||||||
"value": 800,
|
"value": 0.8,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": 3,
|
"statType": 5,
|
||||||
"value": 10,
|
"value": 10,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "轻便短靴"
|
"sprite": "轻便短靴"
|
||||||
@@ -104,21 +104,21 @@
|
|||||||
"name": "幽灵披风",
|
"name": "幽灵披风",
|
||||||
"rarity": 2,
|
"rarity": 2,
|
||||||
"price": 195,
|
"price": 195,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 8,
|
"statType": 13,
|
||||||
"value": 10,
|
"value": 0.1,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": 3,
|
"statType": 5,
|
||||||
"value": 12,
|
"value": 12,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": 1,
|
"statType": 1,
|
||||||
"value": 44,
|
"value": 44,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "幽灵披风"
|
"sprite": "幽灵披风"
|
||||||
@@ -128,11 +128,11 @@
|
|||||||
"name": "精钢胸甲",
|
"name": "精钢胸甲",
|
||||||
"rarity": 3,
|
"rarity": 3,
|
||||||
"price": 335,
|
"price": 335,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 4,
|
"statType": 12,
|
||||||
"value": 62,
|
"value": 62,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "精钢胸甲"
|
"sprite": "精钢胸甲"
|
||||||
@@ -140,18 +140,18 @@
|
|||||||
{
|
{
|
||||||
"id": 1008,
|
"id": 1008,
|
||||||
"name": "暗影之刃",
|
"name": "暗影之刃",
|
||||||
"rarity": 5,
|
"rarity": 4,
|
||||||
"price": 433,
|
"price": 433,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 3,
|
"statType": 6,
|
||||||
"value": 44,
|
"value": 44,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": 8,
|
"statType": 13,
|
||||||
"value": 27,
|
"value": 0.27,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "暗影之刃"
|
"sprite": "暗影之刃"
|
||||||
@@ -161,21 +161,21 @@
|
|||||||
"name": "旅行者徽章",
|
"name": "旅行者徽章",
|
||||||
"rarity": 1,
|
"rarity": 1,
|
||||||
"price": 121,
|
"price": 121,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 1,
|
"statType": 1,
|
||||||
"value": 32,
|
"value": 32,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": 3,
|
"statType": 6,
|
||||||
"value": 7,
|
"value": 7,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": 4,
|
"statType": 12,
|
||||||
"value": 8,
|
"value": 8,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "旅行者徽章"
|
"sprite": "旅行者徽章"
|
||||||
@@ -185,11 +185,11 @@
|
|||||||
"name": "疾风手套",
|
"name": "疾风手套",
|
||||||
"rarity": 2,
|
"rarity": 2,
|
||||||
"price": 198,
|
"price": 198,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 5,
|
"statType": 8,
|
||||||
"value": 190,
|
"value": 0.19,
|
||||||
"isPercent": true
|
"modifierType": 200
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "疾风手套"
|
"sprite": "疾风手套"
|
||||||
@@ -199,11 +199,11 @@
|
|||||||
"name": "巨人之力卷轴",
|
"name": "巨人之力卷轴",
|
||||||
"rarity": 3,
|
"rarity": 3,
|
||||||
"price": 341,
|
"price": 341,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 3,
|
"statType": 6,
|
||||||
"value": 57,
|
"value": 57,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "巨人之力卷轴"
|
"sprite": "巨人之力卷轴"
|
||||||
@@ -211,18 +211,18 @@
|
|||||||
{
|
{
|
||||||
"id": 1012,
|
"id": 1012,
|
||||||
"name": "不死鸟之心",
|
"name": "不死鸟之心",
|
||||||
"rarity": 5,
|
"rarity": 4,
|
||||||
"price": 443,
|
"price": 443,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 1,
|
"statType": 1,
|
||||||
"value": 139,
|
"value": 139,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": 6,
|
"statType": 9,
|
||||||
"value": 27,
|
"value": 0.27,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "不死鸟之心"
|
"sprite": "不死鸟之心"
|
||||||
@@ -232,16 +232,16 @@
|
|||||||
"name": "幸运草",
|
"name": "幸运草",
|
||||||
"rarity": 1,
|
"rarity": 1,
|
||||||
"price": 122,
|
"price": 122,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 6,
|
"statType": 9,
|
||||||
"value": 5,
|
"value": 0.05,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": 8,
|
"statType": 13,
|
||||||
"value": 7,
|
"value": 0.07,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "幸运草"
|
"sprite": "幸运草"
|
||||||
@@ -251,16 +251,16 @@
|
|||||||
"name": "石肤戒指",
|
"name": "石肤戒指",
|
||||||
"rarity": 2,
|
"rarity": 2,
|
||||||
"price": 201,
|
"price": 201,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 2,
|
"statType": 14,
|
||||||
"value": 600,
|
"value": 0.6,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": 4,
|
"statType": 12,
|
||||||
"value": 38,
|
"value": 38,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "石肤戒指"
|
"sprite": "石肤戒指"
|
||||||
@@ -270,16 +270,16 @@
|
|||||||
"name": "风行者胫甲",
|
"name": "风行者胫甲",
|
||||||
"rarity": 3,
|
"rarity": 3,
|
||||||
"price": 346,
|
"price": 346,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 2,
|
"statType": 14,
|
||||||
"value": 1600,
|
"value": 1.6,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": 4,
|
"statType": 12,
|
||||||
"value": 32,
|
"value": 32,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "风行者胫甲"
|
"sprite": "风行者胫甲"
|
||||||
@@ -287,23 +287,23 @@
|
|||||||
{
|
{
|
||||||
"id": 1016,
|
"id": 1016,
|
||||||
"name": "幻影斗篷",
|
"name": "幻影斗篷",
|
||||||
"rarity": 5,
|
"rarity": 4,
|
||||||
"price": 454,
|
"price": 454,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 8,
|
"statType": 13,
|
||||||
"value": 28,
|
"value": 0.28,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": 4,
|
"statType": 12,
|
||||||
"value": 24,
|
"value": 24,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": 3,
|
"statType": 5,
|
||||||
"value": 24,
|
"value": 24,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "幻影斗篷"
|
"sprite": "幻影斗篷"
|
||||||
@@ -313,11 +313,11 @@
|
|||||||
"name": "木质盾牌",
|
"name": "木质盾牌",
|
||||||
"rarity": 1,
|
"rarity": 1,
|
||||||
"price": 124,
|
"price": 124,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 4,
|
"statType": 12,
|
||||||
"value": 23,
|
"value": 23,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "木质盾牌"
|
"sprite": "木质盾牌"
|
||||||
@@ -327,16 +327,16 @@
|
|||||||
"name": "生命之戒",
|
"name": "生命之戒",
|
||||||
"rarity": 2,
|
"rarity": 2,
|
||||||
"price": 204,
|
"price": 204,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 3,
|
"statType": 7,
|
||||||
"value": 17,
|
"value": 17,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": 1,
|
"statType": 1,
|
||||||
"value": 69,
|
"value": 69,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "生命之戒"
|
"sprite": "生命之戒"
|
||||||
@@ -346,21 +346,21 @@
|
|||||||
"name": "精灵耳环",
|
"name": "精灵耳环",
|
||||||
"rarity": 3,
|
"rarity": 3,
|
||||||
"price": 352,
|
"price": 352,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 1,
|
"statType": 1,
|
||||||
"value": 74,
|
"value": 74,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": 3,
|
"statType": 7,
|
||||||
"value": 19,
|
"value": 19,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": 8,
|
"statType": 13,
|
||||||
"value": 20,
|
"value": 0.2,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "精灵耳环"
|
"sprite": "精灵耳环"
|
||||||
@@ -368,23 +368,23 @@
|
|||||||
{
|
{
|
||||||
"id": 1020,
|
"id": 1020,
|
||||||
"name": "战神勋章",
|
"name": "战神勋章",
|
||||||
"rarity": 5,
|
"rarity": 4,
|
||||||
"price": 464,
|
"price": 464,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 5,
|
"statType": 8,
|
||||||
"value": 150,
|
"value": 0.15,
|
||||||
"isPercent": true
|
"modifierType": 200
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": 3,
|
"statType": 7,
|
||||||
"value": 29,
|
"value": 29,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": 4,
|
"statType": 12,
|
||||||
"value": 27,
|
"value": 27,
|
||||||
"isPercent": false
|
"modifierType": 100
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sprite": "战神勋章"
|
"sprite": "战神勋章"
|
||||||
|
|||||||
Binary file not shown.
@@ -4,16 +4,16 @@
|
|||||||
"maxHealth": 100,
|
"maxHealth": 100,
|
||||||
"speed": 6,
|
"speed": 6,
|
||||||
"coin": 10,
|
"coin": 10,
|
||||||
"modifiers": [
|
"statModifierConfigs": [
|
||||||
{
|
{
|
||||||
"key": 2,
|
"statType": 14,
|
||||||
"value": 500,
|
"value": 0.5,
|
||||||
"isPercent": true
|
"modifierType": 200
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": 1,
|
"statType": 1,
|
||||||
"value": 200,
|
"value": 0.2,
|
||||||
"isPercent": true
|
"modifierType": 200
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"initialItems": [],
|
"initialItems": [],
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
"maxHealth": 200,
|
"maxHealth": 200,
|
||||||
"speed": 4,
|
"speed": 4,
|
||||||
"coin": 5,
|
"coin": 5,
|
||||||
"modifiers": [],
|
"statModifierConfigs": [],
|
||||||
"initialItems": [],
|
"initialItems": [],
|
||||||
"prefab": "Player",
|
"prefab": "Player",
|
||||||
"sprite": "老人"
|
"sprite": "老人"
|
||||||
|
|||||||
Binary file not shown.
@@ -1,167 +1,167 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"key": "小刀",
|
"key": "小刀",
|
||||||
"atlasPath": "Weapon.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 0
|
"spriteIndex": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "手枪",
|
"key": "手枪",
|
||||||
"atlasPath": "Weapon.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 1
|
"spriteIndex": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "斧头",
|
"key": "斧头",
|
||||||
"atlasPath": "Weapon.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 2
|
"spriteIndex": 2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "闪电",
|
"key": "闪电",
|
||||||
"atlasPath": "Weapon.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 3
|
"spriteIndex": 3
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "长枪",
|
"key": "长枪",
|
||||||
"atlasPath": "Weapon.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 4
|
"spriteIndex": 4
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "铁护腕",
|
"key": "铁护腕",
|
||||||
"atlasPath": "Prop.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 0
|
"spriteIndex": 200
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "狂战士药剂",
|
"key": "狂战士药剂",
|
||||||
"atlasPath": "Prop.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 1
|
"spriteIndex": 201
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "龙鳞护符",
|
"key": "龙鳞护符",
|
||||||
"atlasPath": "Prop.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 2
|
"spriteIndex": 202
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "泰坦壁垒",
|
"key": "泰坦壁垒",
|
||||||
"atlasPath": "Prop.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 3
|
"spriteIndex": 203
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "轻便短靴",
|
"key": "轻便短靴",
|
||||||
"atlasPath": "Prop.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 4
|
"spriteIndex": 204
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "幽灵披风",
|
"key": "幽灵披风",
|
||||||
"atlasPath": "Prop.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 5
|
"spriteIndex": 205
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "精钢胸甲",
|
"key": "精钢胸甲",
|
||||||
"atlasPath": "Prop.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 6
|
"spriteIndex": 206
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "暗影之刃",
|
"key": "暗影之刃",
|
||||||
"atlasPath": "Prop.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 7
|
"spriteIndex": 207
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "旅行者徽章",
|
"key": "旅行者徽章",
|
||||||
"atlasPath": "Prop.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 8
|
"spriteIndex": 208
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "疾风手套",
|
"key": "疾风手套",
|
||||||
"atlasPath": "Prop.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 9
|
"spriteIndex": 209
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "巨人之力卷轴",
|
"key": "巨人之力卷轴",
|
||||||
"atlasPath": "Prop.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 10
|
"spriteIndex": 210
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "不死鸟之心",
|
"key": "不死鸟之心",
|
||||||
"atlasPath": "Prop.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 11
|
"spriteIndex": 211
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "幸运草",
|
"key": "幸运草",
|
||||||
"atlasPath": "Prop.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 12
|
"spriteIndex": 212
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "石肤戒指",
|
"key": "石肤戒指",
|
||||||
"atlasPath": "Prop.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 13
|
"spriteIndex": 213
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "风行者胫甲",
|
"key": "风行者胫甲",
|
||||||
"atlasPath": "Prop.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 14
|
"spriteIndex": 214
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "幻影斗篷",
|
"key": "幻影斗篷",
|
||||||
"atlasPath": "Prop.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 15
|
"spriteIndex": 215
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "木质盾牌",
|
"key": "木质盾牌",
|
||||||
"atlasPath": "Prop.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 16
|
"spriteIndex": 216
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "生命之戒",
|
"key": "生命之戒",
|
||||||
"atlasPath": "Prop.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 17
|
"spriteIndex": 217
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "精灵耳环",
|
"key": "精灵耳环",
|
||||||
"atlasPath": "Prop.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 18
|
"spriteIndex": 218
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "战神勋章",
|
"key": "战神勋章",
|
||||||
"atlasPath": "Prop.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 19
|
"spriteIndex": 219
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "全能者",
|
"key": "全能者",
|
||||||
"atlasPath": "Role.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 0
|
"spriteIndex": 1200
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "老人",
|
"key": "老人",
|
||||||
"atlasPath": "Role.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 1
|
"spriteIndex": 1201
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "肌肉",
|
"key": "肌肉",
|
||||||
"atlasPath": "LevelUpReward.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 0
|
"spriteIndex": 1400
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "牙齿",
|
"key": "牙齿",
|
||||||
"atlasPath": "LevelUpReward.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 1
|
"spriteIndex": 1401
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "脑",
|
"key": "脑",
|
||||||
"atlasPath": "LevelUpReward.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 2
|
"spriteIndex": 1402
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "鼻子",
|
"key": "鼻子",
|
||||||
"atlasPath": "LevelUpReward.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 3
|
"spriteIndex": 1403
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "腿",
|
"key": "腿",
|
||||||
"atlasPath": "LevelUpReward.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 4
|
"spriteIndex": 1404
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "眼睛",
|
"key": "眼睛",
|
||||||
"atlasPath": "LevelUpReward.png",
|
"atlasPath": "Item.png",
|
||||||
"spriteIndex": 5
|
"spriteIndex": 1405
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
Binary file not shown.
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0ee410edd089fef4d91515cb4a75589d
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,162 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"statType": 1,
|
||||||
|
"name": "最大生命",
|
||||||
|
"defaultBaseValue": 100,
|
||||||
|
"hasMin": true,
|
||||||
|
"minValue": 1,
|
||||||
|
"hasMax": false,
|
||||||
|
"maxValue": 0,
|
||||||
|
"isPercentDisplay": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"statType": 2,
|
||||||
|
"name": "生命恢复",
|
||||||
|
"defaultBaseValue": 5,
|
||||||
|
"hasMin": true,
|
||||||
|
"minValue": 0,
|
||||||
|
"hasMax": false,
|
||||||
|
"maxValue": 0,
|
||||||
|
"isPercentDisplay": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"statType": 3,
|
||||||
|
"name": "生命窃取",
|
||||||
|
"defaultBaseValue": 0,
|
||||||
|
"hasMin": true,
|
||||||
|
"minValue": 0,
|
||||||
|
"hasMax": false,
|
||||||
|
"maxValue": 0,
|
||||||
|
"isPercentDisplay": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"statType": 4,
|
||||||
|
"name": "伤害",
|
||||||
|
"defaultBaseValue": 1,
|
||||||
|
"hasMin": true,
|
||||||
|
"minValue": -1,
|
||||||
|
"hasMax": false,
|
||||||
|
"maxValue": 0,
|
||||||
|
"isPercentDisplay": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"statType": 5,
|
||||||
|
"name": "近战伤害",
|
||||||
|
"defaultBaseValue": 0,
|
||||||
|
"hasMin": false,
|
||||||
|
"minValue": 0,
|
||||||
|
"hasMax": false,
|
||||||
|
"maxValue": 0,
|
||||||
|
"isPercentDisplay": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"statType": 6,
|
||||||
|
"name": "远程伤害",
|
||||||
|
"defaultBaseValue": 0,
|
||||||
|
"hasMin": false,
|
||||||
|
"minValue": 0,
|
||||||
|
"hasMax": false,
|
||||||
|
"maxValue": 0,
|
||||||
|
"isPercentDisplay": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"statType": 7,
|
||||||
|
"name": "元素伤害",
|
||||||
|
"defaultBaseValue": 0,
|
||||||
|
"hasMin": false,
|
||||||
|
"minValue": 0,
|
||||||
|
"hasMax": false,
|
||||||
|
"maxValue": 0,
|
||||||
|
"isPercentDisplay": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"statType": 8,
|
||||||
|
"name": "攻击速度",
|
||||||
|
"defaultBaseValue": 1,
|
||||||
|
"hasMin": true,
|
||||||
|
"minValue": -0.8,
|
||||||
|
"hasMax": false,
|
||||||
|
"maxValue": 0,
|
||||||
|
"isPercentDisplay": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"statType": 9,
|
||||||
|
"name": "暴击率",
|
||||||
|
"defaultBaseValue": 0,
|
||||||
|
"hasMin": true,
|
||||||
|
"minValue": 0,
|
||||||
|
"hasMax": true,
|
||||||
|
"maxValue": 0.9,
|
||||||
|
"isPercentDisplay": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"statType": 10,
|
||||||
|
"name": "工程学",
|
||||||
|
"defaultBaseValue": 0,
|
||||||
|
"hasMin": true,
|
||||||
|
"minValue": 0,
|
||||||
|
"hasMax": false,
|
||||||
|
"maxValue": 0,
|
||||||
|
"isPercentDisplay": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"statType": 11,
|
||||||
|
"name": "攻击范围",
|
||||||
|
"defaultBaseValue": 0,
|
||||||
|
"hasMin": true,
|
||||||
|
"minValue": 0,
|
||||||
|
"hasMax": false,
|
||||||
|
"maxValue": 0,
|
||||||
|
"isPercentDisplay": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"statType": 12,
|
||||||
|
"name": "护甲",
|
||||||
|
"defaultBaseValue": 0,
|
||||||
|
"hasMin": false,
|
||||||
|
"minValue": 0,
|
||||||
|
"hasMax": false,
|
||||||
|
"maxValue": 0,
|
||||||
|
"isPercentDisplay": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"statType": 13,
|
||||||
|
"name": "闪避率",
|
||||||
|
"defaultBaseValue": 0,
|
||||||
|
"hasMin": true,
|
||||||
|
"minValue": 0,
|
||||||
|
"hasMax": true,
|
||||||
|
"maxValue": 0.8,
|
||||||
|
"isPercentDisplay": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"statType": 14,
|
||||||
|
"name": "移动速度",
|
||||||
|
"defaultBaseValue": 0,
|
||||||
|
"hasMin": true,
|
||||||
|
"minValue": 0.5,
|
||||||
|
"hasMax": false,
|
||||||
|
"maxValue": 0,
|
||||||
|
"isPercentDisplay": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"statType": 15,
|
||||||
|
"name": "收获",
|
||||||
|
"defaultBaseValue": 0,
|
||||||
|
"hasMin": true,
|
||||||
|
"minValue": 0,
|
||||||
|
"hasMax": false,
|
||||||
|
"maxValue": 0,
|
||||||
|
"isPercentDisplay": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"statType": 16,
|
||||||
|
"name": "幸运",
|
||||||
|
"defaultBaseValue": 0,
|
||||||
|
"hasMin": true,
|
||||||
|
"minValue": 0,
|
||||||
|
"hasMax": false,
|
||||||
|
"maxValue": 0,
|
||||||
|
"isPercentDisplay": false
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b66a5cb55d1374a45b0f74f7baba5283
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
@@ -1,45 +1,221 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
"id": 1001,
|
||||||
"weaponType": 1,
|
"weaponType": 1,
|
||||||
|
"weaponName": "小刀",
|
||||||
|
"tags": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
"logicType": "WeaponKnife",
|
"logicType": "WeaponKnife",
|
||||||
|
"scalingStat": 5,
|
||||||
|
"scalingRatio": 0.2,
|
||||||
"rarity": 1,
|
"rarity": 1,
|
||||||
"price": 120,
|
"price": 120,
|
||||||
"attack": 100,
|
"attack": 100,
|
||||||
"cooldown": 1500,
|
"cooldown": 1.5,
|
||||||
"attackRange": 5000,
|
"damageType": 1,
|
||||||
|
"attackRange": 5,
|
||||||
"attackSoundId": 10000,
|
"attackSoundId": 10000,
|
||||||
"parameters": [
|
"parameters": [
|
||||||
[
|
[
|
||||||
1,
|
1,
|
||||||
2000
|
2
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"modifiers": [],
|
"statModifierConfigs": [],
|
||||||
"prefab": "WeaponKnife",
|
"prefab": "WeaponKnife",
|
||||||
"sprite": "小刀"
|
"sprite": "小刀"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"id": 1002,
|
||||||
|
"weaponType": 1,
|
||||||
|
"weaponName": "小刀",
|
||||||
|
"tags": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"logicType": "WeaponKnife",
|
||||||
|
"scalingStat": 5,
|
||||||
|
"scalingRatio": 0.2,
|
||||||
|
"rarity": 2,
|
||||||
|
"price": 200,
|
||||||
|
"attack": 150,
|
||||||
|
"cooldown": 1.5,
|
||||||
|
"damageType": 1,
|
||||||
|
"attackRange": 5.2,
|
||||||
|
"attackSoundId": 10000,
|
||||||
|
"parameters": [
|
||||||
|
[
|
||||||
|
1,
|
||||||
|
2.2
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"statModifierConfigs": [],
|
||||||
|
"prefab": "WeaponKnife",
|
||||||
|
"sprite": "小刀"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 1003,
|
||||||
|
"weaponType": 1,
|
||||||
|
"weaponName": "小刀",
|
||||||
|
"tags": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"logicType": "WeaponKnife",
|
||||||
|
"scalingStat": 5,
|
||||||
|
"scalingRatio": 0.2,
|
||||||
|
"rarity": 3,
|
||||||
|
"price": 300,
|
||||||
|
"attack": 200,
|
||||||
|
"cooldown": 1.5,
|
||||||
|
"damageType": 1,
|
||||||
|
"attackRange": 5.4,
|
||||||
|
"attackSoundId": 10000,
|
||||||
|
"parameters": [
|
||||||
|
[
|
||||||
|
1,
|
||||||
|
2.4
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"statModifierConfigs": [],
|
||||||
|
"prefab": "WeaponKnife",
|
||||||
|
"sprite": "小刀"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 1004,
|
||||||
|
"weaponType": 1,
|
||||||
|
"weaponName": "小刀",
|
||||||
|
"tags": [
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"logicType": "WeaponKnife",
|
||||||
|
"scalingStat": 5,
|
||||||
|
"scalingRatio": 0.2,
|
||||||
|
"rarity": 4,
|
||||||
|
"price": 400,
|
||||||
|
"attack": 250,
|
||||||
|
"cooldown": 1.5,
|
||||||
|
"damageType": 1,
|
||||||
|
"attackRange": 5.5,
|
||||||
|
"attackSoundId": 10000,
|
||||||
|
"parameters": [
|
||||||
|
[
|
||||||
|
1,
|
||||||
|
2.5
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"statModifierConfigs": [],
|
||||||
|
"prefab": "WeaponKnife",
|
||||||
|
"sprite": "小刀"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2001,
|
||||||
"weaponType": 2,
|
"weaponType": 2,
|
||||||
|
"weaponName": "手枪",
|
||||||
|
"tags": [
|
||||||
|
3
|
||||||
|
],
|
||||||
"logicType": "WeaponHandgun",
|
"logicType": "WeaponHandgun",
|
||||||
|
"scalingStat": 8,
|
||||||
|
"scalingRatio": 0.5,
|
||||||
"rarity": 1,
|
"rarity": 1,
|
||||||
"price": 130,
|
"price": 130,
|
||||||
"attack": 120,
|
"attack": 120,
|
||||||
"cooldown": 1000,
|
"cooldown": 1,
|
||||||
"attackRange": 15000,
|
"damageType": 2,
|
||||||
|
"attackRange": 15,
|
||||||
"attackSoundId": 10000,
|
"attackSoundId": 10000,
|
||||||
"parameters": [],
|
"parameters": [],
|
||||||
"modifiers": [],
|
"statModifierConfigs": [],
|
||||||
"prefab": "WeaponHandgun",
|
"prefab": "WeaponHandgun",
|
||||||
"sprite": "手枪"
|
"sprite": "手枪"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"id": 2002,
|
||||||
|
"weaponType": 2,
|
||||||
|
"weaponName": "手枪",
|
||||||
|
"tags": [
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"logicType": "WeaponHandgun",
|
||||||
|
"scalingStat": 8,
|
||||||
|
"scalingRatio": 0.5,
|
||||||
|
"rarity": 2,
|
||||||
|
"price": 150,
|
||||||
|
"attack": 130,
|
||||||
|
"cooldown": 1,
|
||||||
|
"damageType": 2,
|
||||||
|
"attackRange": 20,
|
||||||
|
"attackSoundId": 10000,
|
||||||
|
"parameters": [],
|
||||||
|
"statModifierConfigs": [],
|
||||||
|
"prefab": "WeaponHandgun",
|
||||||
|
"sprite": "手枪"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2003,
|
||||||
|
"weaponType": 2,
|
||||||
|
"weaponName": "手枪",
|
||||||
|
"tags": [
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"logicType": "WeaponHandgun",
|
||||||
|
"scalingStat": 8,
|
||||||
|
"scalingRatio": 0.5,
|
||||||
|
"rarity": 3,
|
||||||
|
"price": 170,
|
||||||
|
"attack": 140,
|
||||||
|
"cooldown": 1,
|
||||||
|
"damageType": 2,
|
||||||
|
"attackRange": 23,
|
||||||
|
"attackSoundId": 10000,
|
||||||
|
"parameters": [],
|
||||||
|
"statModifierConfigs": [],
|
||||||
|
"prefab": "WeaponHandgun",
|
||||||
|
"sprite": "手枪"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2004,
|
||||||
|
"weaponType": 2,
|
||||||
|
"weaponName": "手枪",
|
||||||
|
"tags": [
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"logicType": "WeaponHandgun",
|
||||||
|
"scalingStat": 8,
|
||||||
|
"scalingRatio": 0.5,
|
||||||
|
"rarity": 4,
|
||||||
|
"price": 200,
|
||||||
|
"attack": 150,
|
||||||
|
"cooldown": 1,
|
||||||
|
"damageType": 2,
|
||||||
|
"attackRange": 25,
|
||||||
|
"attackSoundId": 10000,
|
||||||
|
"parameters": [],
|
||||||
|
"statModifierConfigs": [],
|
||||||
|
"prefab": "WeaponHandgun",
|
||||||
|
"sprite": "手枪"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 3001,
|
||||||
"weaponType": 3,
|
"weaponType": 3,
|
||||||
|
"weaponName": "斧头",
|
||||||
|
"tags": [
|
||||||
|
1,
|
||||||
|
5
|
||||||
|
],
|
||||||
"logicType": "WeaponSlash",
|
"logicType": "WeaponSlash",
|
||||||
|
"scalingStat": 5,
|
||||||
|
"scalingRatio": 0.8,
|
||||||
"rarity": 1,
|
"rarity": 1,
|
||||||
"price": 100,
|
"price": 100,
|
||||||
"attack": 150,
|
"attack": 150,
|
||||||
"cooldown": 2000,
|
"cooldown": 2,
|
||||||
"attackRange": 5000,
|
"damageType": 1,
|
||||||
|
"attackRange": 5,
|
||||||
"attackSoundId": 10000,
|
"attackSoundId": 10000,
|
||||||
"parameters": [
|
"parameters": [
|
||||||
[
|
[
|
||||||
@@ -47,53 +223,311 @@
|
|||||||
120
|
120
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"modifiers": [],
|
"statModifierConfigs": [],
|
||||||
"prefab": "WeaponSlash",
|
"prefab": "WeaponSlash",
|
||||||
"sprite": "斧头"
|
"sprite": "斧头"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"id": 3002,
|
||||||
|
"weaponType": 3,
|
||||||
|
"weaponName": "斧头",
|
||||||
|
"tags": [
|
||||||
|
1,
|
||||||
|
5
|
||||||
|
],
|
||||||
|
"logicType": "WeaponSlash",
|
||||||
|
"scalingStat": 5,
|
||||||
|
"scalingRatio": 0.8,
|
||||||
|
"rarity": 2,
|
||||||
|
"price": 140,
|
||||||
|
"attack": 200,
|
||||||
|
"cooldown": 2,
|
||||||
|
"damageType": 1,
|
||||||
|
"attackRange": 5,
|
||||||
|
"attackSoundId": 10000,
|
||||||
|
"parameters": [
|
||||||
|
[
|
||||||
|
2,
|
||||||
|
120
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"statModifierConfigs": [],
|
||||||
|
"prefab": "WeaponSlash",
|
||||||
|
"sprite": "斧头"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 3003,
|
||||||
|
"weaponType": 3,
|
||||||
|
"weaponName": "斧头",
|
||||||
|
"tags": [
|
||||||
|
1,
|
||||||
|
5
|
||||||
|
],
|
||||||
|
"logicType": "WeaponSlash",
|
||||||
|
"scalingStat": 5,
|
||||||
|
"scalingRatio": 0.8,
|
||||||
|
"rarity": 3,
|
||||||
|
"price": 180,
|
||||||
|
"attack": 300,
|
||||||
|
"cooldown": 2,
|
||||||
|
"damageType": 1,
|
||||||
|
"attackRange": 5,
|
||||||
|
"attackSoundId": 10000,
|
||||||
|
"parameters": [
|
||||||
|
[
|
||||||
|
2,
|
||||||
|
120
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"statModifierConfigs": [],
|
||||||
|
"prefab": "WeaponSlash",
|
||||||
|
"sprite": "斧头"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 3004,
|
||||||
|
"weaponType": 3,
|
||||||
|
"weaponName": "斧头",
|
||||||
|
"tags": [
|
||||||
|
1,
|
||||||
|
5
|
||||||
|
],
|
||||||
|
"logicType": "WeaponSlash",
|
||||||
|
"scalingStat": 5,
|
||||||
|
"scalingRatio": 0.8,
|
||||||
|
"rarity": 4,
|
||||||
|
"price": 300,
|
||||||
|
"attack": 400,
|
||||||
|
"cooldown": 2,
|
||||||
|
"damageType": 1,
|
||||||
|
"attackRange": 5,
|
||||||
|
"attackSoundId": 10000,
|
||||||
|
"parameters": [
|
||||||
|
[
|
||||||
|
2,
|
||||||
|
120
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"statModifierConfigs": [],
|
||||||
|
"prefab": "WeaponSlash",
|
||||||
|
"sprite": "斧头"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 4001,
|
||||||
"weaponType": 4,
|
"weaponType": 4,
|
||||||
|
"weaponName": "闪电",
|
||||||
|
"tags": [
|
||||||
|
7
|
||||||
|
],
|
||||||
"logicType": "WeaponLightning",
|
"logicType": "WeaponLightning",
|
||||||
|
"scalingStat": 7,
|
||||||
|
"scalingRatio": 0.5,
|
||||||
"rarity": 1,
|
"rarity": 1,
|
||||||
"price": 150,
|
"price": 150,
|
||||||
"attack": 80,
|
"attack": 80,
|
||||||
"cooldown": 3000,
|
"cooldown": 3,
|
||||||
"attackRange": 12000,
|
"damageType": 4,
|
||||||
|
"attackRange": 12,
|
||||||
"attackSoundId": 10000,
|
"attackSoundId": 10000,
|
||||||
"parameters": [
|
"parameters": [
|
||||||
[
|
[
|
||||||
1,
|
1,
|
||||||
3000
|
3
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"modifiers": [],
|
"statModifierConfigs": [],
|
||||||
"prefab": "WeaponLightning",
|
"prefab": "WeaponLightning",
|
||||||
"sprite": "闪电"
|
"sprite": "闪电"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"id": 4002,
|
||||||
|
"weaponType": 4,
|
||||||
|
"weaponName": "闪电",
|
||||||
|
"tags": [
|
||||||
|
7
|
||||||
|
],
|
||||||
|
"logicType": "WeaponLightning",
|
||||||
|
"scalingStat": 7,
|
||||||
|
"scalingRatio": 0.5,
|
||||||
|
"rarity": 2,
|
||||||
|
"price": 180,
|
||||||
|
"attack": 80,
|
||||||
|
"cooldown": 2.8,
|
||||||
|
"damageType": 4,
|
||||||
|
"attackRange": 12,
|
||||||
|
"attackSoundId": 10000,
|
||||||
|
"parameters": [
|
||||||
|
[
|
||||||
|
1,
|
||||||
|
3
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"statModifierConfigs": [],
|
||||||
|
"prefab": "WeaponLightning",
|
||||||
|
"sprite": "闪电"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 4003,
|
||||||
|
"weaponType": 4,
|
||||||
|
"weaponName": "闪电",
|
||||||
|
"tags": [
|
||||||
|
7
|
||||||
|
],
|
||||||
|
"logicType": "WeaponLightning",
|
||||||
|
"scalingStat": 7,
|
||||||
|
"scalingRatio": 0.5,
|
||||||
|
"rarity": 3,
|
||||||
|
"price": 200,
|
||||||
|
"attack": 80,
|
||||||
|
"cooldown": 2.7,
|
||||||
|
"damageType": 4,
|
||||||
|
"attackRange": 12,
|
||||||
|
"attackSoundId": 10000,
|
||||||
|
"parameters": [
|
||||||
|
[
|
||||||
|
1,
|
||||||
|
3
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"statModifierConfigs": [],
|
||||||
|
"prefab": "WeaponLightning",
|
||||||
|
"sprite": "闪电"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 4004,
|
||||||
|
"weaponType": 4,
|
||||||
|
"weaponName": "闪电",
|
||||||
|
"tags": [
|
||||||
|
7
|
||||||
|
],
|
||||||
|
"logicType": "WeaponLightning",
|
||||||
|
"scalingStat": 7,
|
||||||
|
"scalingRatio": 0.5,
|
||||||
|
"rarity": 4,
|
||||||
|
"price": 250,
|
||||||
|
"attack": 80,
|
||||||
|
"cooldown": 2.5,
|
||||||
|
"damageType": 4,
|
||||||
|
"attackRange": 12,
|
||||||
|
"attackSoundId": 10000,
|
||||||
|
"parameters": [
|
||||||
|
[
|
||||||
|
1,
|
||||||
|
3
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"statModifierConfigs": [],
|
||||||
|
"prefab": "WeaponLightning",
|
||||||
|
"sprite": "闪电"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 5001,
|
||||||
"weaponType": 5,
|
"weaponType": 5,
|
||||||
|
"weaponName": "长枪",
|
||||||
|
"tags": [
|
||||||
|
1,
|
||||||
|
6
|
||||||
|
],
|
||||||
"logicType": "WeaponLance",
|
"logicType": "WeaponLance",
|
||||||
|
"scalingStat": 9,
|
||||||
|
"scalingRatio": 1,
|
||||||
"rarity": 1,
|
"rarity": 1,
|
||||||
"price": 100,
|
"price": 100,
|
||||||
"attack": 100,
|
"attack": 100,
|
||||||
"cooldown": 1500,
|
"cooldown": 1.5,
|
||||||
"attackRange": 5000,
|
"damageType": 1,
|
||||||
|
"attackRange": 5,
|
||||||
"attackSoundId": 10000,
|
"attackSoundId": 10000,
|
||||||
"parameters": [
|
"parameters": [
|
||||||
[
|
[
|
||||||
3,
|
3,
|
||||||
700
|
0.7
|
||||||
],
|
|
||||||
[
|
|
||||||
4,
|
|
||||||
4500
|
|
||||||
],
|
|
||||||
[
|
|
||||||
5,
|
|
||||||
500
|
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"modifiers": [],
|
"statModifierConfigs": [],
|
||||||
|
"prefab": "WeaponLance",
|
||||||
|
"sprite": "长枪"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 5002,
|
||||||
|
"weaponType": 5,
|
||||||
|
"weaponName": "长枪",
|
||||||
|
"tags": [
|
||||||
|
1,
|
||||||
|
6
|
||||||
|
],
|
||||||
|
"logicType": "WeaponLance",
|
||||||
|
"scalingStat": 9,
|
||||||
|
"scalingRatio": 1,
|
||||||
|
"rarity": 2,
|
||||||
|
"price": 200,
|
||||||
|
"attack": 100,
|
||||||
|
"cooldown": 1.5,
|
||||||
|
"damageType": 1,
|
||||||
|
"attackRange": 5,
|
||||||
|
"attackSoundId": 10000,
|
||||||
|
"parameters": [
|
||||||
|
[
|
||||||
|
3,
|
||||||
|
0.7
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"statModifierConfigs": [],
|
||||||
|
"prefab": "WeaponLance",
|
||||||
|
"sprite": "长枪"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 5003,
|
||||||
|
"weaponType": 5,
|
||||||
|
"weaponName": "长枪",
|
||||||
|
"tags": [
|
||||||
|
1,
|
||||||
|
6
|
||||||
|
],
|
||||||
|
"logicType": "WeaponLance",
|
||||||
|
"scalingStat": 9,
|
||||||
|
"scalingRatio": 1,
|
||||||
|
"rarity": 3,
|
||||||
|
"price": 300,
|
||||||
|
"attack": 100,
|
||||||
|
"cooldown": 1.5,
|
||||||
|
"damageType": 1,
|
||||||
|
"attackRange": 5,
|
||||||
|
"attackSoundId": 10000,
|
||||||
|
"parameters": [
|
||||||
|
[
|
||||||
|
3,
|
||||||
|
0.7
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"statModifierConfigs": [],
|
||||||
|
"prefab": "WeaponLance",
|
||||||
|
"sprite": "长枪"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 5004,
|
||||||
|
"weaponType": 5,
|
||||||
|
"weaponName": "长枪",
|
||||||
|
"tags": [
|
||||||
|
1,
|
||||||
|
6
|
||||||
|
],
|
||||||
|
"logicType": "WeaponLance",
|
||||||
|
"scalingStat": 9,
|
||||||
|
"scalingRatio": 1,
|
||||||
|
"rarity": 4,
|
||||||
|
"price": 400,
|
||||||
|
"attack": 100,
|
||||||
|
"cooldown": 1.5,
|
||||||
|
"damageType": 1,
|
||||||
|
"attackRange": 5,
|
||||||
|
"attackSoundId": 10000,
|
||||||
|
"parameters": [
|
||||||
|
[
|
||||||
|
3,
|
||||||
|
0.7
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"statModifierConfigs": [],
|
||||||
"prefab": "WeaponLance",
|
"prefab": "WeaponLance",
|
||||||
"sprite": "长枪"
|
"sprite": "长枪"
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: aa0f76bdb9694ea45b17171cdb5aa41a
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,259 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 101,
|
||||||
|
"tag": 1,
|
||||||
|
"requiredCount": 2,
|
||||||
|
"statModifierConfigs": [
|
||||||
|
{
|
||||||
|
"statType": 5,
|
||||||
|
"value": 1,
|
||||||
|
"modifierType": 100
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 102,
|
||||||
|
"tag": 1,
|
||||||
|
"requiredCount": 4,
|
||||||
|
"statModifierConfigs": [
|
||||||
|
{
|
||||||
|
"statType": 5,
|
||||||
|
"value": 3,
|
||||||
|
"modifierType": 100
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 103,
|
||||||
|
"tag": 1,
|
||||||
|
"requiredCount": 6,
|
||||||
|
"statModifierConfigs": [
|
||||||
|
{
|
||||||
|
"statType": 5,
|
||||||
|
"value": 8,
|
||||||
|
"modifierType": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"statType": 3,
|
||||||
|
"value": 0.05,
|
||||||
|
"modifierType": 100
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 201,
|
||||||
|
"tag": 2,
|
||||||
|
"requiredCount": 2,
|
||||||
|
"statModifierConfigs": [
|
||||||
|
{
|
||||||
|
"statType": 9,
|
||||||
|
"value": 0.03,
|
||||||
|
"modifierType": 100
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 202,
|
||||||
|
"tag": 2,
|
||||||
|
"requiredCount": 4,
|
||||||
|
"statModifierConfigs": [
|
||||||
|
{
|
||||||
|
"statType": 9,
|
||||||
|
"value": 0.08,
|
||||||
|
"modifierType": 100
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 203,
|
||||||
|
"tag": 2,
|
||||||
|
"requiredCount": 6,
|
||||||
|
"statModifierConfigs": [
|
||||||
|
{
|
||||||
|
"statType": 9,
|
||||||
|
"value": 0.15,
|
||||||
|
"modifierType": 100
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 301,
|
||||||
|
"tag": 3,
|
||||||
|
"requiredCount": 2,
|
||||||
|
"statModifierConfigs": [
|
||||||
|
{
|
||||||
|
"statType": 11,
|
||||||
|
"value": 10,
|
||||||
|
"modifierType": 100
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 302,
|
||||||
|
"tag": 3,
|
||||||
|
"requiredCount": 4,
|
||||||
|
"statModifierConfigs": [
|
||||||
|
{
|
||||||
|
"statType": 11,
|
||||||
|
"value": 25,
|
||||||
|
"modifierType": 100
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 303,
|
||||||
|
"tag": 3,
|
||||||
|
"requiredCount": 6,
|
||||||
|
"statModifierConfigs": [
|
||||||
|
{
|
||||||
|
"statType": 11,
|
||||||
|
"value": 50,
|
||||||
|
"modifierType": 100
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 401,
|
||||||
|
"tag": 4,
|
||||||
|
"requiredCount": 2,
|
||||||
|
"statModifierConfigs": [
|
||||||
|
{
|
||||||
|
"statType": 10,
|
||||||
|
"value": 2,
|
||||||
|
"modifierType": 100
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 402,
|
||||||
|
"tag": 4,
|
||||||
|
"requiredCount": 4,
|
||||||
|
"statModifierConfigs": [
|
||||||
|
{
|
||||||
|
"statType": 10,
|
||||||
|
"value": 5,
|
||||||
|
"modifierType": 100
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 403,
|
||||||
|
"tag": 4,
|
||||||
|
"requiredCount": 6,
|
||||||
|
"statModifierConfigs": [
|
||||||
|
{
|
||||||
|
"statType": 10,
|
||||||
|
"value": 10,
|
||||||
|
"modifierType": 100
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 501,
|
||||||
|
"tag": 5,
|
||||||
|
"requiredCount": 2,
|
||||||
|
"statModifierConfigs": [
|
||||||
|
{
|
||||||
|
"statType": 12,
|
||||||
|
"value": 1,
|
||||||
|
"modifierType": 100
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 502,
|
||||||
|
"tag": 5,
|
||||||
|
"requiredCount": 4,
|
||||||
|
"statModifierConfigs": [
|
||||||
|
{
|
||||||
|
"statType": 12,
|
||||||
|
"value": 3,
|
||||||
|
"modifierType": 100
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 503,
|
||||||
|
"tag": 5,
|
||||||
|
"requiredCount": 6,
|
||||||
|
"statModifierConfigs": [
|
||||||
|
{
|
||||||
|
"statType": 12,
|
||||||
|
"value": 6,
|
||||||
|
"modifierType": 100
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 601,
|
||||||
|
"tag": 6,
|
||||||
|
"requiredCount": 2,
|
||||||
|
"statModifierConfigs": [
|
||||||
|
{
|
||||||
|
"statType": 1,
|
||||||
|
"value": 3,
|
||||||
|
"modifierType": 100
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 602,
|
||||||
|
"tag": 6,
|
||||||
|
"requiredCount": 3,
|
||||||
|
"statModifierConfigs": [
|
||||||
|
{
|
||||||
|
"statType": 1,
|
||||||
|
"value": 6,
|
||||||
|
"modifierType": 100
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 603,
|
||||||
|
"tag": 6,
|
||||||
|
"requiredCount": 6,
|
||||||
|
"statModifierConfigs": [
|
||||||
|
{
|
||||||
|
"statType": 1,
|
||||||
|
"value": 15,
|
||||||
|
"modifierType": 100
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 701,
|
||||||
|
"tag": 7,
|
||||||
|
"requiredCount": 2,
|
||||||
|
"statModifierConfigs": [
|
||||||
|
{
|
||||||
|
"statType": 7,
|
||||||
|
"value": 1,
|
||||||
|
"modifierType": 100
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 702,
|
||||||
|
"tag": 7,
|
||||||
|
"requiredCount": 4,
|
||||||
|
"statModifierConfigs": [
|
||||||
|
{
|
||||||
|
"statType": 7,
|
||||||
|
"value": 3,
|
||||||
|
"modifierType": 100
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 703,
|
||||||
|
"tag": 7,
|
||||||
|
"requiredCount": 6,
|
||||||
|
"statModifierConfigs": [
|
||||||
|
{
|
||||||
|
"statType": 7,
|
||||||
|
"value": 7,
|
||||||
|
"modifierType": 100
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 539ec5eae528e654dbaf3e4a48e227aa
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -1,580 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using SepCore.Event;
|
|
||||||
using SepCore.Definition;
|
|
||||||
using SepCore.Entity;
|
|
||||||
using SepCore.Components;
|
|
||||||
using SepCore.CustomUtility;
|
|
||||||
using SepCore.Simulation;
|
|
||||||
using SepCore.EnemyManager;
|
|
||||||
using SepCore.Procedure;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityGameFramework.Runtime;
|
|
||||||
#if ENABLE_INPUT_SYSTEM
|
|
||||||
using UnityEngine.InputSystem;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
public class RuntimeDebugPanelComponent : MonoBehaviour
|
|
||||||
|
|
||||||
{
|
|
||||||
private const float MinSpawnRate = 0.1f;
|
|
||||||
private const float CornerTapWindow = 0.6f;
|
|
||||||
private const int RequiredCornerTapCount = 3;
|
|
||||||
private const int DebugHealAmount = 200;
|
|
||||||
|
|
||||||
[Header("Window Content")] [SerializeField]
|
|
||||||
private bool _showBuffSection = true;
|
|
||||||
|
|
||||||
[SerializeField] private bool _showBattleOverview = true;
|
|
||||||
[SerializeField] private bool _showCollisionStats = true;
|
|
||||||
[SerializeField] private bool _showSpawnControls = true;
|
|
||||||
[SerializeField] private bool _showBattleDurationControls = true;
|
|
||||||
[SerializeField] private bool _showPlayerWeaponControls = true;
|
|
||||||
[SerializeField] private bool _showPlayerHealthControls = true;
|
|
||||||
[SerializeField] private bool _showTips = true;
|
|
||||||
|
|
||||||
private Rect _windowRect;
|
|
||||||
private Vector2 _panelScroll;
|
|
||||||
private GUISkin _panelSkin;
|
|
||||||
private bool _isPanelVisible;
|
|
||||||
private int _windowId;
|
|
||||||
|
|
||||||
private string _searchText = string.Empty;
|
|
||||||
private int _selectedIndex;
|
|
||||||
private int _addCount = 1;
|
|
||||||
private Vector2 _buffScroll;
|
|
||||||
|
|
||||||
private float _spawnRateScaleInput = 1f;
|
|
||||||
private float _extendDurationSeconds = 30f;
|
|
||||||
|
|
||||||
private IReadOnlyList<PropConfig> _allProps;
|
|
||||||
private IReadOnlyList<PropConfig> _filteredProps;
|
|
||||||
private string[] _displayNames = Array.Empty<string>();
|
|
||||||
|
|
||||||
private int _cornerTapCount;
|
|
||||||
private float _lastCornerTapTime = -10f;
|
|
||||||
private bool _lockPlayerHealthToMax;
|
|
||||||
|
|
||||||
private void Awake()
|
|
||||||
{
|
|
||||||
_windowId = GetInstanceID();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Update()
|
|
||||||
{
|
|
||||||
if (IsTogglePressed())
|
|
||||||
{
|
|
||||||
_isPanelVisible = !_isPanelVisible;
|
|
||||||
}
|
|
||||||
|
|
||||||
HandleCornerTapGesture();
|
|
||||||
if (_lockPlayerHealthToMax)
|
|
||||||
{
|
|
||||||
KeepPlayerHealthAtMax();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnGUI()
|
|
||||||
{
|
|
||||||
GUISkin previousSkin = GUI.skin;
|
|
||||||
Matrix4x4 previousMatrix = GUI.matrix;
|
|
||||||
if (_panelSkin == null)
|
|
||||||
{
|
|
||||||
_panelSkin = Instantiate(previousSkin);
|
|
||||||
_panelSkin.label.fontSize = 18;
|
|
||||||
_panelSkin.label.wordWrap = true;
|
|
||||||
_panelSkin.button.fontSize = 18;
|
|
||||||
_panelSkin.button.padding = new RectOffset(12, 12, 10, 10);
|
|
||||||
_panelSkin.button.fixedHeight = 44f;
|
|
||||||
_panelSkin.textField.fontSize = 20;
|
|
||||||
_panelSkin.textField.fixedHeight = 44f;
|
|
||||||
_panelSkin.textField.padding = new RectOffset(10, 10, 10, 10);
|
|
||||||
_panelSkin.window.padding = new RectOffset(16, 16, 12, 16);
|
|
||||||
_panelSkin.verticalScrollbar.fixedWidth = 28f;
|
|
||||||
_panelSkin.verticalScrollbarThumb.fixedWidth = 28f;
|
|
||||||
}
|
|
||||||
|
|
||||||
Rect safeArea = Screen.safeArea;
|
|
||||||
float scale = Mathf.Max(0.1f, Mathf.Min(safeArea.width, safeArea.height) / 480f);
|
|
||||||
Rect bounds = new Rect(0f, 0f, safeArea.width / scale, safeArea.height / scale);
|
|
||||||
try
|
|
||||||
{
|
|
||||||
GUI.skin = _panelSkin;
|
|
||||||
GUI.matrix = Matrix4x4.TRS(
|
|
||||||
new Vector3(safeArea.x, Screen.height - safeArea.yMax, 0f),
|
|
||||||
Quaternion.identity, new Vector3(scale, scale, 1f));
|
|
||||||
DrawToggleButton(bounds);
|
|
||||||
if (!_isPanelVisible) return;
|
|
||||||
|
|
||||||
float width = Mathf.Min(460f, bounds.width - 24f);
|
|
||||||
_windowRect = new Rect(bounds.width - width - 12f, 72f, width,
|
|
||||||
Mathf.Min(760f, bounds.height - 84f));
|
|
||||||
GUI.Window(_windowId, _windowRect, DrawWindow, string.Empty);
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
GUI.matrix = previousMatrix;
|
|
||||||
GUI.skin = previousSkin;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnDestroy()
|
|
||||||
{
|
|
||||||
if (_panelSkin != null) Destroy(_panelSkin);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void DrawToggleButton(Rect bounds)
|
|
||||||
{
|
|
||||||
const float width = 120f;
|
|
||||||
const float height = 48f;
|
|
||||||
Rect buttonRect = new Rect(bounds.width - width - 12f, 12f, width, height);
|
|
||||||
if (GUI.Button(buttonRect, "DEBUG"))
|
|
||||||
{
|
|
||||||
_isPanelVisible = !_isPanelVisible;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void DrawWindow(int windowId)
|
|
||||||
{
|
|
||||||
if (_showBuffSection)
|
|
||||||
{
|
|
||||||
EnsurePropList();
|
|
||||||
}
|
|
||||||
|
|
||||||
GUILayout.BeginVertical();
|
|
||||||
GUILayout.BeginHorizontal();
|
|
||||||
GUILayout.Label("Runtime Debug", GUILayout.ExpandWidth(true));
|
|
||||||
if (GUILayout.Button("Close", GUILayout.Width(90f))) _isPanelVisible = false;
|
|
||||||
GUILayout.EndHorizontal();
|
|
||||||
GUILayout.Space(8f);
|
|
||||||
_panelScroll = GUILayout.BeginScrollView(_panelScroll, false, true);
|
|
||||||
|
|
||||||
bool hasPreviousSection = false;
|
|
||||||
if (_showBuffSection)
|
|
||||||
{
|
|
||||||
DrawBuffSection();
|
|
||||||
hasPreviousSection = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (HasVisibleBattleSection())
|
|
||||||
{
|
|
||||||
if (hasPreviousSection)
|
|
||||||
{
|
|
||||||
GUILayout.Space(8f);
|
|
||||||
GUILayout.Label(string.Empty, GUI.skin.horizontalSlider);
|
|
||||||
GUILayout.Space(8f);
|
|
||||||
}
|
|
||||||
|
|
||||||
DrawBattleSection();
|
|
||||||
hasPreviousSection = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_showTips)
|
|
||||||
{
|
|
||||||
if (hasPreviousSection)
|
|
||||||
{
|
|
||||||
GUILayout.Space(8f);
|
|
||||||
}
|
|
||||||
|
|
||||||
GUILayout.Label("Tips: press F8 or tap top-left corner 3 times to toggle.");
|
|
||||||
}
|
|
||||||
|
|
||||||
GUILayout.EndScrollView();
|
|
||||||
GUILayout.EndVertical();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void DrawBuffSection()
|
|
||||||
{
|
|
||||||
GUILayout.Label("Buff Debug");
|
|
||||||
GUILayout.BeginHorizontal();
|
|
||||||
GUILayout.Label("Search", GUILayout.Width(78f));
|
|
||||||
_searchText = GUILayout.TextField(_searchText);
|
|
||||||
if (GUILayout.Button("Refresh", GUILayout.Width(100f)))
|
|
||||||
{
|
|
||||||
EnsurePropList(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
GUILayout.EndHorizontal();
|
|
||||||
|
|
||||||
ApplyFilter(_searchText);
|
|
||||||
if (_displayNames.Length == 0)
|
|
||||||
{
|
|
||||||
GUILayout.Label("No Buff data. Enter battle and try again.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_selectedIndex = Mathf.Clamp(_selectedIndex, 0, _displayNames.Length - 1);
|
|
||||||
_buffScroll = GUILayout.BeginScrollView(_buffScroll, GUILayout.Height(120f));
|
|
||||||
_selectedIndex = GUILayout.SelectionGrid(_selectedIndex, _displayNames, 1);
|
|
||||||
GUILayout.EndScrollView();
|
|
||||||
|
|
||||||
PropConfig selectedProp = GetSelectedProp();
|
|
||||||
if (selectedProp == null) return;
|
|
||||||
|
|
||||||
GUILayout.Label($"Selected: {selectedProp.Name} ({selectedProp.Rarity})");
|
|
||||||
GUILayout.Label(ItemDescUtility.CreatePropDescription(selectedProp.Modifiers), GUILayout.Height(40f));
|
|
||||||
|
|
||||||
GUILayout.BeginHorizontal();
|
|
||||||
GUILayout.Label("Count", GUILayout.Width(78f));
|
|
||||||
string addCountText = GUILayout.TextField(_addCount.ToString(), GUILayout.Width(88f));
|
|
||||||
if (!int.TryParse(addCountText, out _addCount)) _addCount = 1;
|
|
||||||
_addCount = Mathf.Clamp(_addCount, 1, 99);
|
|
||||||
|
|
||||||
if (GUILayout.Button("Add Buff To Player", GUILayout.Height(44f)))
|
|
||||||
{
|
|
||||||
AddSelectedBuffToPlayer(selectedProp, _addCount);
|
|
||||||
}
|
|
||||||
|
|
||||||
GUILayout.EndHorizontal();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void DrawBattleSection()
|
|
||||||
{
|
|
||||||
GUILayout.Label("Battle Debug");
|
|
||||||
ProcedureGame procedure = GameEntry.Procedure.CurrentProcedure as ProcedureGame;
|
|
||||||
EnemyManagerComponent enemyManager = GameEntry.EnemyManager;
|
|
||||||
Player player = FindPlayer();
|
|
||||||
HealthComponent playerHealth = player != null ? player.GetComponent<HealthComponent>() : null;
|
|
||||||
|
|
||||||
if (enemyManager == null)
|
|
||||||
{
|
|
||||||
GUILayout.Label("EnemyManager unavailable.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (procedure == null)
|
|
||||||
{
|
|
||||||
GUILayout.Label("ProcedureGame unavailable.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_showBattleOverview)
|
|
||||||
{
|
|
||||||
GUILayout.Label($"Spawn Rate: {enemyManager.SpawnRateScale:F2}");
|
|
||||||
GUILayout.Label(
|
|
||||||
$"Battle Time: {enemyManager.ElapsedBattleTime:F1}s / {enemyManager.BattleDuration:F1}s");
|
|
||||||
GUILayout.Label($"Enemy Count: {enemyManager.CurrentEnemyCount}");
|
|
||||||
}
|
|
||||||
|
|
||||||
SimulationWorld simulationWorld = GameEntry.SimulationWorld;
|
|
||||||
if (_showCollisionStats && simulationWorld != null)
|
|
||||||
{
|
|
||||||
GUILayout.Space(4f);
|
|
||||||
GUILayout.Label(
|
|
||||||
$"Collision Queries: total {simulationWorld.LastCollisionQueryCount} (Projectile {simulationWorld.LastProjectileCollisionQueryCount} / Area {simulationWorld.LastAreaCollisionQueryCount})");
|
|
||||||
GUILayout.Label(
|
|
||||||
$"Collision Candidates: total {simulationWorld.LastCollisionCandidateCount} (Projectile {simulationWorld.LastProjectileCollisionCandidateCount} / Area {simulationWorld.LastAreaCollisionCandidateCount})");
|
|
||||||
GUILayout.Label(
|
|
||||||
$"Area Resolve: hits {simulationWorld.LastResolvedAreaHitCount}");
|
|
||||||
GUILayout.Label(
|
|
||||||
$"Broad Phase: cell {simulationWorld.LastCollisionCellSize:F2}, hasEnemyTargets {(simulationWorld.LastCollisionHasEnemyTargets ? "Yes" : "No")}");
|
|
||||||
if (simulationWorld.LastCollisionCandidateCount != 0)
|
|
||||||
{
|
|
||||||
Log.Info($"LastCollisionCandidateCount:{simulationWorld.LastCollisionCandidateCount}");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (simulationWorld.LastResolvedAreaHitCount != 0)
|
|
||||||
{
|
|
||||||
Log.Info($"LastResolvedAreaHitCount:{simulationWorld.LastResolvedAreaHitCount}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_showSpawnControls)
|
|
||||||
{
|
|
||||||
GUILayout.Space(12f);
|
|
||||||
GUILayout.Label("Enemy Spawn Rate");
|
|
||||||
GUILayout.BeginHorizontal();
|
|
||||||
GUILayout.Label("Rate", GUILayout.Width(78f));
|
|
||||||
string rateText = GUILayout.TextField(_spawnRateScaleInput.ToString("F2"), GUILayout.Width(88f));
|
|
||||||
if (float.TryParse(rateText, out float parsedRate))
|
|
||||||
{
|
|
||||||
_spawnRateScaleInput = Mathf.Clamp(parsedRate, MinSpawnRate, 50f);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (GUILayout.Button("Apply", GUILayout.Width(100f)))
|
|
||||||
{
|
|
||||||
enemyManager.SetSpawnRateScale(_spawnRateScaleInput);
|
|
||||||
}
|
|
||||||
|
|
||||||
GUILayout.EndHorizontal();
|
|
||||||
GUILayout.BeginHorizontal();
|
|
||||||
|
|
||||||
if (GUILayout.Button("x0.5"))
|
|
||||||
{
|
|
||||||
_spawnRateScaleInput = Mathf.Max(MinSpawnRate, enemyManager.SpawnRateScale * 0.5f);
|
|
||||||
enemyManager.SetSpawnRateScale(_spawnRateScaleInput);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (GUILayout.Button("x2"))
|
|
||||||
{
|
|
||||||
_spawnRateScaleInput = enemyManager.SpawnRateScale * 2f;
|
|
||||||
enemyManager.SetSpawnRateScale(_spawnRateScaleInput);
|
|
||||||
}
|
|
||||||
|
|
||||||
GUILayout.EndHorizontal();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_showBattleDurationControls)
|
|
||||||
{
|
|
||||||
GUILayout.Space(12f);
|
|
||||||
GUILayout.Label("Battle Duration");
|
|
||||||
GUILayout.BeginHorizontal();
|
|
||||||
GUILayout.Label("Add Sec", GUILayout.Width(78f));
|
|
||||||
string durationText = GUILayout.TextField(_extendDurationSeconds.ToString("F0"), GUILayout.Width(88f));
|
|
||||||
if (float.TryParse(durationText, out float parsedDuration))
|
|
||||||
{
|
|
||||||
_extendDurationSeconds = Mathf.Clamp(parsedDuration, 1f, 3600f);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (GUILayout.Button("Extend Battle", GUILayout.Height(44f)))
|
|
||||||
{
|
|
||||||
if (procedure.CurrentGameState is GameStateBattle gameState)
|
|
||||||
{
|
|
||||||
gameState.AddBattleDuration(_extendDurationSeconds);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
GUILayout.EndHorizontal();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_showPlayerWeaponControls)
|
|
||||||
{
|
|
||||||
GUILayout.Space(12f);
|
|
||||||
GUILayout.Label(
|
|
||||||
$"Player Weapon: {(player == null ? "Player not found" : (player.WeaponEnabled ? "Enabled" : "Disabled"))}");
|
|
||||||
GUILayout.BeginHorizontal();
|
|
||||||
GUI.enabled = player != null;
|
|
||||||
if (GUILayout.Button("Disable Weapons", GUILayout.Height(44f)))
|
|
||||||
{
|
|
||||||
player.SetWeaponEnabled(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (GUILayout.Button("Enable Weapons", GUILayout.Height(44f)))
|
|
||||||
{
|
|
||||||
player.SetWeaponEnabled(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
GUI.enabled = true;
|
|
||||||
GUILayout.EndHorizontal();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_showPlayerHealthControls)
|
|
||||||
{
|
|
||||||
GUILayout.Space(4f);
|
|
||||||
GUILayout.Label(
|
|
||||||
$"Player HP: {(playerHealth == null ? "Unavailable" : $"{playerHealth.CurrentHealth}/{playerHealth.MaxHealth}")}");
|
|
||||||
GUILayout.BeginHorizontal();
|
|
||||||
GUI.enabled = playerHealth != null;
|
|
||||||
if (GUILayout.Button($"+{DebugHealAmount} HP", GUILayout.Height(44f)))
|
|
||||||
{
|
|
||||||
AddPlayerHealth(playerHealth, DebugHealAmount);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (GUILayout.Button(_lockPlayerHealthToMax ? "GodMode: ON" : "GodMode: OFF", GUILayout.Height(44f)))
|
|
||||||
{
|
|
||||||
_lockPlayerHealthToMax = !_lockPlayerHealthToMax;
|
|
||||||
if (_lockPlayerHealthToMax)
|
|
||||||
{
|
|
||||||
RestorePlayerHealthToMax(playerHealth);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
GUI.enabled = true;
|
|
||||||
GUILayout.EndHorizontal();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool HasVisibleBattleSection()
|
|
||||||
{
|
|
||||||
return _showBattleOverview ||
|
|
||||||
_showCollisionStats ||
|
|
||||||
_showSpawnControls ||
|
|
||||||
_showBattleDurationControls ||
|
|
||||||
_showPlayerWeaponControls ||
|
|
||||||
_showPlayerHealthControls;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void EnsurePropList(bool force = false)
|
|
||||||
{
|
|
||||||
if (!force && _allProps != null && _allProps.Count > 0) return;
|
|
||||||
|
|
||||||
if (GameEntry.Luban == null)
|
|
||||||
{
|
|
||||||
_allProps = Array.Empty<PropConfig>();
|
|
||||||
_displayNames = Array.Empty<string>();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_allProps = GameEntry.Luban.GetTable<PropConfig>();
|
|
||||||
_selectedIndex = Mathf.Clamp(_selectedIndex, 0, Mathf.Max(0, _allProps.Count - 1));
|
|
||||||
ApplyFilter(_searchText);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ApplyFilter(string keyword)
|
|
||||||
{
|
|
||||||
if (_allProps == null || _allProps.Count == 0)
|
|
||||||
{
|
|
||||||
_displayNames = Array.Empty<string>();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(keyword))
|
|
||||||
{
|
|
||||||
_filteredProps = _allProps;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
string search = keyword.Trim();
|
|
||||||
_filteredProps = _allProps.Where(p =>
|
|
||||||
p != null &&
|
|
||||||
(p.Name?.IndexOf(search, StringComparison.OrdinalIgnoreCase) >= 0 ||
|
|
||||||
p.Id.ToString().Contains(search))).ToArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
_displayNames = _filteredProps.Select(p => $"[{p.Id}] {p.Name} ({p.Rarity})").ToArray();
|
|
||||||
if (_displayNames.Length == 0) _selectedIndex = 0;
|
|
||||||
else _selectedIndex = Mathf.Clamp(_selectedIndex, 0, _displayNames.Length - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
private PropConfig GetSelectedProp()
|
|
||||||
{
|
|
||||||
if (_filteredProps == null || _filteredProps.Count == 0) return null;
|
|
||||||
_selectedIndex = Mathf.Clamp(_selectedIndex, 0, _filteredProps.Count - 1);
|
|
||||||
return _filteredProps[_selectedIndex];
|
|
||||||
}
|
|
||||||
|
|
||||||
private static Player FindPlayer()
|
|
||||||
{
|
|
||||||
return UnityEngine.Object.FindObjectOfType<Player>();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void KeepPlayerHealthAtMax()
|
|
||||||
{
|
|
||||||
Player player = FindPlayer();
|
|
||||||
if (player == null) return;
|
|
||||||
|
|
||||||
HealthComponent playerHealth = player.GetComponent<HealthComponent>();
|
|
||||||
if (playerHealth == null) return;
|
|
||||||
|
|
||||||
RestorePlayerHealthToMax(playerHealth);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void AddPlayerHealth(HealthComponent playerHealth, int amount)
|
|
||||||
{
|
|
||||||
if (playerHealth == null || amount <= 0) return;
|
|
||||||
if (playerHealth.CurrentHealth <= 0) return;
|
|
||||||
|
|
||||||
int maxHealth = playerHealth.MaxHealth;
|
|
||||||
if (maxHealth <= 0) return;
|
|
||||||
|
|
||||||
int nextHealth = Mathf.Clamp(playerHealth.CurrentHealth + amount, 0, maxHealth);
|
|
||||||
if (nextHealth == playerHealth.CurrentHealth) return;
|
|
||||||
|
|
||||||
playerHealth.CurrentHealth = nextHealth;
|
|
||||||
PublishPlayerHealthChanged(playerHealth);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void RestorePlayerHealthToMax(HealthComponent playerHealth)
|
|
||||||
{
|
|
||||||
if (playerHealth == null) return;
|
|
||||||
if (playerHealth.CurrentHealth <= 0) return;
|
|
||||||
|
|
||||||
int maxHealth = playerHealth.MaxHealth;
|
|
||||||
if (maxHealth <= 0 || playerHealth.CurrentHealth >= maxHealth) return;
|
|
||||||
|
|
||||||
playerHealth.CurrentHealth = maxHealth;
|
|
||||||
PublishPlayerHealthChanged(playerHealth);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void PublishPlayerHealthChanged(HealthComponent playerHealth)
|
|
||||||
{
|
|
||||||
if (playerHealth == null || GameEntry.Event == null) return;
|
|
||||||
|
|
||||||
GameEntry.Event.Fire(null,
|
|
||||||
PlayerHealthChangeEventArgs.Create(0, playerHealth.CurrentHealth, playerHealth.MaxHealth));
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void AddSelectedBuffToPlayer(PropConfig prop, int count)
|
|
||||||
{
|
|
||||||
Player player = FindPlayer();
|
|
||||||
if (player == null || prop == null || prop.Modifiers == null) return;
|
|
||||||
|
|
||||||
int applyCount = Mathf.Clamp(count, 1, 99);
|
|
||||||
for (int i = 0; i < applyCount; i++)
|
|
||||||
{
|
|
||||||
player.AddProp(new PropItem(prop));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void HandleCornerTapGesture()
|
|
||||||
{
|
|
||||||
if (!TryGetTouchReleased(out Vector2 touchPosition)) return;
|
|
||||||
if (touchPosition.x > 80f || touchPosition.y < Screen.height - 80f) return;
|
|
||||||
|
|
||||||
float now = Time.unscaledTime;
|
|
||||||
if (now - _lastCornerTapTime > CornerTapWindow)
|
|
||||||
{
|
|
||||||
_cornerTapCount = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
_lastCornerTapTime = now;
|
|
||||||
_cornerTapCount++;
|
|
||||||
|
|
||||||
if (_cornerTapCount >= RequiredCornerTapCount)
|
|
||||||
{
|
|
||||||
_cornerTapCount = 0;
|
|
||||||
_isPanelVisible = !_isPanelVisible;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static bool IsTogglePressed()
|
|
||||||
{
|
|
||||||
#if ENABLE_INPUT_SYSTEM
|
|
||||||
Keyboard keyboard = Keyboard.current;
|
|
||||||
if (keyboard == null) return false;
|
|
||||||
return keyboard.backquoteKey.wasPressedThisFrame || keyboard.f8Key.wasPressedThisFrame;
|
|
||||||
#else
|
|
||||||
return Input.GetKeyDown(KeyCode.BackQuote) || Input.GetKeyDown(KeyCode.F8);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
private static bool TryGetTouchReleased(out Vector2 touchPosition)
|
|
||||||
{
|
|
||||||
#if ENABLE_INPUT_SYSTEM
|
|
||||||
Touchscreen touchscreen = Touchscreen.current;
|
|
||||||
if (touchscreen == null)
|
|
||||||
{
|
|
||||||
touchPosition = default;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
var touch = touchscreen.primaryTouch;
|
|
||||||
if (!touch.press.wasReleasedThisFrame)
|
|
||||||
{
|
|
||||||
touchPosition = default;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
touchPosition = touch.position.ReadValue();
|
|
||||||
return true;
|
|
||||||
#else
|
|
||||||
if (Input.touchCount <= 0)
|
|
||||||
{
|
|
||||||
touchPosition = default;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Touch touch = Input.GetTouch(0);
|
|
||||||
if (touch.phase != TouchPhase.Ended)
|
|
||||||
{
|
|
||||||
touchPosition = default;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
touchPosition = touch.position;
|
|
||||||
return true;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+1
-1
@@ -115,7 +115,7 @@ GameObject:
|
|||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 8253353784175897923}
|
- component: {fileID: 8253353784175897923}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: BulletHandgun
|
m_Name: Projectile
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 8
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: ShopPurchaseText
|
||||||
|
m_Shader: {fileID: 4800000, guid: 68e6db2ebdc24f95958faec2be5558d6, type: 3}
|
||||||
|
m_Parent: {fileID: 0}
|
||||||
|
m_ModifiedSerializedProperties: 0
|
||||||
|
m_ValidKeywords: []
|
||||||
|
m_InvalidKeywords: []
|
||||||
|
m_LightmapFlags: 4
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
stringTagMap: {}
|
||||||
|
disabledShaderPasses: []
|
||||||
|
m_LockedProperties:
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BumpMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _Cube:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _FaceTex:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: -7144655853075370802, guid: 99d811b0183246646a2ce8df996f4bca,
|
||||||
|
type: 2}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _OutlineTex:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Ints: []
|
||||||
|
m_Floats:
|
||||||
|
- _Ambient: 0.5
|
||||||
|
- _Bevel: 0.5
|
||||||
|
- _BevelClamp: 0
|
||||||
|
- _BevelOffset: 0
|
||||||
|
- _BevelRoundness: 0
|
||||||
|
- _BevelWidth: 0
|
||||||
|
- _BumpFace: 0
|
||||||
|
- _BumpOutline: 0
|
||||||
|
- _ColorMask: 15
|
||||||
|
- _CullMode: 0
|
||||||
|
- _Diffuse: 0.5
|
||||||
|
- _FaceDilate: 0
|
||||||
|
- _FaceUVSpeedX: 0
|
||||||
|
- _FaceUVSpeedY: 0
|
||||||
|
- _GlowInner: 0.05
|
||||||
|
- _GlowOffset: 0
|
||||||
|
- _GlowOuter: 0.05
|
||||||
|
- _GlowPower: 0.75
|
||||||
|
- _GradientScale: 6
|
||||||
|
- _LightAngle: 3.1416
|
||||||
|
- _MaskSoftnessX: 0
|
||||||
|
- _MaskSoftnessY: 0
|
||||||
|
- _OutlineSoftness: 0
|
||||||
|
- _OutlineUVSpeedX: 0
|
||||||
|
- _OutlineUVSpeedY: 0
|
||||||
|
- _OutlineWidth: 0
|
||||||
|
- _PerspectiveFilter: 0.875
|
||||||
|
- _Reflectivity: 10
|
||||||
|
- _ScaleRatioA: 0.8333333
|
||||||
|
- _ScaleRatioB: 0.6770833
|
||||||
|
- _ScaleRatioC: 0.6770833
|
||||||
|
- _ScaleX: 1
|
||||||
|
- _ScaleY: 1
|
||||||
|
- _ShaderFlags: 0
|
||||||
|
- _Sharpness: 0
|
||||||
|
- _SpecularPower: 2
|
||||||
|
- _Stencil: 0
|
||||||
|
- _StencilComp: 8
|
||||||
|
- _StencilOp: 0
|
||||||
|
- _StencilReadMask: 255
|
||||||
|
- _StencilWriteMask: 255
|
||||||
|
- _TextureHeight: 4096
|
||||||
|
- _TextureWidth: 4096
|
||||||
|
- _UnderlayDilate: 0
|
||||||
|
- _UnderlayOffsetX: 0
|
||||||
|
- _UnderlayOffsetY: 0
|
||||||
|
- _UnderlaySoftness: 0
|
||||||
|
- _VertexOffsetX: 0
|
||||||
|
- _VertexOffsetY: 0
|
||||||
|
- _WeightBold: 0.75
|
||||||
|
- _WeightNormal: 0
|
||||||
|
m_Colors:
|
||||||
|
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
|
||||||
|
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
- _FaceColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5}
|
||||||
|
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767}
|
||||||
|
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
|
||||||
|
m_BuildTextureStacks: []
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4b5f8c74582ca924bad8e5655ec04a31
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 2100000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -18,12 +18,55 @@ namespace SepCore.Definition
|
|||||||
{
|
{
|
||||||
public const string DefaultLayerName = "Default";
|
public const string DefaultLayerName = "Default";
|
||||||
public static readonly int DefaultLayerId = LayerMask.NameToLayer(DefaultLayerName);
|
public static readonly int DefaultLayerId = LayerMask.NameToLayer(DefaultLayerName);
|
||||||
|
public static readonly LayerMask DefaultLayerMask = 1 << DefaultLayerId;
|
||||||
|
|
||||||
|
public const string TransparentFXLayerName = "TransparentFX";
|
||||||
|
public static readonly int TransparentLayerId = LayerMask.NameToLayer(TransparentFXLayerName);
|
||||||
|
public static readonly LayerMask TransparentLayerMask = 1 << TransparentLayerId;
|
||||||
|
|
||||||
|
public const string IgnoreRaycastLayerName = "Ignore Raycast";
|
||||||
|
public static readonly int IgnoreLayerId = LayerMask.NameToLayer(IgnoreRaycastLayerName);
|
||||||
|
public static readonly LayerMask IgnoreLayerMask = 1 << IgnoreLayerId;
|
||||||
|
|
||||||
|
public const string WaterLayerName = "Water";
|
||||||
|
public static readonly int WaterLayerId = LayerMask.NameToLayer(WaterLayerName);
|
||||||
|
public static readonly LayerMask WaterLayerMask = 1 << WaterLayerId;
|
||||||
|
|
||||||
public const string UILayerName = "UI";
|
public const string UILayerName = "UI";
|
||||||
public static readonly int UILayerId = LayerMask.NameToLayer(UILayerName);
|
public static readonly int UILayerId = LayerMask.NameToLayer(UILayerName);
|
||||||
|
public static readonly LayerMask UILayerMask = 1 << UILayerId;
|
||||||
|
|
||||||
public const string TargetableObjectLayerName = "Targetable Object";
|
public const string TargetableObjectLayerName = "Targetable Object";
|
||||||
public static readonly int TargetableObjectLayerId = LayerMask.NameToLayer(TargetableObjectLayerName);
|
public static readonly int TargetableObjectLayerId = LayerMask.NameToLayer(TargetableObjectLayerName);
|
||||||
|
public static readonly LayerMask TargetableObjectLayerMask = 1 << TargetableObjectLayerId;
|
||||||
|
|
||||||
|
public const string PlayerLayerName = "Player";
|
||||||
|
public static readonly int PlayerLayerId = LayerMask.NameToLayer(PlayerLayerName);
|
||||||
|
public static readonly LayerMask PlayerLayerMask = 1 << PlayerLayerId;
|
||||||
|
|
||||||
|
public const string EnemyLayerName = "Enemy";
|
||||||
|
public static readonly int EnemyLayerId = LayerMask.NameToLayer(EnemyLayerName);
|
||||||
|
public static readonly LayerMask EnemyLayerMask = 1 << EnemyLayerId;
|
||||||
|
|
||||||
|
public const string PlayerBulletLayerName = "PlayerBullet";
|
||||||
|
public static readonly int PlayerBulletLayerId = LayerMask.NameToLayer(PlayerBulletLayerName);
|
||||||
|
public static readonly LayerMask PlayerBulletLayerMask = 1 << PlayerBulletLayerId;
|
||||||
|
|
||||||
|
public const string EnemyBulletLayerName = "EnemyBullet";
|
||||||
|
public static readonly int EnemyBulletLayerId = LayerMask.NameToLayer(EnemyBulletLayerName);
|
||||||
|
public static readonly LayerMask EnemyBulletLayerMask = 1 << EnemyBulletLayerId;
|
||||||
|
|
||||||
|
public const string PlayerWeaponLayerName = "PlayerWeapon";
|
||||||
|
public static readonly int PlayerWeaponLayerId = LayerMask.NameToLayer(PlayerWeaponLayerName);
|
||||||
|
public static readonly LayerMask PlayerWeaponLayerMask = 1 << PlayerWeaponLayerId;
|
||||||
|
|
||||||
|
public const string EnemyWeaponLayerName = "EnemyWeapon";
|
||||||
|
public static readonly int EnemyWeaponLayerId = LayerMask.NameToLayer(EnemyWeaponLayerName);
|
||||||
|
public static readonly LayerMask EnemyWeaponLayerMask = 1 << EnemyWeaponLayerId;
|
||||||
|
|
||||||
|
public const string DropLayerName = "Drop";
|
||||||
|
public static readonly int DropLayerId = LayerMask.NameToLayer(DropLayerName);
|
||||||
|
public static readonly LayerMask DropLayerMask = 1 << DropLayerId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
namespace SepCore.Definition
|
||||||
|
{
|
||||||
|
public static class DamageTypeExtensions
|
||||||
|
{
|
||||||
|
public static StatType ToScalingStat(this DamageType damageType)
|
||||||
|
{
|
||||||
|
switch (damageType)
|
||||||
|
{
|
||||||
|
case DamageType.Melee:
|
||||||
|
return StatType.MeleeDamage;
|
||||||
|
case DamageType.Ranged:
|
||||||
|
return StatType.RangedDamage;
|
||||||
|
case DamageType.Element:
|
||||||
|
return StatType.ElementalDamage;
|
||||||
|
default:
|
||||||
|
return StatType.None;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 574d105bf89bf7546a682ed407708034
|
guid: 5e6128fa910e4a778c187123490b4119
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
namespace SepCore.Definition
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 属性查询接口。
|
||||||
|
/// 供战斗碰撞(ImpactData)与伤害管线解耦读取属性值。
|
||||||
|
/// </summary>
|
||||||
|
public interface IAttributeProvider
|
||||||
|
{
|
||||||
|
float GetValue(StatType statType);
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: da25d8e0669f0194d8f56f4283c67b38
|
guid: b483f12479014631bb5914285260aa31
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
@@ -1,37 +1,45 @@
|
|||||||
//------------------------------------------------------------
|
|
||||||
// Game Framework
|
|
||||||
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
|
|
||||||
// Homepage: https://gameframework.cn/
|
|
||||||
// Feedback: mailto:ellan@gameframework.cn
|
|
||||||
//------------------------------------------------------------
|
|
||||||
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using SepCore.Definition;
|
|
||||||
|
|
||||||
namespace SepCore.Definition
|
namespace SepCore.Definition
|
||||||
{
|
{
|
||||||
[StructLayout(LayoutKind.Auto)]
|
[StructLayout(LayoutKind.Auto)]
|
||||||
public struct ImpactData
|
public struct ImpactData
|
||||||
{
|
{
|
||||||
public ImpactData(CampType camp /*, int health*/, int attackBase, StatProperty attackStat = null,
|
|
||||||
StatProperty defenseStat = null, StatProperty dodgeStat = null)
|
|
||||||
{
|
|
||||||
Camp = camp;
|
|
||||||
//Health = health;
|
|
||||||
AttackBase = attackBase;
|
|
||||||
AttackStat = attackStat;
|
|
||||||
DefenseStat = defenseStat;
|
|
||||||
DodgeStat = dodgeStat;
|
|
||||||
}
|
|
||||||
|
|
||||||
public CampType Camp { get; }
|
public CampType Camp { get; }
|
||||||
|
|
||||||
public int AttackBase { get; }
|
public int AttackBase { get; }
|
||||||
|
|
||||||
public StatProperty AttackStat { get; }
|
public DamageType DamageType { get; }
|
||||||
|
|
||||||
public StatProperty DefenseStat { get; }
|
public float ScalingRatio { get; }
|
||||||
|
|
||||||
public StatProperty DodgeStat { get; }
|
public float BaseCritChance { get; }
|
||||||
|
|
||||||
|
public float CritMultiplier { get; }
|
||||||
|
|
||||||
|
public IAttributeProvider AttributeProvider { get; }
|
||||||
|
|
||||||
|
public ImpactData(
|
||||||
|
CampType camp,
|
||||||
|
int attackBase,
|
||||||
|
IAttributeProvider attributeProvider = null,
|
||||||
|
DamageType damageType = DamageType.None,
|
||||||
|
float scalingRatio = 1.0f,
|
||||||
|
float baseCritChance = 0f,
|
||||||
|
float critMultiplier = 0f)
|
||||||
|
{
|
||||||
|
Camp = camp;
|
||||||
|
AttackBase = attackBase;
|
||||||
|
AttributeProvider = attributeProvider;
|
||||||
|
DamageType = damageType;
|
||||||
|
ScalingRatio = scalingRatio;
|
||||||
|
BaseCritChance = baseCritChance;
|
||||||
|
CritMultiplier = critMultiplier;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImpactData(CampType camp, int attackBase)
|
||||||
|
: this(camp, attackBase, null, DamageType.None, 1.0f, 0f, 0f)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,24 +4,24 @@ namespace SepCore.Definition
|
|||||||
{
|
{
|
||||||
public class PropItem
|
public class PropItem
|
||||||
{
|
{
|
||||||
private readonly List<modifier> _modifiers = new();
|
private readonly List<StatModifierConfig> _modifiers = new();
|
||||||
public string Title { get; private set; }
|
public string Title { get; private set; }
|
||||||
public string IconAssetName { get; private set; }
|
public string IconAssetName { get; private set; }
|
||||||
public Rarity Rarity { get; private set; }
|
public Rarity Rarity { get; private set; }
|
||||||
public IReadOnlyList<modifier> Modifiers => _modifiers;
|
public IReadOnlyList<StatModifierConfig> Modifiers => _modifiers;
|
||||||
|
|
||||||
public PropItem(PropConfig prop)
|
public PropItem(PropConfig prop)
|
||||||
{
|
{
|
||||||
if (prop.Modifiers != null)
|
if (prop.StatModifierConfigs != null)
|
||||||
{
|
{
|
||||||
_modifiers.AddRange(prop.Modifiers);
|
_modifiers.AddRange(prop.StatModifierConfigs);
|
||||||
}
|
}
|
||||||
Title = prop.Name;
|
Title = prop.Name;
|
||||||
Rarity = prop.Rarity;
|
Rarity = prop.Rarity;
|
||||||
IconAssetName = prop.Sprite;
|
IconAssetName = prop.Sprite;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PropItem(IEnumerable<modifier> modifiers)
|
public PropItem(IEnumerable<StatModifierConfig> modifiers)
|
||||||
{
|
{
|
||||||
if (modifiers != null)
|
if (modifiers != null)
|
||||||
{
|
{
|
||||||
@@ -29,7 +29,7 @@ namespace SepCore.Definition
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public PropItem(IEnumerable<modifier> modifiers, Rarity rarity, string title, string iconAssetName)
|
public PropItem(IEnumerable<StatModifierConfig> modifiers, Rarity rarity, string title, string iconAssetName)
|
||||||
{
|
{
|
||||||
if (modifiers != null)
|
if (modifiers != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
namespace SepCore.Definition
|
||||||
|
{
|
||||||
|
public sealed partial class StatConfig
|
||||||
|
{
|
||||||
|
public StatConfig()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public StatConfig(
|
||||||
|
StatType statType,
|
||||||
|
string name = "",
|
||||||
|
float defaultBaseValue = 0f,
|
||||||
|
bool hasMin = false,
|
||||||
|
float minValue = 0f,
|
||||||
|
bool hasMax = false,
|
||||||
|
float maxValue = 0f,
|
||||||
|
bool isPercentDisplay = false)
|
||||||
|
{
|
||||||
|
StatType = statType;
|
||||||
|
Name = name;
|
||||||
|
DefaultBaseValue = defaultBaseValue;
|
||||||
|
HasMin = hasMin;
|
||||||
|
MinValue = minValue;
|
||||||
|
HasMax = hasMax;
|
||||||
|
MaxValue = maxValue;
|
||||||
|
IsPercentDisplay = isPercentDisplay;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 4d1a821e8ee1a9a4b912b70b0a1616eb
|
guid: 7b910e53a2454b5f903517865c36ad18
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace SepCore.Definition
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 属性修饰器。
|
||||||
|
/// 包含修饰数值、修饰类型(固定值/百分比加算/独立乘区)以及来源对象(道具/武器/羁绊/特质/Buff)。
|
||||||
|
/// </summary>
|
||||||
|
public sealed class StatModifier
|
||||||
|
{
|
||||||
|
public float Value { get; }
|
||||||
|
public ModifierType Type { get; }
|
||||||
|
public object Source { get; }
|
||||||
|
|
||||||
|
public StatModifier(float value, ModifierType type, object source = null)
|
||||||
|
{
|
||||||
|
Value = value;
|
||||||
|
Type = type;
|
||||||
|
Source = source;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 从 Luban 导出的 modifier 数据结构转换。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="mod">Luban modifier 数据实例</param>
|
||||||
|
/// <param name="source">来源对象引用</param>
|
||||||
|
public static StatModifier FromLuban(StatModifierConfig mod, object source = null)
|
||||||
|
{
|
||||||
|
if (mod == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(mod));
|
||||||
|
}
|
||||||
|
|
||||||
|
ModifierType type = mod.ModifierType;
|
||||||
|
return new StatModifier(mod.Value, type, source);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return $"[StatModifier Type={Type}, Value={Value}, Source={Source}]";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: e82dc413a4cd277429ec1e3f2de69434
|
guid: 887b4b22fce86cb43b95cfdf3c6b967c
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace SepCore.Definition
|
||||||
|
{
|
||||||
|
public sealed partial class StatModifierConfig
|
||||||
|
{
|
||||||
|
public StatModifierConfig()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public StatModifierConfig(StatType statType, float value, ModifierType modifierType)
|
||||||
|
{
|
||||||
|
StatType = statType;
|
||||||
|
Value = value;
|
||||||
|
ModifierType = modifierType;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
namespace SepCore.Definition
|
|
||||||
{
|
|
||||||
public class StatProperty
|
|
||||||
{
|
|
||||||
public float Value;
|
|
||||||
public float Percent;
|
|
||||||
|
|
||||||
public StatProperty()
|
|
||||||
{
|
|
||||||
Value = 0f;
|
|
||||||
Percent = 1f;
|
|
||||||
}
|
|
||||||
|
|
||||||
public StatProperty(float value, float percent)
|
|
||||||
{
|
|
||||||
Value = value;
|
|
||||||
Percent = percent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 18e7bc9587114ae4a91c70f829543de8
|
|
||||||
timeCreated: 1770353735
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
using System;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace SepCore.Definition
|
|
||||||
{
|
|
||||||
public sealed partial class modifier
|
|
||||||
{
|
|
||||||
public StatType StatType => Key;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 实际参与数值计算的浮点数值。
|
|
||||||
/// 1. 百分比加成(IsPercent == true):表内千分比(如 200 代表 20%),转换为 0.2f。
|
|
||||||
/// 2. 非百分比加成(IsPercent == false):移动速度原为 float 放大了 1000 倍(如 800 代表 0.8f),除以 1000f;其余(如生命+53、攻击+10)直接使用原值。
|
|
||||||
/// </summary>
|
|
||||||
public float RealValue
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (IsPercent)
|
|
||||||
{
|
|
||||||
return Value / 1000f;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Key == StatType.MovementSpeed)
|
|
||||||
{
|
|
||||||
return Value / 1000f;
|
|
||||||
}
|
|
||||||
|
|
||||||
return Value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public modifier()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public modifier(StatType key, int value, bool isPercent)
|
|
||||||
{
|
|
||||||
Key = key;
|
|
||||||
Value = value;
|
|
||||||
IsPercent = isPercent;
|
|
||||||
}
|
|
||||||
|
|
||||||
public modifier(StatType key, float value, bool isPercent)
|
|
||||||
{
|
|
||||||
Key = key;
|
|
||||||
Value = (isPercent || key == StatType.MovementSpeed)
|
|
||||||
? Mathf.RoundToInt(value * 1000f)
|
|
||||||
: Mathf.RoundToInt(value);
|
|
||||||
IsPercent = isPercent;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string ToDisplayString()
|
|
||||||
{
|
|
||||||
if (IsPercent)
|
|
||||||
{
|
|
||||||
float percent = Value / 10f;
|
|
||||||
return $"{Key} +{percent:0.##}%";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Key == StatType.MovementSpeed)
|
|
||||||
{
|
|
||||||
float speed = Value / 1000f;
|
|
||||||
return $"{Key} +{speed:0.##}";
|
|
||||||
}
|
|
||||||
|
|
||||||
return $"{Key} +{Value}";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -8,55 +8,47 @@ namespace SepCore.Entity
|
|||||||
[Serializable]
|
[Serializable]
|
||||||
public class EnemyData : TargetableObjectData
|
public class EnemyData : TargetableObjectData
|
||||||
{
|
{
|
||||||
private readonly EnemyConfig _enemyConfig;
|
public EnemyConfig Config { get; }
|
||||||
|
|
||||||
public EnemyData(int entityId, EnemyConfig enemyConfig, int level)
|
public EnemyData(int entityId, EnemyConfig enemyConfig, int level)
|
||||||
: base(enemyConfig.Prefab, entityId, CampType.Enemy)
|
: base(enemyConfig.Prefab, entityId, CampType.Enemy)
|
||||||
{
|
{
|
||||||
_enemyConfig = enemyConfig;
|
Config = enemyConfig;
|
||||||
int effectiveLevel = Mathf.Max(1, level);
|
int effectiveLevel = Mathf.Max(1, level);
|
||||||
MaxHealthBase = enemyConfig.MaxHealth + enemyConfig.HpAddPerLevel * (effectiveLevel - 1);
|
MaxHealthBase = enemyConfig.MaxHealth + enemyConfig.HpAddPerLevel * (effectiveLevel - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public EnemyType EnemyType => _enemyConfig.EnemyType;
|
public EnemyType EnemyType => Config.EnemyType;
|
||||||
|
|
||||||
public string LogicType => _enemyConfig.LogicType;
|
public string LogicType => Config.LogicType;
|
||||||
|
|
||||||
public override int MaxHealthBase { get; }
|
public override int MaxHealthBase { get; }
|
||||||
|
|
||||||
public int AttackDamage => _enemyConfig.AttackDamage;
|
public int AttackDamage => Config.AttackDamage;
|
||||||
|
|
||||||
public float AttackCooldown => _enemyConfig.AttackCooldown;
|
public float AttackCooldown => Config.AttackCooldown;
|
||||||
|
|
||||||
public float AttackRange => _enemyConfig.AttackRange;
|
public float AttackRange => Config.AttackRange;
|
||||||
|
|
||||||
public float SpeedBase => _enemyConfig.Speed;
|
public float SpeedBase => Config.Speed;
|
||||||
|
|
||||||
public int DropCoin => _enemyConfig.CoinDrop;
|
public int DropCoin => Config.CoinDrop;
|
||||||
|
|
||||||
public int DropExp => _enemyConfig.ExpDrop;
|
public int DropExp => Config.ExpDrop;
|
||||||
|
|
||||||
public float DropPercent => _enemyConfig.DropPercent;
|
public float DropPercent => Config.DropPercent;
|
||||||
|
|
||||||
public float Scale => _enemyConfig.Scale;
|
public float Scale => Config.Scale;
|
||||||
|
|
||||||
public Color Color
|
public Color Color
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
// 空/非法颜色值视为无染色(乘以白色)。
|
// 空/非法颜色值视为无染色(乘以白色)。
|
||||||
return ColorUtility.TryParseHtmlString(_enemyConfig.Color, out Color color)
|
return ColorUtility.TryParseHtmlString(Config.Color, out Color color)
|
||||||
? color
|
? color
|
||||||
: Color.white;
|
: Color.white;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public IReadOnlyDictionary<string, string> Params => null;
|
|
||||||
|
|
||||||
public bool TryGetParam(string key, out string value)
|
|
||||||
{
|
|
||||||
value = null;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ namespace SepCore.Entity
|
|||||||
public class EnemyProjectileData : EntityDataBase
|
public class EnemyProjectileData : EntityDataBase
|
||||||
{
|
{
|
||||||
public EnemyProjectileData(int entityId, int ownerEntityId, CampType ownerCamp, int attackDamage,
|
public EnemyProjectileData(int entityId, int ownerEntityId, CampType ownerCamp, int attackDamage,
|
||||||
float speed, float lifeTime, Vector3 direction, string assetName = "BulletHandgun")
|
float speed, float lifeTime, Vector3 direction, string assetName = "Projectile")
|
||||||
: base(assetName, entityId)
|
: base(assetName, entityId)
|
||||||
{
|
{
|
||||||
OwnerEntityId = ownerEntityId;
|
OwnerEntityId = ownerEntityId;
|
||||||
|
|||||||
@@ -1,59 +1,58 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using SepCore.Definition;
|
using SepCore.Definition;
|
||||||
|
using UnityGameFramework.Runtime;
|
||||||
|
|
||||||
namespace SepCore.Entity
|
namespace SepCore.Entity
|
||||||
{
|
{
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class WeaponData : AccessoryObjectData
|
public class WeaponData : AccessoryObjectData
|
||||||
{
|
{
|
||||||
private readonly WeaponConfig _weaponConfig;
|
public WeaponConfig Config { get; }
|
||||||
|
|
||||||
public WeaponData(int entityId, WeaponConfig weaponConfig, int ownerId, CampType ownerCamp)
|
public WeaponData(int entityId, WeaponConfig weaponConfig, int ownerId, CampType ownerCamp)
|
||||||
: base(weaponConfig.Prefab, entityId, ownerId, ownerCamp)
|
: base(weaponConfig.Prefab, entityId, ownerId, ownerCamp)
|
||||||
{
|
{
|
||||||
_weaponConfig = weaponConfig;
|
Config = weaponConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
public WeaponConfig Config => _weaponConfig;
|
public WeaponType WeaponType => Config.WeaponType;
|
||||||
|
|
||||||
public WeaponType WeaponType => _weaponConfig.WeaponType;
|
public string LogicType => Config.LogicType;
|
||||||
|
|
||||||
public string LogicType => _weaponConfig.LogicType;
|
public int Attack => Config.Attack;
|
||||||
|
|
||||||
public int Attack => _weaponConfig.Attack;
|
public DamageType DamageType => Config.DamageType;
|
||||||
|
|
||||||
public string Title => _weaponConfig.WeaponType.ToString();
|
public string Title => Config.WeaponName;
|
||||||
|
|
||||||
public string IconAssetName => _weaponConfig.Sprite;
|
public string Sprite => Config.Sprite;
|
||||||
|
|
||||||
public Rarity Rarity => _weaponConfig.Rarity;
|
public Rarity Rarity => Config.Rarity;
|
||||||
|
|
||||||
public int Price => _weaponConfig.Price;
|
public int Price => Config.Price;
|
||||||
|
|
||||||
public float Cooldown => _weaponConfig.Cooldown / 1000f;
|
public float Cooldown => Config.Cooldown;
|
||||||
|
|
||||||
public float AttackRange => _weaponConfig.AttackRange / 1000f;
|
public float AttackRange => Config.AttackRange;
|
||||||
|
|
||||||
public int AttackSoundId => _weaponConfig.AttackSoundId;
|
public int AttackSoundId => Config.AttackSoundId;
|
||||||
|
|
||||||
public IReadOnlyDictionary<ParamType, int> Parameters => _weaponConfig.Parameters;
|
public IReadOnlyDictionary<ParamType, float> Parameters => Config.Parameters;
|
||||||
|
|
||||||
public IReadOnlyList<modifier> Modifiers => _weaponConfig.Modifiers;
|
public IReadOnlyList<StatModifierConfig> Modifiers => Config.StatModifierConfigs;
|
||||||
|
|
||||||
public int GetParam(ParamType paramType, int defaultValue = 0)
|
public IReadOnlyList<WeaponTag> Tags => Config.Tags;
|
||||||
|
|
||||||
|
public float GetParamFloat(ParamType paramType)
|
||||||
{
|
{
|
||||||
return _weaponConfig.Parameters.TryGetValue(paramType, out int value) ? value : defaultValue;
|
if (Config.Parameters.TryGetValue(paramType, out float val))
|
||||||
|
{
|
||||||
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float GetParamFloat(ParamType paramType, float defaultValue = 0f)
|
Log.Error("Weapon parameter '{0}' not found for weapon '{1}'.", paramType, Config.WeaponType);
|
||||||
{
|
return 0f;
|
||||||
if (_weaponConfig.Parameters.TryGetValue(paramType, out int val))
|
|
||||||
{
|
|
||||||
return paramType == ParamType.SectorAngle ? val : val / 1000f;
|
|
||||||
}
|
|
||||||
|
|
||||||
return defaultValue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
using System;
|
|
||||||
using SepCore.Definition;
|
|
||||||
|
|
||||||
namespace SepCore.Entity
|
|
||||||
{
|
|
||||||
[Serializable]
|
|
||||||
public sealed class WeaponHandgunParamsData
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public class WeaponHandgunData : WeaponData
|
|
||||||
{
|
|
||||||
public WeaponHandgunParamsData ParamsData { get; }
|
|
||||||
|
|
||||||
public WeaponHandgunData(int entityId, WeaponConfig weaponConfig, int ownerId, CampType ownerCamp)
|
|
||||||
: base(entityId, weaponConfig, ownerId, ownerCamp)
|
|
||||||
{
|
|
||||||
ParamsData = new WeaponHandgunParamsData();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
using System;
|
|
||||||
using SepCore.Definition;
|
|
||||||
|
|
||||||
namespace SepCore.Entity
|
|
||||||
{
|
|
||||||
[Serializable]
|
|
||||||
public sealed class WeaponKnifeParamsData
|
|
||||||
{
|
|
||||||
public float HitRadius { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class WeaponKnifeData : WeaponData
|
|
||||||
{
|
|
||||||
public WeaponKnifeParamsData ParamsData { get; }
|
|
||||||
|
|
||||||
public WeaponKnifeData(int entityId, WeaponConfig weaponConfig, int ownerId, CampType ownerCamp)
|
|
||||||
: base(entityId, weaponConfig, ownerId, ownerCamp)
|
|
||||||
{
|
|
||||||
ParamsData = new WeaponKnifeParamsData
|
|
||||||
{
|
|
||||||
HitRadius = GetParamFloat(ParamType.HitRadius)
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
using System;
|
|
||||||
using SepCore.Definition;
|
|
||||||
|
|
||||||
namespace SepCore.Entity
|
|
||||||
{
|
|
||||||
[Serializable]
|
|
||||||
public sealed class WeaponLanceParamsData
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 横向半宽,表示前戳矩形判定的一半宽度。
|
|
||||||
/// </summary>
|
|
||||||
public float HitHalfWidth { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 旧字段兼容,未配置 HitHalfWidth 时回退使用。
|
|
||||||
/// </summary>
|
|
||||||
public float HitRadius { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 前戳判定盒体的总高度。
|
|
||||||
/// </summary>
|
|
||||||
public float HitHeight { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 判定盒体中心相对战斗平面的高度偏移。
|
|
||||||
/// </summary>
|
|
||||||
public float HitCenterYOffset { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 前刺距离,同时驱动武器位移和命中长度。
|
|
||||||
/// </summary>
|
|
||||||
public float PierceLength { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 旧字段兼容,未配置 PierceLength 时回退使用。
|
|
||||||
/// </summary>
|
|
||||||
public float ThrustDistance { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 判定起点相对武器当前位置的前置偏移。
|
|
||||||
/// </summary>
|
|
||||||
public float ForwardOffset { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 追踪目标时的转向速度。
|
|
||||||
/// </summary>
|
|
||||||
public float RotateSpeed { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 向前突刺阶段耗时。
|
|
||||||
/// </summary>
|
|
||||||
public float AttackDuration { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 收枪返回阶段耗时。
|
|
||||||
/// </summary>
|
|
||||||
public float ReturnDuration { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
[Serializable]
|
|
||||||
public class WeaponLanceData : WeaponData
|
|
||||||
{
|
|
||||||
public WeaponLanceParamsData ParamsData { get; }
|
|
||||||
|
|
||||||
public WeaponLanceData(int entityId, WeaponConfig weaponConfig, int ownerId, CampType ownerCamp)
|
|
||||||
: base(entityId, weaponConfig, ownerId, ownerCamp)
|
|
||||||
{
|
|
||||||
ParamsData = new WeaponLanceParamsData
|
|
||||||
{
|
|
||||||
HitHalfWidth = GetParamFloat(ParamType.HitHalfWidth),
|
|
||||||
PierceLength = GetParamFloat(ParamType.PierceLength),
|
|
||||||
HitHeight = GetParamFloat(ParamType.HitHeight)
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
using System;
|
|
||||||
using SepCore.Definition;
|
|
||||||
|
|
||||||
namespace SepCore.Entity
|
|
||||||
{
|
|
||||||
[Serializable]
|
|
||||||
public sealed class WeaponLightningParamsData
|
|
||||||
{
|
|
||||||
public float HitRadius { get; set; }
|
|
||||||
public float HoverHeight { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class WeaponLightningData : WeaponData
|
|
||||||
{
|
|
||||||
public WeaponLightningParamsData ParamsData { get; }
|
|
||||||
|
|
||||||
public WeaponLightningData(int entityId, WeaponConfig weaponConfig, int ownerId, CampType ownerCamp)
|
|
||||||
: base(entityId, weaponConfig, ownerId, ownerCamp)
|
|
||||||
{
|
|
||||||
ParamsData = new WeaponLightningParamsData
|
|
||||||
{
|
|
||||||
HitRadius = GetParamFloat(ParamType.HitRadius),
|
|
||||||
HoverHeight = 0f
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 25b0006918fd46959c7f6b8ec1bbc8ab
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
using System;
|
|
||||||
using SepCore.Definition;
|
|
||||||
|
|
||||||
namespace SepCore.Entity
|
|
||||||
{
|
|
||||||
[Serializable]
|
|
||||||
public sealed class WeaponSlashParamsData
|
|
||||||
{
|
|
||||||
public float SectorAngle { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class WeaponSlashData : WeaponData
|
|
||||||
{
|
|
||||||
public WeaponSlashParamsData ParamsData { get; }
|
|
||||||
|
|
||||||
public WeaponSlashData(int entityId, WeaponConfig weaponConfig, int ownerId, CampType ownerCamp)
|
|
||||||
: base(entityId, weaponConfig, ownerId, ownerCamp)
|
|
||||||
{
|
|
||||||
ParamsData = new WeaponSlashParamsData
|
|
||||||
{
|
|
||||||
SectorAngle = GetParamFloat(ParamType.SectorAngle)
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 4aa6473525dc4c62aeee02ff562ec453
|
|
||||||
timeCreated: 1771484661
|
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
namespace SepCore.Definition
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 伤害类型
|
||||||
|
/// </summary>
|
||||||
|
[System.Flags]
|
||||||
|
public enum DamageType : int
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 无
|
||||||
|
/// </summary>
|
||||||
|
None = 0,
|
||||||
|
/// <summary>
|
||||||
|
/// 近战伤害
|
||||||
|
/// </summary>
|
||||||
|
Melee = 1,
|
||||||
|
/// <summary>
|
||||||
|
/// 远程伤害
|
||||||
|
/// </summary>
|
||||||
|
Ranged = 2,
|
||||||
|
/// <summary>
|
||||||
|
/// 元素伤害
|
||||||
|
/// </summary>
|
||||||
|
Element = 4,
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 178341689d25049458e8460d398db2dc
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
namespace SepCore.Definition
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 敌人状态
|
||||||
|
/// </summary>
|
||||||
|
public enum EnemyStateType : byte
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 无
|
||||||
|
/// </summary>
|
||||||
|
None = 0,
|
||||||
|
/// <summary>
|
||||||
|
/// 攻击
|
||||||
|
/// </summary>
|
||||||
|
Attack = 1,
|
||||||
|
/// <summary>
|
||||||
|
/// 待机
|
||||||
|
/// </summary>
|
||||||
|
Idle = 2,
|
||||||
|
/// <summary>
|
||||||
|
/// 搜索
|
||||||
|
/// </summary>
|
||||||
|
Seek = 3,
|
||||||
|
/// <summary>
|
||||||
|
/// 追逐
|
||||||
|
/// </summary>
|
||||||
|
Chase = 4,
|
||||||
|
/// <summary>
|
||||||
|
/// 死亡
|
||||||
|
/// </summary>
|
||||||
|
Dead = 5,
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d55e30fdec251d141bab19b1b87806b3
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
using Luban;
|
||||||
|
|
||||||
|
|
||||||
|
namespace SepCore.Definition
|
||||||
|
{
|
||||||
|
public sealed partial class FormatText : Luban.BeanBase
|
||||||
|
{
|
||||||
|
public FormatText(ByteBuf _buf)
|
||||||
|
{
|
||||||
|
Name = _buf.ReadString();
|
||||||
|
Format = _buf.ReadString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static FormatText DeserializeFormatText(ByteBuf _buf)
|
||||||
|
{
|
||||||
|
return new FormatText(_buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文本名
|
||||||
|
/// </summary>
|
||||||
|
public readonly string Name;
|
||||||
|
/// <summary>
|
||||||
|
/// 格式化字符串
|
||||||
|
/// </summary>
|
||||||
|
public readonly string Format;
|
||||||
|
|
||||||
|
public const int __ID__ = -1977697820;
|
||||||
|
public override int GetTypeId() => __ID__;
|
||||||
|
|
||||||
|
public void ResolveRef(Tables tables)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return "{ "
|
||||||
|
+ "name:" + Name + ","
|
||||||
|
+ "format:" + Format + ","
|
||||||
|
+ "}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 721766cc68542b640a2119ab0c73a833
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -17,6 +17,41 @@ public sealed partial class GlobalConfig : Luban.BeanBase
|
|||||||
public GlobalConfig(ByteBuf _buf)
|
public GlobalConfig(ByteBuf _buf)
|
||||||
{
|
{
|
||||||
WeaponCapacity = _buf.ReadInt();
|
WeaponCapacity = _buf.ReadInt();
|
||||||
|
PropMaxCount = _buf.ReadInt();
|
||||||
|
PlayerEntity = _buf.ReadString();
|
||||||
|
PlayerEntity_Ref = null;
|
||||||
|
AbsorbSpeed = _buf.ReadFloat();
|
||||||
|
CollectDistance = _buf.ReadFloat();
|
||||||
|
DefaultAbsorbRange = _buf.ReadFloat();
|
||||||
|
WeaponRecycleRate = _buf.ReadFloat();
|
||||||
|
ShopGoodsCount = _buf.ReadInt();
|
||||||
|
ShopPriceRandomPercent = _buf.ReadFloat();
|
||||||
|
ShopMinPrice = _buf.ReadInt();
|
||||||
|
LevelUpRefreshPriceBase = _buf.ReadInt();
|
||||||
|
LevelUpRewardCount = _buf.ReadInt();
|
||||||
|
SpawnEnemyMaxCount = _buf.ReadInt();
|
||||||
|
EnemySpawnDistanceMin = _buf.ReadFloat();
|
||||||
|
EnemySpawnDistanceMax = _buf.ReadFloat();
|
||||||
|
WeaponRotateSpeed = _buf.ReadFloat();
|
||||||
|
WeaponBaseCrit = _buf.ReadFloat();
|
||||||
|
PlayerGroupName = _buf.ReadString();
|
||||||
|
EnemyGroupName = _buf.ReadString();
|
||||||
|
ProjectileGroupName = _buf.ReadString();
|
||||||
|
DropGroupName = _buf.ReadString();
|
||||||
|
EffectGroupNmae = _buf.ReadString();
|
||||||
|
MinDamage = _buf.ReadInt();
|
||||||
|
MaxDodgeRate = _buf.ReadInt();
|
||||||
|
MinSpawnRateScale = _buf.ReadInt();
|
||||||
|
ProjectileLifeTime = _buf.ReadInt();
|
||||||
|
ProjectileHeightOffset = _buf.ReadInt();
|
||||||
|
ProjectileSpeed = _buf.ReadInt();
|
||||||
|
ProjectileEntity = _buf.ReadString();
|
||||||
|
ProjectileEntity_Ref = null;
|
||||||
|
DamageTextYOffset = _buf.ReadInt();
|
||||||
|
EntityAsyncTimeout = _buf.ReadInt();
|
||||||
|
CritMultiplier = _buf.ReadFloat();
|
||||||
|
EnemyBodyRadius = _buf.ReadInt();
|
||||||
|
EnemySeparationIterations = _buf.ReadInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static GlobalConfig DeserializeGlobalConfig(ByteBuf _buf)
|
public static GlobalConfig DeserializeGlobalConfig(ByteBuf _buf)
|
||||||
@@ -28,6 +63,140 @@ public sealed partial class GlobalConfig : Luban.BeanBase
|
|||||||
/// 最大持有武器数量
|
/// 最大持有武器数量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly int WeaponCapacity;
|
public readonly int WeaponCapacity;
|
||||||
|
/// <summary>
|
||||||
|
/// 最大持有道具数量
|
||||||
|
/// </summary>
|
||||||
|
public readonly int PropMaxCount;
|
||||||
|
/// <summary>
|
||||||
|
/// 玩家实体
|
||||||
|
/// </summary>
|
||||||
|
public readonly string PlayerEntity;
|
||||||
|
public EntityConfig PlayerEntity_Ref;
|
||||||
|
/// <summary>
|
||||||
|
/// 自动收集速度
|
||||||
|
/// </summary>
|
||||||
|
public readonly float AbsorbSpeed;
|
||||||
|
/// <summary>
|
||||||
|
/// 自动收集距离
|
||||||
|
/// </summary>
|
||||||
|
public readonly float CollectDistance;
|
||||||
|
/// <summary>
|
||||||
|
/// 默认吸收距离
|
||||||
|
/// </summary>
|
||||||
|
public readonly float DefaultAbsorbRange;
|
||||||
|
/// <summary>
|
||||||
|
/// 武器回收价比例
|
||||||
|
/// </summary>
|
||||||
|
public readonly float WeaponRecycleRate;
|
||||||
|
/// <summary>
|
||||||
|
/// 商店商品数量
|
||||||
|
/// </summary>
|
||||||
|
public readonly int ShopGoodsCount;
|
||||||
|
/// <summary>
|
||||||
|
/// 商品价格浮动
|
||||||
|
/// </summary>
|
||||||
|
public readonly float ShopPriceRandomPercent;
|
||||||
|
/// <summary>
|
||||||
|
/// 商品最低价
|
||||||
|
/// </summary>
|
||||||
|
public readonly int ShopMinPrice;
|
||||||
|
/// <summary>
|
||||||
|
/// 升级奖励刷新基本价格
|
||||||
|
/// </summary>
|
||||||
|
public readonly int LevelUpRefreshPriceBase;
|
||||||
|
/// <summary>
|
||||||
|
/// 升级奖励候选数
|
||||||
|
/// </summary>
|
||||||
|
public readonly int LevelUpRewardCount;
|
||||||
|
/// <summary>
|
||||||
|
/// 最大敌人数量
|
||||||
|
/// </summary>
|
||||||
|
public readonly int SpawnEnemyMaxCount;
|
||||||
|
/// <summary>
|
||||||
|
/// 敌人生成最小距离
|
||||||
|
/// </summary>
|
||||||
|
public readonly float EnemySpawnDistanceMin;
|
||||||
|
/// <summary>
|
||||||
|
/// 敌人生成最大距离
|
||||||
|
/// </summary>
|
||||||
|
public readonly float EnemySpawnDistanceMax;
|
||||||
|
/// <summary>
|
||||||
|
/// 武器旋转速度
|
||||||
|
/// </summary>
|
||||||
|
public readonly float WeaponRotateSpeed;
|
||||||
|
/// <summary>
|
||||||
|
/// 武器基本暴击率
|
||||||
|
/// </summary>
|
||||||
|
public readonly float WeaponBaseCrit;
|
||||||
|
/// <summary>
|
||||||
|
/// 玩家对象组名
|
||||||
|
/// </summary>
|
||||||
|
public readonly string PlayerGroupName;
|
||||||
|
/// <summary>
|
||||||
|
/// 敌人对象组名
|
||||||
|
/// </summary>
|
||||||
|
public readonly string EnemyGroupName;
|
||||||
|
/// <summary>
|
||||||
|
/// 投射物对象组名
|
||||||
|
/// </summary>
|
||||||
|
public readonly string ProjectileGroupName;
|
||||||
|
/// <summary>
|
||||||
|
/// 掉落物对象组名
|
||||||
|
/// </summary>
|
||||||
|
public readonly string DropGroupName;
|
||||||
|
/// <summary>
|
||||||
|
/// 特效对象组名
|
||||||
|
/// </summary>
|
||||||
|
public readonly string EffectGroupNmae;
|
||||||
|
/// <summary>
|
||||||
|
/// 最小伤害
|
||||||
|
/// </summary>
|
||||||
|
public readonly int MinDamage;
|
||||||
|
/// <summary>
|
||||||
|
/// 闪避率上限
|
||||||
|
/// </summary>
|
||||||
|
public readonly int MaxDodgeRate;
|
||||||
|
/// <summary>
|
||||||
|
/// 最小刷怪速度倍数
|
||||||
|
/// </summary>
|
||||||
|
public readonly int MinSpawnRateScale;
|
||||||
|
/// <summary>
|
||||||
|
/// 投射物生命周期
|
||||||
|
/// </summary>
|
||||||
|
public readonly int ProjectileLifeTime;
|
||||||
|
/// <summary>
|
||||||
|
/// 投射物生成高度
|
||||||
|
/// </summary>
|
||||||
|
public readonly int ProjectileHeightOffset;
|
||||||
|
/// <summary>
|
||||||
|
/// 投射物移动速度
|
||||||
|
/// </summary>
|
||||||
|
public readonly int ProjectileSpeed;
|
||||||
|
/// <summary>
|
||||||
|
/// 投射物实体
|
||||||
|
/// </summary>
|
||||||
|
public readonly string ProjectileEntity;
|
||||||
|
public EntityConfig ProjectileEntity_Ref;
|
||||||
|
/// <summary>
|
||||||
|
/// 伤害数字高度偏移
|
||||||
|
/// </summary>
|
||||||
|
public readonly int DamageTextYOffset;
|
||||||
|
/// <summary>
|
||||||
|
/// 实体生成超时时间
|
||||||
|
/// </summary>
|
||||||
|
public readonly int EntityAsyncTimeout;
|
||||||
|
/// <summary>
|
||||||
|
/// 暴击伤害倍率
|
||||||
|
/// </summary>
|
||||||
|
public readonly float CritMultiplier;
|
||||||
|
/// <summary>
|
||||||
|
/// 敌人碰撞半径
|
||||||
|
/// </summary>
|
||||||
|
public readonly int EnemyBodyRadius;
|
||||||
|
/// <summary>
|
||||||
|
/// 敌人分离迭代次数
|
||||||
|
/// </summary>
|
||||||
|
public readonly int EnemySeparationIterations;
|
||||||
|
|
||||||
public const int __ID__ = -958250779;
|
public const int __ID__ = -958250779;
|
||||||
public override int GetTypeId() => __ID__;
|
public override int GetTypeId() => __ID__;
|
||||||
@@ -35,12 +204,78 @@ public sealed partial class GlobalConfig : Luban.BeanBase
|
|||||||
public void ResolveRef(Tables tables)
|
public void ResolveRef(Tables tables)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
PlayerEntity_Ref = tables.TbEntityConfig.GetOrDefault(PlayerEntity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ProjectileEntity_Ref = tables.TbEntityConfig.GetOrDefault(ProjectileEntity);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return "{ "
|
return "{ "
|
||||||
+ "weaponCapacity:" + WeaponCapacity + ","
|
+ "weaponCapacity:" + WeaponCapacity + ","
|
||||||
|
+ "propMaxCount:" + PropMaxCount + ","
|
||||||
|
+ "playerEntity:" + PlayerEntity + ","
|
||||||
|
+ "absorbSpeed:" + AbsorbSpeed + ","
|
||||||
|
+ "collectDistance:" + CollectDistance + ","
|
||||||
|
+ "defaultAbsorbRange:" + DefaultAbsorbRange + ","
|
||||||
|
+ "weaponRecycleRate:" + WeaponRecycleRate + ","
|
||||||
|
+ "shopGoodsCount:" + ShopGoodsCount + ","
|
||||||
|
+ "shopPriceRandomPercent:" + ShopPriceRandomPercent + ","
|
||||||
|
+ "shopMinPrice:" + ShopMinPrice + ","
|
||||||
|
+ "levelUpRefreshPriceBase:" + LevelUpRefreshPriceBase + ","
|
||||||
|
+ "levelUpRewardCount:" + LevelUpRewardCount + ","
|
||||||
|
+ "spawnEnemyMaxCount:" + SpawnEnemyMaxCount + ","
|
||||||
|
+ "enemySpawnDistanceMin:" + EnemySpawnDistanceMin + ","
|
||||||
|
+ "enemySpawnDistanceMax:" + EnemySpawnDistanceMax + ","
|
||||||
|
+ "weaponRotateSpeed:" + WeaponRotateSpeed + ","
|
||||||
|
+ "weaponBaseCrit:" + WeaponBaseCrit + ","
|
||||||
|
+ "playerGroupName:" + PlayerGroupName + ","
|
||||||
|
+ "enemyGroupName:" + EnemyGroupName + ","
|
||||||
|
+ "projectileGroupName:" + ProjectileGroupName + ","
|
||||||
|
+ "dropGroupName:" + DropGroupName + ","
|
||||||
|
+ "effectGroupNmae:" + EffectGroupNmae + ","
|
||||||
|
+ "minDamage:" + MinDamage + ","
|
||||||
|
+ "maxDodgeRate:" + MaxDodgeRate + ","
|
||||||
|
+ "minSpawnRateScale:" + MinSpawnRateScale + ","
|
||||||
|
+ "projectileLifeTime:" + ProjectileLifeTime + ","
|
||||||
|
+ "projectileHeightOffset:" + ProjectileHeightOffset + ","
|
||||||
|
+ "projectileSpeed:" + ProjectileSpeed + ","
|
||||||
|
+ "projectileEntity:" + ProjectileEntity + ","
|
||||||
|
+ "damageTextYOffset:" + DamageTextYOffset + ","
|
||||||
|
+ "entityAsyncTimeout:" + EntityAsyncTimeout + ","
|
||||||
|
+ "critMultiplier:" + CritMultiplier + ","
|
||||||
|
+ "enemyBodyRadius:" + EnemyBodyRadius + ","
|
||||||
|
+ "enemySeparationIterations:" + EnemySeparationIterations + ","
|
||||||
+ "}";
|
+ "}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,7 @@ public sealed partial class GoodsConfig : Luban.BeanBase
|
|||||||
{
|
{
|
||||||
Id = _buf.ReadInt();
|
Id = _buf.ReadInt();
|
||||||
GoodsType = (GoodsType)_buf.ReadInt();
|
GoodsType = (GoodsType)_buf.ReadInt();
|
||||||
PropId = _buf.ReadInt();
|
RefId = _buf.ReadInt();
|
||||||
PropId_Ref = null;
|
|
||||||
WeaponType = (WeaponType)_buf.ReadInt();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static GoodsConfig DeserializeGoodsConfig(ByteBuf _buf)
|
public static GoodsConfig DeserializeGoodsConfig(ByteBuf _buf)
|
||||||
@@ -37,14 +35,9 @@ public sealed partial class GoodsConfig : Luban.BeanBase
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly GoodsType GoodsType;
|
public readonly GoodsType GoodsType;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 道具商品Id
|
/// 引用Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly int PropId;
|
public readonly int RefId;
|
||||||
public PropConfig PropId_Ref;
|
|
||||||
/// <summary>
|
|
||||||
/// 武器商品类型
|
|
||||||
/// </summary>
|
|
||||||
public readonly WeaponType WeaponType;
|
|
||||||
|
|
||||||
public const int __ID__ = 1358452248;
|
public const int __ID__ = 1358452248;
|
||||||
public override int GetTypeId() => __ID__;
|
public override int GetTypeId() => __ID__;
|
||||||
@@ -53,7 +46,6 @@ public sealed partial class GoodsConfig : Luban.BeanBase
|
|||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
PropId_Ref = tables.TbPropConfig.GetOrDefault(PropId);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,8 +54,7 @@ public sealed partial class GoodsConfig : Luban.BeanBase
|
|||||||
return "{ "
|
return "{ "
|
||||||
+ "id:" + Id + ","
|
+ "id:" + Id + ","
|
||||||
+ "goodsType:" + GoodsType + ","
|
+ "goodsType:" + GoodsType + ","
|
||||||
+ "propId:" + PropId + ","
|
+ "refId:" + RefId + ","
|
||||||
+ "weaponType:" + WeaponType + ","
|
|
||||||
+ "}";
|
+ "}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public sealed partial class LevelConfig : Luban.BeanBase
|
|||||||
public LevelConfig(ByteBuf _buf)
|
public LevelConfig(ByteBuf _buf)
|
||||||
{
|
{
|
||||||
Id = _buf.ReadInt();
|
Id = _buf.ReadInt();
|
||||||
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);EnemySpawnConfigs = new System.Collections.Generic.List<enemySpawnConfig>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { enemySpawnConfig _e0; _e0 = enemySpawnConfig.DeserializeenemySpawnConfig(_buf); EnemySpawnConfigs.Add(_e0);}}
|
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);EnemySpawnConfigs = new System.Collections.Generic.List<EnemySpawnConfig>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { EnemySpawnConfig _e0; _e0 = EnemySpawnConfig.DeserializeEnemySpawnConfig(_buf); EnemySpawnConfigs.Add(_e0);}}
|
||||||
Duration = _buf.ReadInt();
|
Duration = _buf.ReadInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ public sealed partial class LevelConfig : Luban.BeanBase
|
|||||||
/// 关卡id
|
/// 关卡id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly int Id;
|
public readonly int Id;
|
||||||
public readonly System.Collections.Generic.List<enemySpawnConfig> EnemySpawnConfigs;
|
public readonly System.Collections.Generic.List<EnemySpawnConfig> EnemySpawnConfigs;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 关卡时间
|
/// 关卡时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ public sealed partial class LevelDropConfig : Luban.BeanBase
|
|||||||
{
|
{
|
||||||
Id = _buf.ReadInt();
|
Id = _buf.ReadInt();
|
||||||
WhiteWeight = _buf.ReadFloat();
|
WhiteWeight = _buf.ReadFloat();
|
||||||
GreenWeight = _buf.ReadFloat();
|
|
||||||
BlueWeight = _buf.ReadFloat();
|
BlueWeight = _buf.ReadFloat();
|
||||||
PurpleWeight = _buf.ReadFloat();
|
PurpleWeight = _buf.ReadFloat();
|
||||||
RedWeight = _buf.ReadFloat();
|
RedWeight = _buf.ReadFloat();
|
||||||
@@ -38,10 +37,6 @@ public sealed partial class LevelDropConfig : Luban.BeanBase
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly float WhiteWeight;
|
public readonly float WhiteWeight;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 绿色掉落率
|
|
||||||
/// </summary>
|
|
||||||
public readonly float GreenWeight;
|
|
||||||
/// <summary>
|
|
||||||
/// 蓝色掉落率
|
/// 蓝色掉落率
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly float BlueWeight;
|
public readonly float BlueWeight;
|
||||||
@@ -64,7 +59,6 @@ public sealed partial class LevelDropConfig : Luban.BeanBase
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
@@ -72,7 +66,6 @@ public sealed partial class LevelDropConfig : Luban.BeanBase
|
|||||||
return "{ "
|
return "{ "
|
||||||
+ "Id:" + Id + ","
|
+ "Id:" + Id + ","
|
||||||
+ "WhiteWeight:" + WhiteWeight + ","
|
+ "WhiteWeight:" + WhiteWeight + ","
|
||||||
+ "GreenWeight:" + GreenWeight + ","
|
|
||||||
+ "BlueWeight:" + BlueWeight + ","
|
+ "BlueWeight:" + BlueWeight + ","
|
||||||
+ "PurpleWeight:" + PurpleWeight + ","
|
+ "PurpleWeight:" + PurpleWeight + ","
|
||||||
+ "RedWeight:" + RedWeight + ","
|
+ "RedWeight:" + RedWeight + ","
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public sealed partial class LevelUpRewardConfig : Luban.BeanBase
|
|||||||
Id = _buf.ReadInt();
|
Id = _buf.ReadInt();
|
||||||
Title = _buf.ReadString();
|
Title = _buf.ReadString();
|
||||||
Rarity = (Rarity)_buf.ReadInt();
|
Rarity = (Rarity)_buf.ReadInt();
|
||||||
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Modifiers = new System.Collections.Generic.List<modifier>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { modifier _e0; _e0 = modifier.Deserializemodifier(_buf); Modifiers.Add(_e0);}}
|
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);StatModifierConfigs = new System.Collections.Generic.List<StatModifierConfig>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { StatModifierConfig _e0; _e0 = StatModifierConfig.DeserializeStatModifierConfig(_buf); StatModifierConfigs.Add(_e0);}}
|
||||||
Sprite = _buf.ReadString();
|
Sprite = _buf.ReadString();
|
||||||
Sprite_Ref = null;
|
Sprite_Ref = null;
|
||||||
}
|
}
|
||||||
@@ -41,7 +41,7 @@ public sealed partial class LevelUpRewardConfig : Luban.BeanBase
|
|||||||
/// 道具品质
|
/// 道具品质
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly Rarity Rarity;
|
public readonly Rarity Rarity;
|
||||||
public readonly System.Collections.Generic.List<modifier> Modifiers;
|
public readonly System.Collections.Generic.List<StatModifierConfig> StatModifierConfigs;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 图标
|
/// 图标
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -56,7 +56,7 @@ public sealed partial class LevelUpRewardConfig : Luban.BeanBase
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
foreach (var _e in Modifiers) { _e?.ResolveRef(tables); }
|
foreach (var _e in StatModifierConfigs) { _e?.ResolveRef(tables); }
|
||||||
Sprite_Ref = tables.TbSpriteConfig.GetOrDefault(Sprite);
|
Sprite_Ref = tables.TbSpriteConfig.GetOrDefault(Sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ public sealed partial class LevelUpRewardConfig : Luban.BeanBase
|
|||||||
+ "id:" + Id + ","
|
+ "id:" + Id + ","
|
||||||
+ "title:" + Title + ","
|
+ "title:" + Title + ","
|
||||||
+ "rarity:" + Rarity + ","
|
+ "rarity:" + Rarity + ","
|
||||||
+ "modifiers:" + Luban.StringUtil.CollectionToString(Modifiers) + ","
|
+ "statModifierConfigs:" + Luban.StringUtil.CollectionToString(StatModifierConfigs) + ","
|
||||||
+ "sprite:" + Sprite + ","
|
+ "sprite:" + Sprite + ","
|
||||||
+ "}";
|
+ "}";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
namespace SepCore.Definition
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 修饰器类型
|
||||||
|
/// </summary>
|
||||||
|
public enum ModifierType : int
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 无
|
||||||
|
/// </summary>
|
||||||
|
None = 0,
|
||||||
|
/// <summary>
|
||||||
|
/// 固定值
|
||||||
|
/// </summary>
|
||||||
|
Flat = 100,
|
||||||
|
/// <summary>
|
||||||
|
/// 百分比累加
|
||||||
|
/// </summary>
|
||||||
|
PercentAdd = 200,
|
||||||
|
/// <summary>
|
||||||
|
/// 最终百分比独立乘区
|
||||||
|
/// </summary>
|
||||||
|
PercentMult = 300,
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6a95015722b22de41a817f1d17e7d560
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -20,7 +20,7 @@ public sealed partial class PropConfig : Luban.BeanBase
|
|||||||
Name = _buf.ReadString();
|
Name = _buf.ReadString();
|
||||||
Rarity = (Rarity)_buf.ReadInt();
|
Rarity = (Rarity)_buf.ReadInt();
|
||||||
Price = _buf.ReadInt();
|
Price = _buf.ReadInt();
|
||||||
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Modifiers = new System.Collections.Generic.List<modifier>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { modifier _e0; _e0 = modifier.Deserializemodifier(_buf); Modifiers.Add(_e0);}}
|
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);StatModifierConfigs = new System.Collections.Generic.List<StatModifierConfig>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { StatModifierConfig _e0; _e0 = StatModifierConfig.DeserializeStatModifierConfig(_buf); StatModifierConfigs.Add(_e0);}}
|
||||||
Sprite = _buf.ReadString();
|
Sprite = _buf.ReadString();
|
||||||
Sprite_Ref = null;
|
Sprite_Ref = null;
|
||||||
}
|
}
|
||||||
@@ -46,7 +46,7 @@ public sealed partial class PropConfig : Luban.BeanBase
|
|||||||
/// 道具价格
|
/// 道具价格
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly int Price;
|
public readonly int Price;
|
||||||
public readonly System.Collections.Generic.List<modifier> Modifiers;
|
public readonly System.Collections.Generic.List<StatModifierConfig> StatModifierConfigs;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 图标
|
/// 图标
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -62,7 +62,7 @@ public sealed partial class PropConfig : Luban.BeanBase
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
foreach (var _e in Modifiers) { _e?.ResolveRef(tables); }
|
foreach (var _e in StatModifierConfigs) { _e?.ResolveRef(tables); }
|
||||||
Sprite_Ref = tables.TbSpriteConfig.GetOrDefault(Sprite);
|
Sprite_Ref = tables.TbSpriteConfig.GetOrDefault(Sprite);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@ public sealed partial class PropConfig : Luban.BeanBase
|
|||||||
+ "name:" + Name + ","
|
+ "name:" + Name + ","
|
||||||
+ "rarity:" + Rarity + ","
|
+ "rarity:" + Rarity + ","
|
||||||
+ "price:" + Price + ","
|
+ "price:" + Price + ","
|
||||||
+ "modifiers:" + Luban.StringUtil.CollectionToString(Modifiers) + ","
|
+ "statModifierConfigs:" + Luban.StringUtil.CollectionToString(StatModifierConfigs) + ","
|
||||||
+ "sprite:" + Sprite + ","
|
+ "sprite:" + Sprite + ","
|
||||||
+ "}";
|
+ "}";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,21 +25,17 @@ namespace SepCore.Definition
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
White = 1,
|
White = 1,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 绿
|
|
||||||
/// </summary>
|
|
||||||
Green = 2,
|
|
||||||
/// <summary>
|
|
||||||
/// 蓝
|
/// 蓝
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Blue = 3,
|
Blue = 2,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 紫
|
/// 紫
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Purple = 4,
|
Purple = 3,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 红
|
/// 红
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Red = 5,
|
Red = 4,
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public sealed partial class RoleConfig : Luban.BeanBase
|
|||||||
MaxHealth = _buf.ReadInt();
|
MaxHealth = _buf.ReadInt();
|
||||||
Speed = _buf.ReadFloat();
|
Speed = _buf.ReadFloat();
|
||||||
Coin = _buf.ReadInt();
|
Coin = _buf.ReadInt();
|
||||||
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Modifiers = new System.Collections.Generic.List<modifier>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { modifier _e0; _e0 = modifier.Deserializemodifier(_buf); Modifiers.Add(_e0);}}
|
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);StatModifierConfigs = new System.Collections.Generic.List<StatModifierConfig>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { StatModifierConfig _e0; _e0 = StatModifierConfig.DeserializeStatModifierConfig(_buf); StatModifierConfigs.Add(_e0);}}
|
||||||
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);InitialItems = new System.Collections.Generic.List<int>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { int _e0; _e0 = _buf.ReadInt(); InitialItems.Add(_e0);}}
|
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);InitialItems = new System.Collections.Generic.List<int>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { int _e0; _e0 = _buf.ReadInt(); InitialItems.Add(_e0);}}
|
||||||
Prefab = _buf.ReadString();
|
Prefab = _buf.ReadString();
|
||||||
Prefab_Ref = null;
|
Prefab_Ref = null;
|
||||||
@@ -38,9 +38,9 @@ public sealed partial class RoleConfig : Luban.BeanBase
|
|||||||
public readonly float Speed;
|
public readonly float Speed;
|
||||||
public readonly int Coin;
|
public readonly int Coin;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// key
|
/// statType
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly System.Collections.Generic.List<modifier> Modifiers;
|
public readonly System.Collections.Generic.List<StatModifierConfig> StatModifierConfigs;
|
||||||
public readonly System.Collections.Generic.List<int> InitialItems;
|
public readonly System.Collections.Generic.List<int> InitialItems;
|
||||||
public readonly string Prefab;
|
public readonly string Prefab;
|
||||||
public EntityConfig Prefab_Ref;
|
public EntityConfig Prefab_Ref;
|
||||||
@@ -56,7 +56,7 @@ public sealed partial class RoleConfig : Luban.BeanBase
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
foreach (var _e in Modifiers) { _e?.ResolveRef(tables); }
|
foreach (var _e in StatModifierConfigs) { _e?.ResolveRef(tables); }
|
||||||
|
|
||||||
Prefab_Ref = tables.TbEntityConfig.GetOrDefault(Prefab);
|
Prefab_Ref = tables.TbEntityConfig.GetOrDefault(Prefab);
|
||||||
Sprite_Ref = tables.TbSpriteConfig.GetOrDefault(Sprite);
|
Sprite_Ref = tables.TbSpriteConfig.GetOrDefault(Sprite);
|
||||||
@@ -69,7 +69,7 @@ public sealed partial class RoleConfig : Luban.BeanBase
|
|||||||
+ "maxHealth:" + MaxHealth + ","
|
+ "maxHealth:" + MaxHealth + ","
|
||||||
+ "speed:" + Speed + ","
|
+ "speed:" + Speed + ","
|
||||||
+ "coin:" + Coin + ","
|
+ "coin:" + Coin + ","
|
||||||
+ "modifiers:" + Luban.StringUtil.CollectionToString(Modifiers) + ","
|
+ "statModifierConfigs:" + Luban.StringUtil.CollectionToString(StatModifierConfigs) + ","
|
||||||
+ "initialItems:" + Luban.StringUtil.CollectionToString(InitialItems) + ","
|
+ "initialItems:" + Luban.StringUtil.CollectionToString(InitialItems) + ","
|
||||||
+ "prefab:" + Prefab + ","
|
+ "prefab:" + Prefab + ","
|
||||||
+ "sprite:" + Sprite + ","
|
+ "sprite:" + Sprite + ","
|
||||||
|
|||||||
@@ -0,0 +1,97 @@
|
|||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
using Luban;
|
||||||
|
|
||||||
|
|
||||||
|
namespace SepCore.Definition
|
||||||
|
{
|
||||||
|
public sealed partial class StatConfig : Luban.BeanBase
|
||||||
|
{
|
||||||
|
public StatConfig(ByteBuf _buf)
|
||||||
|
{
|
||||||
|
StatType = (StatType)_buf.ReadInt();
|
||||||
|
Name = _buf.ReadString();
|
||||||
|
DefaultBaseValue = _buf.ReadFloat();
|
||||||
|
HasMin = _buf.ReadBool();
|
||||||
|
MinValue = _buf.ReadFloat();
|
||||||
|
HasMax = _buf.ReadBool();
|
||||||
|
MaxValue = _buf.ReadFloat();
|
||||||
|
IsPercentDisplay = _buf.ReadBool();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static StatConfig DeserializeStatConfig(ByteBuf _buf)
|
||||||
|
{
|
||||||
|
return new StatConfig(_buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 属性类型
|
||||||
|
/// </summary>
|
||||||
|
public readonly StatType StatType;
|
||||||
|
/// <summary>
|
||||||
|
/// 名称
|
||||||
|
/// </summary>
|
||||||
|
public readonly string Name;
|
||||||
|
/// <summary>
|
||||||
|
/// 默认值
|
||||||
|
/// </summary>
|
||||||
|
public readonly float DefaultBaseValue;
|
||||||
|
/// <summary>
|
||||||
|
/// 是否有最小值
|
||||||
|
/// </summary>
|
||||||
|
public readonly bool HasMin;
|
||||||
|
/// <summary>
|
||||||
|
/// 最小值
|
||||||
|
/// </summary>
|
||||||
|
public readonly float MinValue;
|
||||||
|
/// <summary>
|
||||||
|
/// 是否有最大值
|
||||||
|
/// </summary>
|
||||||
|
public readonly bool HasMax;
|
||||||
|
/// <summary>
|
||||||
|
/// 最大值
|
||||||
|
/// </summary>
|
||||||
|
public readonly float MaxValue;
|
||||||
|
/// <summary>
|
||||||
|
/// UI 文本是否百分比
|
||||||
|
/// </summary>
|
||||||
|
public readonly bool IsPercentDisplay;
|
||||||
|
|
||||||
|
public const int __ID__ = 807092950;
|
||||||
|
public override int GetTypeId() => __ID__;
|
||||||
|
|
||||||
|
public void ResolveRef(Tables tables)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return "{ "
|
||||||
|
+ "statType:" + StatType + ","
|
||||||
|
+ "name:" + Name + ","
|
||||||
|
+ "defaultBaseValue:" + DefaultBaseValue + ","
|
||||||
|
+ "hasMin:" + HasMin + ","
|
||||||
|
+ "minValue:" + MinValue + ","
|
||||||
|
+ "hasMax:" + HasMax + ","
|
||||||
|
+ "maxValue:" + MaxValue + ","
|
||||||
|
+ "isPercentDisplay:" + IsPercentDisplay + ","
|
||||||
|
+ "}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2dfe101008e1ded4ea35681a5a656d2f
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
+14
-14
@@ -15,34 +15,34 @@ namespace SepCore.Definition
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 修饰器
|
/// 修饰器
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed partial class modifier : Luban.BeanBase
|
public sealed partial class StatModifierConfig : Luban.BeanBase
|
||||||
{
|
{
|
||||||
public modifier(ByteBuf _buf)
|
public StatModifierConfig(ByteBuf _buf)
|
||||||
{
|
{
|
||||||
Key = (StatType)_buf.ReadInt();
|
StatType = (StatType)_buf.ReadInt();
|
||||||
Value = _buf.ReadInt();
|
Value = _buf.ReadFloat();
|
||||||
IsPercent = _buf.ReadBool();
|
ModifierType = (ModifierType)_buf.ReadInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static modifier Deserializemodifier(ByteBuf _buf)
|
public static StatModifierConfig DeserializeStatModifierConfig(ByteBuf _buf)
|
||||||
{
|
{
|
||||||
return new modifier(_buf);
|
return new StatModifierConfig(_buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 属性类型
|
/// 属性类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly StatType Key;
|
public readonly StatType StatType;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 值
|
/// 值
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly int Value;
|
public readonly float Value;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否为百分比
|
/// 修饰器类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly bool IsPercent;
|
public readonly ModifierType ModifierType;
|
||||||
|
|
||||||
public const int __ID__ = -615513385;
|
public const int __ID__ = 235118733;
|
||||||
public override int GetTypeId() => __ID__;
|
public override int GetTypeId() => __ID__;
|
||||||
|
|
||||||
public void ResolveRef(Tables tables)
|
public void ResolveRef(Tables tables)
|
||||||
@@ -55,9 +55,9 @@ public sealed partial class modifier : Luban.BeanBase
|
|||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return "{ "
|
return "{ "
|
||||||
+ "key:" + Key + ","
|
+ "statType:" + StatType + ","
|
||||||
+ "value:" + Value + ","
|
+ "value:" + Value + ","
|
||||||
+ "isPercent:" + IsPercent + ","
|
+ "modifierType:" + ModifierType + ","
|
||||||
+ "}";
|
+ "}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -23,39 +23,67 @@ namespace SepCore.Definition
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 最大生命
|
/// 最大生命
|
||||||
/// </summary>
|
/// </summary>
|
||||||
MaxHealth = 1,
|
MaxHp = 1,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 移动速度
|
/// 生命恢复
|
||||||
/// </summary>
|
/// </summary>
|
||||||
MovementSpeed = 2,
|
HpRegen = 2,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 攻击力
|
/// 生命窃取
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Attack = 3,
|
LifeSteal = 3,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 防御力
|
/// 伤害
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Defense = 4,
|
DamagePercent = 4,
|
||||||
|
/// <summary>
|
||||||
|
/// 近战伤害
|
||||||
|
/// </summary>
|
||||||
|
MeleeDamage = 5,
|
||||||
|
/// <summary>
|
||||||
|
/// 远程伤害
|
||||||
|
/// </summary>
|
||||||
|
RangedDamage = 6,
|
||||||
|
/// <summary>
|
||||||
|
/// 元素伤害
|
||||||
|
/// </summary>
|
||||||
|
ElementalDamage = 7,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 攻击速度
|
/// 攻击速度
|
||||||
/// </summary>
|
/// </summary>
|
||||||
AttackSpeed = 5,
|
AttackSpeed = 8,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 暴击率
|
/// 暴击率
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Critical = 6,
|
CritChance = 9,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 暴击伤害
|
/// 工程学
|
||||||
/// </summary>
|
/// </summary>
|
||||||
CriticalDamage = 7,
|
Engineering = 10,
|
||||||
|
/// <summary>
|
||||||
|
/// 攻击范围
|
||||||
|
/// </summary>
|
||||||
|
Range = 11,
|
||||||
|
/// <summary>
|
||||||
|
/// 护甲
|
||||||
|
/// </summary>
|
||||||
|
Armor = 12,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 闪避率
|
/// 闪避率
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Dodge = 8,
|
Dodge = 13,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 自动吸收范围
|
/// 移动速度
|
||||||
/// </summary>
|
/// </summary>
|
||||||
AbsorbRange = 9,
|
MoveSpeed = 14,
|
||||||
|
/// <summary>
|
||||||
|
/// 收获
|
||||||
|
/// </summary>
|
||||||
|
Harvesting = 15,
|
||||||
|
/// <summary>
|
||||||
|
/// 幸运
|
||||||
|
/// </summary>
|
||||||
|
Luck = 16,
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ public partial class Tables
|
|||||||
/// 实体配置
|
/// 实体配置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public TbEntityConfig TbEntityConfig {get; }
|
public TbEntityConfig TbEntityConfig {get; }
|
||||||
|
public TbFormatText TbFormatText {get; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 全局零散配置(单例)
|
/// 全局零散配置(单例)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -60,11 +61,17 @@ public partial class Tables
|
|||||||
/// 界面配置
|
/// 界面配置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public TbWeaponConfig TbWeaponConfig {get; }
|
public TbWeaponConfig TbWeaponConfig {get; }
|
||||||
|
/// <summary>
|
||||||
|
/// 角色属性配置
|
||||||
|
/// </summary>
|
||||||
|
public TbStatConfig TbStatConfig {get; }
|
||||||
|
public TbWeaponTagConfig TbWeaponTagConfig {get; }
|
||||||
|
|
||||||
public Tables(System.Func<string, ByteBuf> loader)
|
public Tables(System.Func<string, ByteBuf> loader)
|
||||||
{
|
{
|
||||||
TbEnemyConfig = new TbEnemyConfig(loader("tbenemyconfig"));
|
TbEnemyConfig = new TbEnemyConfig(loader("tbenemyconfig"));
|
||||||
TbEntityConfig = new TbEntityConfig(loader("tbentityconfig"));
|
TbEntityConfig = new TbEntityConfig(loader("tbentityconfig"));
|
||||||
|
TbFormatText = new TbFormatText(loader("tbformattext"));
|
||||||
TbGlobalConfig = new TbGlobalConfig(loader("tbglobalconfig"));
|
TbGlobalConfig = new TbGlobalConfig(loader("tbglobalconfig"));
|
||||||
TbGoodsConfig = new TbGoodsConfig(loader("tbgoodsconfig"));
|
TbGoodsConfig = new TbGoodsConfig(loader("tbgoodsconfig"));
|
||||||
TbLevelConfig = new TbLevelConfig(loader("tblevelconfig"));
|
TbLevelConfig = new TbLevelConfig(loader("tblevelconfig"));
|
||||||
@@ -80,6 +87,8 @@ public partial class Tables
|
|||||||
TbUIFormConfig = new TbUIFormConfig(loader("tbuiformconfig"));
|
TbUIFormConfig = new TbUIFormConfig(loader("tbuiformconfig"));
|
||||||
TbUISoundConfig = new TbUISoundConfig(loader("tbuisoundconfig"));
|
TbUISoundConfig = new TbUISoundConfig(loader("tbuisoundconfig"));
|
||||||
TbWeaponConfig = new TbWeaponConfig(loader("tbweaponconfig"));
|
TbWeaponConfig = new TbWeaponConfig(loader("tbweaponconfig"));
|
||||||
|
TbStatConfig = new TbStatConfig(loader("tbstatconfig"));
|
||||||
|
TbWeaponTagConfig = new TbWeaponTagConfig(loader("tbweapontagconfig"));
|
||||||
ResolveRef();
|
ResolveRef();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -87,6 +96,7 @@ public partial class Tables
|
|||||||
{
|
{
|
||||||
TbEnemyConfig.ResolveRef(this);
|
TbEnemyConfig.ResolveRef(this);
|
||||||
TbEntityConfig.ResolveRef(this);
|
TbEntityConfig.ResolveRef(this);
|
||||||
|
TbFormatText.ResolveRef(this);
|
||||||
TbGlobalConfig.ResolveRef(this);
|
TbGlobalConfig.ResolveRef(this);
|
||||||
TbGoodsConfig.ResolveRef(this);
|
TbGoodsConfig.ResolveRef(this);
|
||||||
TbLevelConfig.ResolveRef(this);
|
TbLevelConfig.ResolveRef(this);
|
||||||
@@ -102,6 +112,8 @@ public partial class Tables
|
|||||||
TbUIFormConfig.ResolveRef(this);
|
TbUIFormConfig.ResolveRef(this);
|
||||||
TbUISoundConfig.ResolveRef(this);
|
TbUISoundConfig.ResolveRef(this);
|
||||||
TbWeaponConfig.ResolveRef(this);
|
TbWeaponConfig.ResolveRef(this);
|
||||||
|
TbStatConfig.ResolveRef(this);
|
||||||
|
TbWeaponTagConfig.ResolveRef(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
using Luban;
|
||||||
|
|
||||||
|
|
||||||
|
namespace SepCore.Definition
|
||||||
|
{
|
||||||
|
public partial class TbFormatText
|
||||||
|
{
|
||||||
|
private readonly System.Collections.Generic.Dictionary<string, FormatText> _dataMap;
|
||||||
|
private readonly System.Collections.Generic.List<FormatText> _dataList;
|
||||||
|
|
||||||
|
public TbFormatText(ByteBuf _buf)
|
||||||
|
{
|
||||||
|
_dataMap = new System.Collections.Generic.Dictionary<string, FormatText>();
|
||||||
|
_dataList = new System.Collections.Generic.List<FormatText>();
|
||||||
|
|
||||||
|
for(int n = _buf.ReadSize() ; n > 0 ; --n)
|
||||||
|
{
|
||||||
|
FormatText _v;
|
||||||
|
_v = FormatText.DeserializeFormatText(_buf);
|
||||||
|
_dataList.Add(_v);
|
||||||
|
_dataMap.Add(_v.Name, _v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public System.Collections.Generic.Dictionary<string, FormatText> DataMap => _dataMap;
|
||||||
|
public System.Collections.Generic.List<FormatText> DataList => _dataList;
|
||||||
|
|
||||||
|
public FormatText GetOrDefault(string key) => _dataMap.TryGetValue(key, out var v) ? v : null;
|
||||||
|
public FormatText Get(string key) => _dataMap[key];
|
||||||
|
public FormatText this[string key] => _dataMap[key];
|
||||||
|
|
||||||
|
public void ResolveRef(Tables tables)
|
||||||
|
{
|
||||||
|
foreach(var _v in _dataList)
|
||||||
|
{
|
||||||
|
_v.ResolveRef(tables);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8574165ef5ddc674fb6c69eaab38a63e
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -34,6 +34,138 @@ public partial class TbGlobalConfig
|
|||||||
/// 最大持有武器数量
|
/// 最大持有武器数量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int WeaponCapacity => _data.WeaponCapacity;
|
public int WeaponCapacity => _data.WeaponCapacity;
|
||||||
|
/// <summary>
|
||||||
|
/// 最大持有道具数量
|
||||||
|
/// </summary>
|
||||||
|
public int PropMaxCount => _data.PropMaxCount;
|
||||||
|
/// <summary>
|
||||||
|
/// 玩家实体
|
||||||
|
/// </summary>
|
||||||
|
public string PlayerEntity => _data.PlayerEntity;
|
||||||
|
/// <summary>
|
||||||
|
/// 自动收集速度
|
||||||
|
/// </summary>
|
||||||
|
public float AbsorbSpeed => _data.AbsorbSpeed;
|
||||||
|
/// <summary>
|
||||||
|
/// 自动收集距离
|
||||||
|
/// </summary>
|
||||||
|
public float CollectDistance => _data.CollectDistance;
|
||||||
|
/// <summary>
|
||||||
|
/// 默认吸收距离
|
||||||
|
/// </summary>
|
||||||
|
public float DefaultAbsorbRange => _data.DefaultAbsorbRange;
|
||||||
|
/// <summary>
|
||||||
|
/// 武器回收价比例
|
||||||
|
/// </summary>
|
||||||
|
public float WeaponRecycleRate => _data.WeaponRecycleRate;
|
||||||
|
/// <summary>
|
||||||
|
/// 商店商品数量
|
||||||
|
/// </summary>
|
||||||
|
public int ShopGoodsCount => _data.ShopGoodsCount;
|
||||||
|
/// <summary>
|
||||||
|
/// 商品价格浮动
|
||||||
|
/// </summary>
|
||||||
|
public float ShopPriceRandomPercent => _data.ShopPriceRandomPercent;
|
||||||
|
/// <summary>
|
||||||
|
/// 商品最低价
|
||||||
|
/// </summary>
|
||||||
|
public int ShopMinPrice => _data.ShopMinPrice;
|
||||||
|
/// <summary>
|
||||||
|
/// 升级奖励刷新基本价格
|
||||||
|
/// </summary>
|
||||||
|
public int LevelUpRefreshPriceBase => _data.LevelUpRefreshPriceBase;
|
||||||
|
/// <summary>
|
||||||
|
/// 升级奖励候选数
|
||||||
|
/// </summary>
|
||||||
|
public int LevelUpRewardCount => _data.LevelUpRewardCount;
|
||||||
|
/// <summary>
|
||||||
|
/// 最大敌人数量
|
||||||
|
/// </summary>
|
||||||
|
public int SpawnEnemyMaxCount => _data.SpawnEnemyMaxCount;
|
||||||
|
/// <summary>
|
||||||
|
/// 敌人生成最小距离
|
||||||
|
/// </summary>
|
||||||
|
public float EnemySpawnDistanceMin => _data.EnemySpawnDistanceMin;
|
||||||
|
/// <summary>
|
||||||
|
/// 敌人生成最大距离
|
||||||
|
/// </summary>
|
||||||
|
public float EnemySpawnDistanceMax => _data.EnemySpawnDistanceMax;
|
||||||
|
/// <summary>
|
||||||
|
/// 武器旋转速度
|
||||||
|
/// </summary>
|
||||||
|
public float WeaponRotateSpeed => _data.WeaponRotateSpeed;
|
||||||
|
/// <summary>
|
||||||
|
/// 武器基本暴击率
|
||||||
|
/// </summary>
|
||||||
|
public float WeaponBaseCrit => _data.WeaponBaseCrit;
|
||||||
|
/// <summary>
|
||||||
|
/// 玩家对象组名
|
||||||
|
/// </summary>
|
||||||
|
public string PlayerGroupName => _data.PlayerGroupName;
|
||||||
|
/// <summary>
|
||||||
|
/// 敌人对象组名
|
||||||
|
/// </summary>
|
||||||
|
public string EnemyGroupName => _data.EnemyGroupName;
|
||||||
|
/// <summary>
|
||||||
|
/// 投射物对象组名
|
||||||
|
/// </summary>
|
||||||
|
public string ProjectileGroupName => _data.ProjectileGroupName;
|
||||||
|
/// <summary>
|
||||||
|
/// 掉落物对象组名
|
||||||
|
/// </summary>
|
||||||
|
public string DropGroupName => _data.DropGroupName;
|
||||||
|
/// <summary>
|
||||||
|
/// 特效对象组名
|
||||||
|
/// </summary>
|
||||||
|
public string EffectGroupNmae => _data.EffectGroupNmae;
|
||||||
|
/// <summary>
|
||||||
|
/// 最小伤害
|
||||||
|
/// </summary>
|
||||||
|
public int MinDamage => _data.MinDamage;
|
||||||
|
/// <summary>
|
||||||
|
/// 闪避率上限
|
||||||
|
/// </summary>
|
||||||
|
public int MaxDodgeRate => _data.MaxDodgeRate;
|
||||||
|
/// <summary>
|
||||||
|
/// 最小刷怪速度倍数
|
||||||
|
/// </summary>
|
||||||
|
public int MinSpawnRateScale => _data.MinSpawnRateScale;
|
||||||
|
/// <summary>
|
||||||
|
/// 投射物生命周期
|
||||||
|
/// </summary>
|
||||||
|
public int ProjectileLifeTime => _data.ProjectileLifeTime;
|
||||||
|
/// <summary>
|
||||||
|
/// 投射物生成高度
|
||||||
|
/// </summary>
|
||||||
|
public int ProjectileHeightOffset => _data.ProjectileHeightOffset;
|
||||||
|
/// <summary>
|
||||||
|
/// 投射物移动速度
|
||||||
|
/// </summary>
|
||||||
|
public int ProjectileSpeed => _data.ProjectileSpeed;
|
||||||
|
/// <summary>
|
||||||
|
/// 投射物实体
|
||||||
|
/// </summary>
|
||||||
|
public string ProjectileEntity => _data.ProjectileEntity;
|
||||||
|
/// <summary>
|
||||||
|
/// 伤害数字高度偏移
|
||||||
|
/// </summary>
|
||||||
|
public int DamageTextYOffset => _data.DamageTextYOffset;
|
||||||
|
/// <summary>
|
||||||
|
/// 实体生成超时时间
|
||||||
|
/// </summary>
|
||||||
|
public int EntityAsyncTimeout => _data.EntityAsyncTimeout;
|
||||||
|
/// <summary>
|
||||||
|
/// 暴击伤害倍率
|
||||||
|
/// </summary>
|
||||||
|
public float CritMultiplier => _data.CritMultiplier;
|
||||||
|
/// <summary>
|
||||||
|
/// 敌人碰撞半径
|
||||||
|
/// </summary>
|
||||||
|
public int EnemyBodyRadius => _data.EnemyBodyRadius;
|
||||||
|
/// <summary>
|
||||||
|
/// 敌人分离迭代次数
|
||||||
|
/// </summary>
|
||||||
|
public int EnemySeparationIterations => _data.EnemySeparationIterations;
|
||||||
|
|
||||||
public void ResolveRef(Tables tables)
|
public void ResolveRef(Tables tables)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
using Luban;
|
||||||
|
|
||||||
|
|
||||||
|
namespace SepCore.Definition
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 角色属性配置
|
||||||
|
/// </summary>
|
||||||
|
public partial class TbStatConfig
|
||||||
|
{
|
||||||
|
private readonly System.Collections.Generic.Dictionary<StatType, StatConfig> _dataMap;
|
||||||
|
private readonly System.Collections.Generic.List<StatConfig> _dataList;
|
||||||
|
|
||||||
|
public TbStatConfig(ByteBuf _buf)
|
||||||
|
{
|
||||||
|
_dataMap = new System.Collections.Generic.Dictionary<StatType, StatConfig>();
|
||||||
|
_dataList = new System.Collections.Generic.List<StatConfig>();
|
||||||
|
|
||||||
|
for(int n = _buf.ReadSize() ; n > 0 ; --n)
|
||||||
|
{
|
||||||
|
StatConfig _v;
|
||||||
|
_v = StatConfig.DeserializeStatConfig(_buf);
|
||||||
|
_dataList.Add(_v);
|
||||||
|
_dataMap.Add(_v.StatType, _v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public System.Collections.Generic.Dictionary<StatType, StatConfig> DataMap => _dataMap;
|
||||||
|
public System.Collections.Generic.List<StatConfig> DataList => _dataList;
|
||||||
|
|
||||||
|
public StatConfig GetOrDefault(StatType key) => _dataMap.TryGetValue(key, out var v) ? v : null;
|
||||||
|
public StatConfig Get(StatType key) => _dataMap[key];
|
||||||
|
public StatConfig this[StatType key] => _dataMap[key];
|
||||||
|
|
||||||
|
public void ResolveRef(Tables tables)
|
||||||
|
{
|
||||||
|
foreach(var _v in _dataList)
|
||||||
|
{
|
||||||
|
_v.ResolveRef(tables);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 54c58e47ce828d246ae57a00a9704563
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -17,12 +17,12 @@ namespace SepCore.Definition
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class TbWeaponConfig
|
public partial class TbWeaponConfig
|
||||||
{
|
{
|
||||||
private readonly System.Collections.Generic.Dictionary<WeaponType, WeaponConfig> _dataMap;
|
private readonly System.Collections.Generic.Dictionary<int, WeaponConfig> _dataMap;
|
||||||
private readonly System.Collections.Generic.List<WeaponConfig> _dataList;
|
private readonly System.Collections.Generic.List<WeaponConfig> _dataList;
|
||||||
|
|
||||||
public TbWeaponConfig(ByteBuf _buf)
|
public TbWeaponConfig(ByteBuf _buf)
|
||||||
{
|
{
|
||||||
_dataMap = new System.Collections.Generic.Dictionary<WeaponType, WeaponConfig>();
|
_dataMap = new System.Collections.Generic.Dictionary<int, WeaponConfig>();
|
||||||
_dataList = new System.Collections.Generic.List<WeaponConfig>();
|
_dataList = new System.Collections.Generic.List<WeaponConfig>();
|
||||||
|
|
||||||
for(int n = _buf.ReadSize() ; n > 0 ; --n)
|
for(int n = _buf.ReadSize() ; n > 0 ; --n)
|
||||||
@@ -30,16 +30,16 @@ public partial class TbWeaponConfig
|
|||||||
WeaponConfig _v;
|
WeaponConfig _v;
|
||||||
_v = WeaponConfig.DeserializeWeaponConfig(_buf);
|
_v = WeaponConfig.DeserializeWeaponConfig(_buf);
|
||||||
_dataList.Add(_v);
|
_dataList.Add(_v);
|
||||||
_dataMap.Add(_v.WeaponType, _v);
|
_dataMap.Add(_v.Id, _v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public System.Collections.Generic.Dictionary<WeaponType, WeaponConfig> DataMap => _dataMap;
|
public System.Collections.Generic.Dictionary<int, WeaponConfig> DataMap => _dataMap;
|
||||||
public System.Collections.Generic.List<WeaponConfig> DataList => _dataList;
|
public System.Collections.Generic.List<WeaponConfig> DataList => _dataList;
|
||||||
|
|
||||||
public WeaponConfig GetOrDefault(WeaponType key) => _dataMap.TryGetValue(key, out var v) ? v : null;
|
public WeaponConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
|
||||||
public WeaponConfig Get(WeaponType key) => _dataMap[key];
|
public WeaponConfig Get(int key) => _dataMap[key];
|
||||||
public WeaponConfig this[WeaponType key] => _dataMap[key];
|
public WeaponConfig this[int key] => _dataMap[key];
|
||||||
|
|
||||||
public void ResolveRef(Tables tables)
|
public void ResolveRef(Tables tables)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
using Luban;
|
||||||
|
|
||||||
|
|
||||||
|
namespace SepCore.Definition
|
||||||
|
{
|
||||||
|
public partial class TbWeaponTagConfig
|
||||||
|
{
|
||||||
|
private readonly System.Collections.Generic.Dictionary<int, WeaponTagConfig> _dataMap;
|
||||||
|
private readonly System.Collections.Generic.List<WeaponTagConfig> _dataList;
|
||||||
|
|
||||||
|
public TbWeaponTagConfig(ByteBuf _buf)
|
||||||
|
{
|
||||||
|
_dataMap = new System.Collections.Generic.Dictionary<int, WeaponTagConfig>();
|
||||||
|
_dataList = new System.Collections.Generic.List<WeaponTagConfig>();
|
||||||
|
|
||||||
|
for(int n = _buf.ReadSize() ; n > 0 ; --n)
|
||||||
|
{
|
||||||
|
WeaponTagConfig _v;
|
||||||
|
_v = WeaponTagConfig.DeserializeWeaponTagConfig(_buf);
|
||||||
|
_dataList.Add(_v);
|
||||||
|
_dataMap.Add(_v.Id, _v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public System.Collections.Generic.Dictionary<int, WeaponTagConfig> DataMap => _dataMap;
|
||||||
|
public System.Collections.Generic.List<WeaponTagConfig> DataList => _dataList;
|
||||||
|
|
||||||
|
public WeaponTagConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
|
||||||
|
public WeaponTagConfig Get(int key) => _dataMap[key];
|
||||||
|
public WeaponTagConfig this[int key] => _dataMap[key];
|
||||||
|
|
||||||
|
public void ResolveRef(Tables tables)
|
||||||
|
{
|
||||||
|
foreach(var _v in _dataList)
|
||||||
|
{
|
||||||
|
_v.ResolveRef(tables);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2628c2be656a6c348a98ca6e01db6dde
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -16,16 +16,22 @@ public sealed partial class WeaponConfig : Luban.BeanBase
|
|||||||
{
|
{
|
||||||
public WeaponConfig(ByteBuf _buf)
|
public WeaponConfig(ByteBuf _buf)
|
||||||
{
|
{
|
||||||
|
Id = _buf.ReadInt();
|
||||||
WeaponType = (WeaponType)_buf.ReadInt();
|
WeaponType = (WeaponType)_buf.ReadInt();
|
||||||
|
WeaponName = _buf.ReadString();
|
||||||
|
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Tags = new System.Collections.Generic.List<WeaponTag>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { WeaponTag _e0; _e0 = (WeaponTag)_buf.ReadInt(); Tags.Add(_e0);}}
|
||||||
LogicType = _buf.ReadString();
|
LogicType = _buf.ReadString();
|
||||||
|
ScalingStat = (StatType)_buf.ReadInt();
|
||||||
|
ScalingRatio = _buf.ReadFloat();
|
||||||
Rarity = (Rarity)_buf.ReadInt();
|
Rarity = (Rarity)_buf.ReadInt();
|
||||||
Price = _buf.ReadInt();
|
Price = _buf.ReadInt();
|
||||||
Attack = _buf.ReadInt();
|
Attack = _buf.ReadInt();
|
||||||
Cooldown = _buf.ReadInt();
|
Cooldown = _buf.ReadFloat();
|
||||||
AttackRange = _buf.ReadInt();
|
DamageType = (DamageType)_buf.ReadInt();
|
||||||
|
AttackRange = _buf.ReadFloat();
|
||||||
AttackSoundId = _buf.ReadInt();
|
AttackSoundId = _buf.ReadInt();
|
||||||
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Parameters = new System.Collections.Generic.Dictionary<ParamType, int>(n0 * 3 / 2);for(var i0 = 0 ; i0 < n0 ; i0++) { ParamType _k0; _k0 = (ParamType)_buf.ReadInt(); int _v0; _v0 = _buf.ReadInt(); Parameters.Add(_k0, _v0);}}
|
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Parameters = new System.Collections.Generic.Dictionary<ParamType, float>(n0 * 3 / 2);for(var i0 = 0 ; i0 < n0 ; i0++) { ParamType _k0; _k0 = (ParamType)_buf.ReadInt(); float _v0; _v0 = _buf.ReadFloat(); Parameters.Add(_k0, _v0);}}
|
||||||
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Modifiers = new System.Collections.Generic.List<modifier>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { modifier _e0; _e0 = modifier.Deserializemodifier(_buf); Modifiers.Add(_e0);}}
|
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);StatModifierConfigs = new System.Collections.Generic.List<StatModifierConfig>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { StatModifierConfig _e0; _e0 = StatModifierConfig.DeserializeStatModifierConfig(_buf); StatModifierConfigs.Add(_e0);}}
|
||||||
Prefab = _buf.ReadString();
|
Prefab = _buf.ReadString();
|
||||||
Prefab_Ref = null;
|
Prefab_Ref = null;
|
||||||
Sprite = _buf.ReadString();
|
Sprite = _buf.ReadString();
|
||||||
@@ -37,15 +43,35 @@ public sealed partial class WeaponConfig : Luban.BeanBase
|
|||||||
return new WeaponConfig(_buf);
|
return new WeaponConfig(_buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 武器编号
|
||||||
|
/// </summary>
|
||||||
|
public readonly int Id;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 武器类型
|
/// 武器类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly WeaponType WeaponType;
|
public readonly WeaponType WeaponType;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// 武器名
|
||||||
|
/// </summary>
|
||||||
|
public readonly string WeaponName;
|
||||||
|
/// <summary>
|
||||||
|
/// 武器标签列表
|
||||||
|
/// </summary>
|
||||||
|
public readonly System.Collections.Generic.List<WeaponTag> Tags;
|
||||||
|
/// <summary>
|
||||||
/// 逻辑类型
|
/// 逻辑类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly string LogicType;
|
public readonly string LogicType;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// 加成主属性
|
||||||
|
/// </summary>
|
||||||
|
public readonly StatType ScalingStat;
|
||||||
|
/// <summary>
|
||||||
|
/// 主属性加成系数
|
||||||
|
/// </summary>
|
||||||
|
public readonly float ScalingRatio;
|
||||||
|
/// <summary>
|
||||||
/// 道具品质
|
/// 道具品质
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly Rarity Rarity;
|
public readonly Rarity Rarity;
|
||||||
@@ -60,11 +86,15 @@ public sealed partial class WeaponConfig : Luban.BeanBase
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 冷却
|
/// 冷却
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly int Cooldown;
|
public readonly float Cooldown;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 范围
|
/// 伤害类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly int AttackRange;
|
public readonly DamageType DamageType;
|
||||||
|
/// <summary>
|
||||||
|
/// 攻击范围
|
||||||
|
/// </summary>
|
||||||
|
public readonly float AttackRange;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 攻击音效编号
|
/// 攻击音效编号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -72,8 +102,8 @@ public sealed partial class WeaponConfig : Luban.BeanBase
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 参数类型
|
/// 参数类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly System.Collections.Generic.Dictionary<ParamType, int> Parameters;
|
public readonly System.Collections.Generic.Dictionary<ParamType, float> Parameters;
|
||||||
public readonly System.Collections.Generic.List<modifier> Modifiers;
|
public readonly System.Collections.Generic.List<StatModifierConfig> StatModifierConfigs;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 预制体
|
/// 预制体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -99,7 +129,13 @@ public sealed partial class WeaponConfig : Luban.BeanBase
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
foreach (var _e in Modifiers) { _e?.ResolveRef(tables); }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
foreach (var _e in StatModifierConfigs) { _e?.ResolveRef(tables); }
|
||||||
Prefab_Ref = tables.TbEntityConfig.GetOrDefault(Prefab);
|
Prefab_Ref = tables.TbEntityConfig.GetOrDefault(Prefab);
|
||||||
Sprite_Ref = tables.TbSpriteConfig.GetOrDefault(Sprite);
|
Sprite_Ref = tables.TbSpriteConfig.GetOrDefault(Sprite);
|
||||||
}
|
}
|
||||||
@@ -107,16 +143,22 @@ public sealed partial class WeaponConfig : Luban.BeanBase
|
|||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return "{ "
|
return "{ "
|
||||||
|
+ "id:" + Id + ","
|
||||||
+ "weaponType:" + WeaponType + ","
|
+ "weaponType:" + WeaponType + ","
|
||||||
|
+ "weaponName:" + WeaponName + ","
|
||||||
|
+ "tags:" + Luban.StringUtil.CollectionToString(Tags) + ","
|
||||||
+ "logicType:" + LogicType + ","
|
+ "logicType:" + LogicType + ","
|
||||||
|
+ "scalingStat:" + ScalingStat + ","
|
||||||
|
+ "scalingRatio:" + ScalingRatio + ","
|
||||||
+ "rarity:" + Rarity + ","
|
+ "rarity:" + Rarity + ","
|
||||||
+ "price:" + Price + ","
|
+ "price:" + Price + ","
|
||||||
+ "attack:" + Attack + ","
|
+ "attack:" + Attack + ","
|
||||||
+ "cooldown:" + Cooldown + ","
|
+ "cooldown:" + Cooldown + ","
|
||||||
|
+ "damageType:" + DamageType + ","
|
||||||
+ "attackRange:" + AttackRange + ","
|
+ "attackRange:" + AttackRange + ","
|
||||||
+ "attackSoundId:" + AttackSoundId + ","
|
+ "attackSoundId:" + AttackSoundId + ","
|
||||||
+ "parameters:" + Luban.StringUtil.CollectionToString(Parameters) + ","
|
+ "parameters:" + Luban.StringUtil.CollectionToString(Parameters) + ","
|
||||||
+ "modifiers:" + Luban.StringUtil.CollectionToString(Modifiers) + ","
|
+ "statModifierConfigs:" + Luban.StringUtil.CollectionToString(StatModifierConfigs) + ","
|
||||||
+ "prefab:" + Prefab + ","
|
+ "prefab:" + Prefab + ","
|
||||||
+ "sprite:" + Sprite + ","
|
+ "sprite:" + Sprite + ","
|
||||||
+ "}";
|
+ "}";
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <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>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
namespace SepCore.Definition
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 武器状态
|
||||||
|
/// </summary>
|
||||||
|
public enum WeaponStateType : byte
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 无
|
||||||
|
/// </summary>
|
||||||
|
None = 0,
|
||||||
|
/// <summary>
|
||||||
|
/// 攻击
|
||||||
|
/// </summary>
|
||||||
|
Attack = 1,
|
||||||
|
/// <summary>
|
||||||
|
/// 待机
|
||||||
|
/// </summary>
|
||||||
|
Idle = 2,
|
||||||
|
/// <summary>
|
||||||
|
/// 搜索
|
||||||
|
/// </summary>
|
||||||
|
Seek = 3,
|
||||||
|
/// <summary>
|
||||||
|
/// 瞄准
|
||||||
|
/// </summary>
|
||||||
|
Aim = 4,
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1065e2570786f184c9553db06202a6a7
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user