diff --git a/.vsconfig b/.vsconfig
deleted file mode 100644
index f019fd0..0000000
--- a/.vsconfig
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "version": "1.0",
- "components": [
- "Microsoft.VisualStudio.Workload.ManagedGame"
- ]
-}
diff --git a/AGENTS.md b/AGENTS.md
index b4542c6..3a44e76 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -1,23 +1,44 @@
-# Repository Guidelines
+# AGENTS.md — SBE(Seek-Battle-Evacuate)
-## Project Structure & Module Organization
-`Assets/GameMain/Scripts` holds gameplay code, organized by domain such as `Components`, `Entity`, `Procedure`, `Simulation`, `UI`, and `Editor`. Scenes live in `Assets/GameMain/Scenes`, and `Assets/Launcher.unity` is the normal local entry point. Shared framework code is under `Assets/GameFramework`; third-party code and packages live in `Assets/Plugins` and `Packages/`. Automated tests are in `Assets/Tests/Simulation/{EditMode,PlayMode}`. Design notes and change proposals are tracked in `docs/` and `openspec/`. GameFramework build and resource configs live in `Assets/GameMain/Configs`.
+单人 3d 类吸血鬼幸存者游戏原型。Unity 2022.3.62f3,框架为 GameFramework(UGF,源码在 `Assets/GameFramework/`),配置表用 Luban,插件有 UniTask、DOTween 等。
-## Build, Test, and Development Commands
-- `Unity.exe -projectPath .` opens the project in Unity `2022.3.62f3c1`.
-- Open `VampireLike.sln` in Rider or Visual Studio for C# editing.
-- Open `Assets/Launcher.unity` and press Play to run the main loop locally.
-- `Unity.exe -batchmode -nographics -projectPath . -runTests -testPlatform EditMode -testResults Logs/editmode-test-results.xml -logFile Logs/editmode-tests.log -quit` runs EditMode tests.
-- `Unity.exe -batchmode -nographics -projectPath . -runTests -testPlatform PlayMode -testResults Logs/playmode-test-results.xml -logFile Logs/playmode-tests.log -quit` runs PlayMode tests.
+## 主要目录
-## Coding Style & Naming Conventions
-Use C# with 4-space indentation and K&R braces. Keep one main type per file, and match file names to type names. Use `PascalCase` for public types and members, `camelCase` for locals and parameters, and `[SerializeField] private` for Inspector-facing fields. Match nearby namespaces and folder boundaries (`Simulation`, `Entity`, `UI`, etc.). Read and edit text files using `UTF-8`, and use `LF` line endings. No repo-local linter or `.editorconfig` is committed, so use Rider/VS formatting and follow surrounding code. When adding or moving Unity assets, always commit the paired `.meta` files.
+| 路径 | 内容 |
+| --- | --- |
+| `Assets/GameMain/Scripts/Base/` | 程序集 `SepCore.Base`:常量、存档数据结构(`Definition/DataStruct/`)、Luban 生成代码(`Gen/`) |
+| `Assets/GameMain/Scripts/Runtime/` | 程序集 `SepCore.Runtime`:战斗内核(`Battle/`)、自定义组件(`CustomComponent/` 下 Luban、Random、Run、Save)、UIBase |
+| `Assets/GameMain/Scripts/UI/` | 程序集 `SepCore.Presentation`:各界面 Form/View |
+| `Assets/GameMain/Scripts/Procedure/`、`Editor/` | UGF 流程、编辑器工具 |
+| `Assets/GameMain/Scripts/Tests/EditMode/` | EditMode 测试 |
+| `数据表/` | Luban 源:`Datas/*.xlsx`(`__tables__.xlsx` 注册)、`Defines/`、导出脚本 `gen_cli.sh` / `gen_cli.bat` |
+| `Docs/GameDesign/`、`Docs/Tech/` | 设计文档;技术文档(Luban、存档、UI、战斗 TODO) |
-## Testing Guidelines
-Tests use Unity Test Framework with NUnit. Name files `*Tests.cs`. Put pure logic coverage in EditMode tests and runtime or scene behavior in PlayMode tests. There is no fixed coverage percentage, but changes to simulation, combat, procedures, or UI flow should ship with new or updated tests in `Assets/Tests`.
+## 生成代码不可手改
-## Commit & Pull Request Guidelines
-Recent history favors short, imperative commit subjects such as `fix test sample`, `Update NearestTargetSelector.cs`, and `Cleanup 1`. Keep commits focused and add module context when helpful, for example `Simulation: tighten collision query pruning`. PRs should include a behavior summary, linked task or issue, tests run, and screenshots or video for UI or scene changes.
+- `Scripts/Base/Gen/` 全部由 Luban 导出。改表只改 `数据表/Datas/` 源表,再运行 `数据表/gen_cli.sh`(Windows 也可 `gen_cli.bat`)。
+- `Scripts/UI/` 下的 `XxxForm.cs` / `XxxView.cs` 由 `UIAssetsTools` 生成(文件头有 `// `)。业务逻辑写在同名 `XxxForm.Logic.cs` partial 中;prefab 上要暴露给代码的组件在 `UISerializationItem` 登记变量名后重新构建(编辑器菜单 `Utility/UI/Build UI Prefabs`)。
-## Repository Hygiene
-Do not commit generated Unity output such as `Library/`, `Temp/`, `Logs/`, `obj/`, generated `.csproj`, or `.sln` files. Review changes to `Assets/GameMain/Configs/*.xml` and `Assets/StreamingAssets` carefully because they affect packaging and runtime resources.
+## UI 常见坑(详见 `Docs/Tech/UIMaintenance.md`)
+
+- UGF 只对顶级 Form 调用 `OnInit/OnOpen/OnClose` 生命周期;**嵌套 Form 的这些方法永远不会执行**。事件绑定用幂等模式(`_listenersBound` 标志 + `EnsureXxx()`),放在能力入口(如 `Refresh`)里。
+- 子 Form 只提供能力(public 方法,幂等可重入),数据由调用方传入;只有顶级 Form 有编排权。子组件向上通信用 `GameEntry.Event.Fire` + `XxxEventArgs`(放 `Scripts/Base/Event/UIForm/`,`ReferencePool` + `Create`/`Clear`),禁止反向持有父 Form。
+
+## Luban 约定(详见 `Docs/Tech/01_LubanDataTable.md`)
+
+- 表名小写 `tbxxxconfig`:Excel 表名、导出文件名、`Tables` 构造参数、`TableNames` 数组四处必须一致。
+- 访问入口 `GameEntry.Luban.Get(id)` / `GetTable()`;单行表(`mode=one`,如 `tbglobalconfig`)不注册访问器,走 `Tables.TbXxxConfig.Data`。
+- 从 Luban 里取出的数据默认其有效,业务代码不对其是否有效做判断。
+
+## 判空与错误处理
+
+- 声明处已经初始化赋值的变量,之后**不再对它判空**。
+- 不做静态回退(不用默认值/兜底逻辑静默继续);异常路径直接 `Log.Error(...)` 抛出(UGF 的 `Log`,支持格式串,如 `Log.Error("Entity data is invalid.")`)。
+- UI 的序列化字段(`[SerializeField]` 及 View 生成的引用)**不做判空检查**,默认已在 Inspector 中赋值。
+- GameEntry 中提供的静态入口不对其进行判空,默认其不为空。
+
+## 代码风格
+
+- 命名:public 成员大驼峰(`EncounterId`、`RoundNumber`);私有字段 `_` 前缀 + 小驼峰(`_random`、`_view`),序列化字段写作 `[SerializeField] private XxxView _view = null;`;方法(含 private)大驼峰。
+- 程序集拆分为 `SepCore.Base / Runtime / Presentation / Procedure / Editor` + `Tests`(仅 Editor 平台)+ `Luban.Runtime`;跨程序集引用参考各 `.asmdef` 的 GUID 列表。
+- 命名空间跟随程序集根(如 `SepCore.Battle`、`SepCore.Definition`)。
diff --git a/Assets/GameMain/Configs/ResourceCollection.xml b/Assets/GameMain/Configs/ResourceCollection.xml
index 84a39c1..0458c7e 100644
--- a/Assets/GameMain/Configs/ResourceCollection.xml
+++ b/Assets/GameMain/Configs/ResourceCollection.xml
@@ -28,13 +28,11 @@
-
-
@@ -55,10 +53,8 @@
-
-
@@ -68,38 +64,40 @@
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
-
-
-
@@ -107,7 +105,6 @@
-
@@ -117,37 +114,39 @@
-
-
+
+
+
+
+
+
-
-
-
+
@@ -157,6 +156,7 @@
+
@@ -167,12 +167,12 @@
+
-
@@ -180,15 +180,12 @@
-
-
-
@@ -196,6 +193,7 @@
+
@@ -206,51 +204,56 @@
+
+
-
+
-
-
+
+
+
-
+
+
-
+
-
-
+
+
-
-
+
+
+
\ No newline at end of file
diff --git a/Assets/GameMain/DataTables/Enemy.txt b/Assets/GameMain/DataTables/Enemy.txt
deleted file mode 100644
index 60d7698..0000000
--- a/Assets/GameMain/DataTables/Enemy.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-# Id 策划备注 EntityId MaxHealth HpAddPerLevel AttackDamage AttackCooldown AttackRange Speed CoinDrop ExpDrop DropPercent Scale Color Params
-# int int int int int float float float int int float float string string
-# 敌人编号 策划备注 实体编号 最大生命 每关卡增加生命 基础伤害 攻击间隔 攻击范围 移动速度 金币掉落 经验掉落 掉落概率 缩放 颜色 额外参数
- 1 近战敌人 101 50 50 1 1 1.5 3 5 1 0.3 1 #44FF44 []
- 2 远程敌人 102 40 40 1 2 8 2.5 4 2 0.2 1 #FF44FF []
- 3 蝙蝠(快) 101 20 15 1 0.8 1.2 6 3 1 0.4 0.5 #FF4444 []
- 4 骷髅兵(中) 101 80 60 2 1.2 1.8 2.5 6 2 0.3 1.3 #CCCCCC []
- 5 骷髅巨人(坦克) 101 200 120 3 2.5 2.5 1.5 10 3 0.25 2 #888888 []
- 6 幽灵(远程变体) 102 30 25 1 1.5 10 3 5 2 0.3 0.8 #88CCFF []
- 7 火焰法师(远程精英) 102 60 45 2 1 12 2 8 3 0.2 1.2 #FF8800 []
diff --git a/Assets/GameMain/DataTables/Entity.txt b/Assets/GameMain/DataTables/Entity.txt
deleted file mode 100644
index bd1e86b..0000000
--- a/Assets/GameMain/DataTables/Entity.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-# 实体表
-# Id AssetName
-# int string
-# 实体编号 策划备注 资源名称
- 11 跟随相机 FollowCamera
- 1001 测试玩家 Player
- 101 近战敌人 MeleeEnemy
- 102 远程敌人 RemoteEnemy
- 201 武器小刀 WeaponKnife
- 202 武器手枪 WeaponHandgun
- 203 武器斧头 WeaponSlash
- 204 武器闪电 WeaponLightning
- 205 武器长枪 WeaponLance
- 10001 金币实体 CoinEntity
- 10002 经验实体 ExpEntity
diff --git a/Assets/GameMain/DataTables/Entity.txt.meta b/Assets/GameMain/DataTables/Entity.txt.meta
deleted file mode 100644
index 7c4aa69..0000000
--- a/Assets/GameMain/DataTables/Entity.txt.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: cfe53cf384344bd47a8680f8c5f97a7b
-timeCreated: 1528026124
-licenseType: Pro
-TextScriptImporter:
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/Goods.txt b/Assets/GameMain/DataTables/Goods.txt
deleted file mode 100644
index 7b83641..0000000
--- a/Assets/GameMain/DataTables/Goods.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-# Id 列1 GoodsType GoodsTypeId
-# int GoodsType int
-# 商品编号 策划备注 商品类型 商品对应物品Id
- 101 道具:药 Prop 101
- 102 小刀 Weapon 1
- 103 Prop 102
- 104 Prop 103
- 105 Prop 104
- 106 Weapon 2
- 107 Prop 105
- 108 Prop 106
- 109 Prop 107
- 110 Prop 108
- 111 Prop 109
- 112 Prop 110
- 113 Prop 111
- 114 Prop 112
- 115 Prop 113
- 116 Prop 114
- 117 Prop 115
- 118 Prop 116
- 119 Prop 117
- 120 Prop 118
- 121 Prop 119
- 122 Prop 120
- 123 Weapon 3
- 124 Weapon 4
- 125 Weapon 5
diff --git a/Assets/GameMain/DataTables/Level.txt b/Assets/GameMain/DataTables/Level.txt
deleted file mode 100644
index 32a9bcc..0000000
--- a/Assets/GameMain/DataTables/Level.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-# Id 列1 EnemyTypes EntityCounts Interval Duration
-# int int[] int[] float[] int
-# 关卡号 策划备注 敌人类型 每次出怪数量 每次出怪间隔 关卡时间
- 1 第一关-新手引导 [1,2] [10,8] [1,2] 600
- 2 第二关-纯近战试炼 [1] [8] [3.5] 60
- 3 第三关-蝙蝠来袭 [1,3] [6,4] [3.5,3] 60
- 4 第四关-骷髅军团 [4,2] [6,4] [3,4] 60
- 5 第五关-近战海 [1,3] [10,5] [2.5,2] 60
- 6 第六关-幽灵之森 [4,6] [6,5] [3,3.5] 70
- 7 第七关-游击战 [3,6] [5,4] [3,3] 70
- 8 第八关-精英登场 [1,5,7] [8,2,3] [3,8,5] 80
- 9 第九关-生存极限 [4,5,7] [8,3,4] [2.5,6,3] 90
- 10 第十关-最终决战 [3,5,6,7] [10,3,5,4] [2,8,3,4] 120
diff --git a/Assets/GameMain/DataTables/LevelRarity.txt b/Assets/GameMain/DataTables/LevelRarity.txt
deleted file mode 100644
index 413b4f0..0000000
--- a/Assets/GameMain/DataTables/LevelRarity.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-# Id 列1 LevelMin LevelMax WhiteWeight GreenWeight BlueWeight PurpleWeight RedWeight SumWeight
-# int float float float float float float float float
-# 概率编号 策划备注 关卡左区间 关卡右区间 白色掉落率 绿色掉落率 蓝色掉落率 紫色掉落率 红色掉落率 总掉落率(不需要读取)
- 1 1 3 75 20 4 1 0 100
- 2 4 5 30 50 15 4 1 100
- 3 6 10 10 20 40 20 10 100
diff --git a/Assets/GameMain/DataTables/LevelUpReward.txt b/Assets/GameMain/DataTables/LevelUpReward.txt
deleted file mode 100644
index 24945e2..0000000
--- a/Assets/GameMain/DataTables/LevelUpReward.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-# Id 列1 Title Rarity Modifiers
-# int string RarityType StatModifier[]
-# 奖励编号 策划备注 奖励名 道具品质 道具属性
- 101 测试道具 肌肉 White [{"StatType":"Attack","Value":0.05,"IsPercent":true}]
- 102 牙齿 White [{"StatType":"Attack","Value":0.05,"IsPercent":true}]
- 103 脑 White [{"StatType":"Critical","Value":0.05,"IsPercent":true}]
- 104 鼻子 White [{"StatType":"AbsorbRange","Value":0.05,"IsPercent":true}]
- 105 腿 White [{"StatType":"MovementSpeed","Value":0.05,"IsPercent":true}]
- 106 眼睛 White [{"StatType":"MaxHealth","Value":0.05,"IsPercent":true}]
- 107 肌肉 Green [{"StatType":"Attack","Value":0.15,"IsPercent":true}]
- 108 牙齿 Green [{"StatType":"Attack","Value":0.15,"IsPercent":true}]
- 109 脑 Green [{"StatType":"Critical","Value":0.15,"IsPercent":true}]
- 110 鼻子 Green [{"StatType":"AbsorbRange","Value":0.15,"IsPercent":true}]
- 111 腿 Green [{"StatType":"MovementSpeed","Value":0.15,"IsPercent":true}]
- 112 眼睛 Green [{"StatType":"MaxHealth","Value":0.15,"IsPercent":true}]
- 113 肌肉 Blue [{"StatType":"Attack","Value":0.3,"IsPercent":true}]
- 114 牙齿 Blue [{"StatType":"Attack","Value":0.3,"IsPercent":true}]
- 115 脑 Blue [{"StatType":"Critical","Value":0.3,"IsPercent":true}]
- 116 鼻子 Blue [{"StatType":"AbsorbRange","Value":0.3,"IsPercent":true}]
- 117 腿 Blue [{"StatType":"MovementSpeed","Value":0.3,"IsPercent":true}]
- 118 眼睛 Blue [{"StatType":"MaxHealth","Value":0.3,"IsPercent":true}]
diff --git a/Assets/GameMain/DataTables/LevelUpReward.txt.meta b/Assets/GameMain/DataTables/LevelUpReward.txt.meta
deleted file mode 100644
index 0e4e546..0000000
--- a/Assets/GameMain/DataTables/LevelUpReward.txt.meta
+++ /dev/null
@@ -1,7 +0,0 @@
-fileFormatVersion: 2
-guid: e8def20f1612e8844b8f0dda497fa5ba
-TextScriptImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/Music.txt b/Assets/GameMain/DataTables/Music.txt
deleted file mode 100644
index 4326b0c..0000000
--- a/Assets/GameMain/DataTables/Music.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-# Id 列1 AssetName
-# int string
-# 音乐编号 策划备注 资源名称
- 1 菜单音乐 music_menu
- 2 战斗音乐 music_background
- 3 关于音乐 music_about
diff --git a/Assets/GameMain/DataTables/Music.txt.meta b/Assets/GameMain/DataTables/Music.txt.meta
deleted file mode 100644
index a4ca722..0000000
--- a/Assets/GameMain/DataTables/Music.txt.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 315e8ed2db27c254cb3366ff0793cd90
-timeCreated: 1528026124
-licenseType: Pro
-TextScriptImporter:
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/Prop.txt b/Assets/GameMain/DataTables/Prop.txt
deleted file mode 100644
index 6501a93..0000000
--- a/Assets/GameMain/DataTables/Prop.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-# Id 列1 Title Rarity Price PriceRandomPercent Modifiers
-# int string RarityType int float StatModifier[]
-# 道具编号 策划备注 道具名 道具品质 道具价格 价格浮动 道具属性
- 101 铁护腕 White 119 0.0500000007450581 [{"StatType":"Attack","Value":10,"IsPercent":false},{"StatType":"Defense","Value":12,"IsPercent":false}]
- 102 狂战士药剂 Green 225 0.0799999982118607 [{"StatType":"MaxHealth","Value":53,"IsPercent":false},{"StatType":"AttackSpeed","Value":0.09,"IsPercent":true},{"StatType":"Attack","Value":11,"IsPercent":false}]
- 103 龙鳞护符 Blue 329 0.100000001490116 [{"StatType":"Critical","Value":15,"IsPercent":false},{"StatType":"CriticalDamage","Value":21,"IsPercent":false},{"StatType":"Defense","Value":23,"IsPercent":false}]
- 104 泰坦壁垒 Red 423 0.119999997317791 [{"StatType":"Defense","Value":79,"IsPercent":false}]
- 105 轻便短靴 White 120 0.0500000007450581 [{"StatType":"MovementSpeed","Value":0.8,"IsPercent":false},{"StatType":"Attack","Value":10,"IsPercent":false}]
- 106 幽灵披风 Green 195 0.0799999982118607 [{"StatType":"Dodge","Value":10,"IsPercent":false},{"StatType":"Attack","Value":12,"IsPercent":false},{"StatType":"MaxHealth","Value":44,"IsPercent":false}]
- 107 精钢胸甲 Blue 335 0.100000001490116 [{"StatType":"Defense","Value":62,"IsPercent":false}]
- 108 暗影之刃 Red 433 0.119999997317791 [{"StatType":"Attack","Value":44,"IsPercent":false},{"StatType":"Dodge","Value":27,"IsPercent":false}]
- 109 旅行者徽章 White 121 0.0500000007450581 [{"StatType":"MaxHealth","Value":32,"IsPercent":false},{"StatType":"Attack","Value":7,"IsPercent":false},{"StatType":"Defense","Value":8,"IsPercent":false}]
- 110 疾风手套 Green 198 0.0799999982118607 [{"StatType":"AttackSpeed","Value":0.19,"IsPercent":true}]
- 111 巨人之力卷轴 Blue 341 0.100000001490116 [{"StatType":"Attack","Value":57,"IsPercent":false}]
- 112 不死鸟之心 Red 443 0.119999997317791 [{"StatType":"MaxHealth","Value":139,"IsPercent":false},{"StatType":"Critical","Value":27,"IsPercent":false}]
- 113 幸运草 White 122 0.0500000007450581 [{"StatType":"Critical","Value":5,"IsPercent":false},{"StatType":"Dodge","Value":7,"IsPercent":false},{"StatType":"MovementSpeed","Value":0.6,"IsPercent":false}]
- 114 石肤戒指 Green 201 0.0799999982118607 [{"StatType":"Defense","Value":38,"IsPercent":false}]
- 115 风行者胫甲 Blue 346 0.100000001490116 [{"StatType":"MovementSpeed","Value":1.6,"IsPercent":false},{"StatType":"Defense","Value":32,"IsPercent":false}]
- 116 幻影斗篷 Red 454 0.119999997317791 [{"StatType":"Dodge","Value":28,"IsPercent":false},{"StatType":"Defense","Value":24,"IsPercent":false},{"StatType":"Attack","Value":24,"IsPercent":false}]
- 117 木质盾牌 White 124 0.0500000007450581 [{"StatType":"Defense","Value":23,"IsPercent":false}]
- 118 生命之戒 Green 204 0.0799999982118607 [{"StatType":"Attack","Value":17,"IsPercent":false},{"StatType":"MaxHealth","Value":69,"IsPercent":false}]
- 119 精灵耳环 Blue 352 0.100000001490116 [{"StatType":"MaxHealth","Value":74,"IsPercent":false},{"StatType":"Attack","Value":19,"IsPercent":false},{"StatType":"Dodge","Value":20,"IsPercent":false}]
- 120 战神勋章 Red 464 0.119999997317791 [{"StatType":"AttackSpeed","Value":0.15,"IsPercent":true},{"StatType":"Attack","Value":29,"IsPercent":false},{"StatType":"Defense","Value":27,"IsPercent":false}]
diff --git a/Assets/GameMain/DataTables/Prop.txt.meta b/Assets/GameMain/DataTables/Prop.txt.meta
deleted file mode 100644
index 3f66ff6..0000000
--- a/Assets/GameMain/DataTables/Prop.txt.meta
+++ /dev/null
@@ -1,7 +0,0 @@
-fileFormatVersion: 2
-guid: 28988b1366cba3e4b947bb60d6b118f9
-TextScriptImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/Role.txt b/Assets/GameMain/DataTables/Role.txt
deleted file mode 100644
index fa76376..0000000
--- a/Assets/GameMain/DataTables/Role.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-# 角色表 列1 列2 列4 列5 列6 列7 列8 列9 ROUND(100*(1.1^L3),0) 列10 列11 列12 列13 列14 列15 列16 列17 列18 列19 列20 列21 列22 列23 列24 列25 列26 列27 列28 列29 列30 列31 列32 列33 列34 列35 列36 列37 列38 列39 列40 列41 列42 列43 列44 列45 列46 列47 列48 列49 列50 列51 列52 列53 列54 列55 列56 列57 列58 列59 列60 列61 列62 列63 列64 列65 列66 列67 列68 列69
-# Id RoleName MaxHp Speed Coin WeaponCapacity InitialProperty InitialItem Lv0 Lv1 Lv2 Lv3 Lv4 Lv5 Lv6 Lv7 Lv8 Lv9 Lv10 Lv11 Lv12 Lv13 Lv14 Lv15 Lv16 Lv17 Lv18 Lv19 Lv20 Lv21 Lv22 Lv23 Lv24 Lv25 Lv26 Lv27 Lv28 Lv29 Lv30 Lv31 Lv32 Lv33 Lv34 Lv35 Lv36 Lv37 Lv38 Lv39 Lv40 Lv41 Lv42 Lv43 Lv44 Lv45 Lv46 Lv47 Lv48 Lv49 Lv50 Lv51 Lv52 Lv53 Lv54 Lv55 Lv56 Lv57 Lv58 Lv59 Lv60
-# int string int float int int Modifier[] Item[] 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
-# 角色编号 策划备注 角色名称 初始最大生命 初始速度 初始金币 最大持有武器数 初始额外属性 初始额外物品 每级升级所需经验
- 101 全能者 全能者 100 6 10 6 [{"StatType":"MovementSpeed","Value":0.5,"IsPercent":false},{"StatType":"MaxHealth","Value":0.2,"IsPercent":true}] [] 100 110 121 133 146 161 177 195 214 236 259 285 314 345 380 418 459 505 556 612 673 740 814 895 985 1083 1192 1311 1442 1586 1745 1919 2111 2323 2555 2810 3091 3400 3740 4114 4526 4979 5476 6024 6626 7289 8018 8820 9702 10672 11739 12913 14204 15625 17187 18906 20797 22876 25164 27680 30448
- 102 老人 老人 200 4 5 6 [] [] 100 112 125 140 157 176 197 221 248 277 311 348 390 436 489 547 613 687 769 861 965 1080 1210 1355 1518 1700 1904 2132 2388 2675 2996 3356 3758 4209 4714 5280 5914 6623 7418 8308 9305 10422 11672 13073 14642 16399 18367 20571 23039 25804 28900 32368 36252 40603 45475 50932 57044 63889 71556 80143 89760
diff --git a/Assets/GameMain/DataTables/Role.txt.meta b/Assets/GameMain/DataTables/Role.txt.meta
deleted file mode 100644
index f09d1f9..0000000
--- a/Assets/GameMain/DataTables/Role.txt.meta
+++ /dev/null
@@ -1,7 +0,0 @@
-fileFormatVersion: 2
-guid: 65ffa78c2e8cbb346826cc2f3a7b6ea4
-TextScriptImporter:
- externalObjects: {}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/Scene.txt b/Assets/GameMain/DataTables/Scene.txt
deleted file mode 100644
index e25c1bb..0000000
--- a/Assets/GameMain/DataTables/Scene.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-# Id 列1 AssetName BackgroundMusicId
-# int string int
-# 场景编号 备注 资源名称 背景音乐编号
- 1 菜单场景 Menu 1
- 2 战斗场景 Main 2
- 3 压力测试场景 StressTest 0
- 4 游戏主场景 Game 0
diff --git a/Assets/GameMain/DataTables/Scene.txt.meta b/Assets/GameMain/DataTables/Scene.txt.meta
deleted file mode 100644
index 52e85bb..0000000
--- a/Assets/GameMain/DataTables/Scene.txt.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: a71f8bb1b1b2c51438e2bafc884cb02c
-timeCreated: 1528026124
-licenseType: Pro
-TextScriptImporter:
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/Sound.txt b/Assets/GameMain/DataTables/Sound.txt
deleted file mode 100644
index 7a42966..0000000
--- a/Assets/GameMain/DataTables/Sound.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-# 声音配置表 列1 列2 列3 列4 列5 列6 列7
-# Id AssetName Priority Loop Volume SpatialBlend MaxDistance
-# int string int bool float float float
-# 声音编号 策划备注 资源名称 优先级(默认0,128最高,-128最低) 是否循环 音量(0~1) 声音空间混合量(0为2D,1为3D,中间值混合效果) 声音最大距离
- 10000 玩家子弹 weapon_player 0 False 1 0 100
- 10001 敌人子弹 weapon_enemy 0 False 1 0 100
- 20000 玩家爆炸 explosion_player 0 False 1 0 100
- 20001 敌人爆炸 explosion_enemy 0 False 1 0 100
- 20002 小行星爆炸 explosion_asteroid 0 False 1 0 100
diff --git a/Assets/GameMain/DataTables/Sound.txt.meta b/Assets/GameMain/DataTables/Sound.txt.meta
deleted file mode 100644
index 92830da..0000000
--- a/Assets/GameMain/DataTables/Sound.txt.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 372a8b1e52bedc64b9207b12d167afaa
-timeCreated: 1528026124
-licenseType: Pro
-TextScriptImporter:
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/UIForm.txt b/Assets/GameMain/DataTables/UIForm.txt
deleted file mode 100644
index 6109d04..0000000
--- a/Assets/GameMain/DataTables/UIForm.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-# Id 列1 AssetName UIGroupName AllowMultiInstance PauseCoveredUIForm
-# int string string bool bool
-# 界面编号 策划备注 资源名称 界面组名称 是否允许多个界面实例 是否暂停被其覆盖的界面
- 1 弹出框 DialogForm Default True True
- 100 主菜单 MenuForm Default False True
- 101 设置 SettingForm Default False True
- 102 关于 AboutForm Default False True
- 200 开始菜单 StartMenuForm Default False True
- 201 角色选择页 SelectRoleForm Default False True
- 202 游戏商店页 ShopForm Default False True
- 203 游戏HUD HudForm HUD False True
- 204 角色升级奖励页 LevelUpForm Default False True
- 205 物品信息展示 ItemTooltipForm Default False False
- 206 虚拟摇杆 JoystickForm Default False False
diff --git a/Assets/GameMain/DataTables/UIForm.txt.meta b/Assets/GameMain/DataTables/UIForm.txt.meta
deleted file mode 100644
index 0234465..0000000
--- a/Assets/GameMain/DataTables/UIForm.txt.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 352da872791696c48af3b21132e3e3c3
-timeCreated: 1528026124
-licenseType: Pro
-TextScriptImporter:
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/UISound.txt b/Assets/GameMain/DataTables/UISound.txt
deleted file mode 100644
index b9d14b2..0000000
--- a/Assets/GameMain/DataTables/UISound.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-# Id 列1 AssetName Priority Volume
-# int string int float
-# 声音编号 策划备注 资源名称 优先级(默认0,128最高,-128最低) 音量(0~1)
- 10000 选择音效 select 0 1
- 10001 点击音效 click 0 1
diff --git a/Assets/GameMain/DataTables/UISound.txt.meta b/Assets/GameMain/DataTables/UISound.txt.meta
deleted file mode 100644
index b4f1b22..0000000
--- a/Assets/GameMain/DataTables/UISound.txt.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: f2f97a713beae744181ba934f9c4113a
-timeCreated: 1528026124
-licenseType: Pro
-TextScriptImporter:
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/Weapon.txt b/Assets/GameMain/DataTables/Weapon.txt
deleted file mode 100644
index a3d4dc1..0000000
--- a/Assets/GameMain/DataTables/Weapon.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-# Id 列1 EntityId Title Rarity Price PriceRandomPercent Attack Cooldown AttackRange AttackSoundId Pramas Modifiers
-# int int string RarityType int float int float float int string[] StatModifier[]
-# 武器编号 策划备注 实体编号 武器名 道具品质 武器价格 价格浮动 伤害 冷却 范围 攻击音效编号 额外参数 额外属性
- 1 玩家武器 201 小刀 White 120 0.05 100 1.5 5 10000 {"hitRadius":2} []
- 2 202 手枪 White 130 0.05 120 1 15 10000 {} []
- 3 203 斧头 White 100 0.1 150 2 5 10000 {"sectorAngle":120} []
- 4 204 闪电 White 150 0.08 80 3 12 10000 {"hitRadius":3} []
- 5 205 长枪 White 100 0.1 100 1.5 5 10000 {"hitHalfWidth":0.7,"pierceLength":4.5,"hitHeight":0.5,"hitCenterYOffset":0}
diff --git a/Assets/GameMain/DataTables/Weapon.txt.meta b/Assets/GameMain/DataTables/Weapon.txt.meta
deleted file mode 100644
index 1baafe8..0000000
--- a/Assets/GameMain/DataTables/Weapon.txt.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: ab4774faf71b57a40a29a9e902403fe3
-timeCreated: 1528026124
-licenseType: Pro
-TextScriptImporter:
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tbenemyconfig.bytes b/Assets/GameMain/DataTables/tbenemyconfig.bytes
new file mode 100644
index 0000000..6023082
Binary files /dev/null and b/Assets/GameMain/DataTables/tbenemyconfig.bytes differ
diff --git a/Assets/GameMain/DataTables/LevelRarity.txt.meta b/Assets/GameMain/DataTables/tbenemyconfig.bytes.meta
similarity index 75%
rename from Assets/GameMain/DataTables/LevelRarity.txt.meta
rename to Assets/GameMain/DataTables/tbenemyconfig.bytes.meta
index 422c335..4e225ff 100644
--- a/Assets/GameMain/DataTables/LevelRarity.txt.meta
+++ b/Assets/GameMain/DataTables/tbenemyconfig.bytes.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 0080b46050fc460cb6d6c7fc8d4e8c27
+guid: e34bb2879297d454dbdf508790b26a6d
TextScriptImporter:
externalObjects: {}
userData:
diff --git a/Assets/GameMain/DataTables/tbenemyconfig.json b/Assets/GameMain/DataTables/tbenemyconfig.json
new file mode 100644
index 0000000..2811da8
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbenemyconfig.json
@@ -0,0 +1,107 @@
+[
+ {
+ "name": "近战敌人",
+ "maxHealth": 50,
+ "hpAddPerLevel": 50,
+ "attackDamage": 1,
+ "attackCooldown": 1,
+ "attackRange": 1.5,
+ "speed": 3,
+ "coinDrop": 5,
+ "expDrop": 1,
+ "dropPercent": 0.3,
+ "scale": 1,
+ "color": "#44FF44",
+ "prefab": "MeleeEnemy"
+ },
+ {
+ "name": "远程敌人",
+ "maxHealth": 40,
+ "hpAddPerLevel": 40,
+ "attackDamage": 1,
+ "attackCooldown": 2,
+ "attackRange": 8,
+ "speed": 2.5,
+ "coinDrop": 4,
+ "expDrop": 2,
+ "dropPercent": 0.2,
+ "scale": 1,
+ "color": "#FF44FF",
+ "prefab": "RemoteEnemy"
+ },
+ {
+ "name": "蝙蝠",
+ "maxHealth": 20,
+ "hpAddPerLevel": 15,
+ "attackDamage": 1,
+ "attackCooldown": 0.8,
+ "attackRange": 1.2,
+ "speed": 6,
+ "coinDrop": 3,
+ "expDrop": 1,
+ "dropPercent": 0.4,
+ "scale": 0.5,
+ "color": "#FF4444",
+ "prefab": "MeleeEnemy"
+ },
+ {
+ "name": "骷髅兵",
+ "maxHealth": 80,
+ "hpAddPerLevel": 60,
+ "attackDamage": 2,
+ "attackCooldown": 1.2,
+ "attackRange": 1.8,
+ "speed": 2.5,
+ "coinDrop": 6,
+ "expDrop": 2,
+ "dropPercent": 0.3,
+ "scale": 1.3,
+ "color": "#CCCCCC",
+ "prefab": "MeleeEnemy"
+ },
+ {
+ "name": "骷髅巨人",
+ "maxHealth": 200,
+ "hpAddPerLevel": 120,
+ "attackDamage": 3,
+ "attackCooldown": 2.5,
+ "attackRange": 2.5,
+ "speed": 1.5,
+ "coinDrop": 10,
+ "expDrop": 3,
+ "dropPercent": 0.25,
+ "scale": 2,
+ "color": "#888888",
+ "prefab": "MeleeEnemy"
+ },
+ {
+ "name": "幽灵",
+ "maxHealth": 30,
+ "hpAddPerLevel": 25,
+ "attackDamage": 1,
+ "attackCooldown": 1.5,
+ "attackRange": 10,
+ "speed": 3,
+ "coinDrop": 5,
+ "expDrop": 2,
+ "dropPercent": 0.3,
+ "scale": 0.8,
+ "color": "#88CCFF",
+ "prefab": "RemoteEnemy"
+ },
+ {
+ "name": "火焰法师",
+ "maxHealth": 60,
+ "hpAddPerLevel": 45,
+ "attackDamage": 2,
+ "attackCooldown": 1,
+ "attackRange": 12,
+ "speed": 2,
+ "coinDrop": 8,
+ "expDrop": 3,
+ "dropPercent": 0.2,
+ "scale": 1.2,
+ "color": "#FF8800",
+ "prefab": "RemoteEnemy"
+ }
+]
\ No newline at end of file
diff --git a/Assets/GameMain/DataTables/Goods.txt.meta b/Assets/GameMain/DataTables/tbenemyconfig.json.meta
similarity index 75%
rename from Assets/GameMain/DataTables/Goods.txt.meta
rename to Assets/GameMain/DataTables/tbenemyconfig.json.meta
index c57b0cc..69de963 100644
--- a/Assets/GameMain/DataTables/Goods.txt.meta
+++ b/Assets/GameMain/DataTables/tbenemyconfig.json.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 7e6ecd46ba625fb43ab2b4bc52dcb3c1
+guid: ed15317bec751de488cb1ceb73b08199
TextScriptImporter:
externalObjects: {}
userData:
diff --git a/Assets/GameMain/DataTables/tbentityconfig.bytes b/Assets/GameMain/DataTables/tbentityconfig.bytes
new file mode 100644
index 0000000..ceb9e6f
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbentityconfig.bytes
@@ -0,0 +1,3 @@
+FollowCameraFollowCamera.prefabPlayer
Player.prefab
+MeleeEnemyMeleeEnemy.prefabRemoteEnemyRemoteEnemy.prefabWeaponKnifeWeaponKnife.prefab
WeaponHandgunWeaponHandgun.prefabWeaponSlashWeaponSlash.prefabWeaponLightningWeaponLightning.prefabWeaponLanceWeaponLance.prefab
+CoinEntityCoinEntity.prefab ExpEntityExpEntity.prefab
\ No newline at end of file
diff --git a/Assets/GameMain/DataTables/Enemy.txt.meta b/Assets/GameMain/DataTables/tbentityconfig.bytes.meta
similarity index 75%
rename from Assets/GameMain/DataTables/Enemy.txt.meta
rename to Assets/GameMain/DataTables/tbentityconfig.bytes.meta
index 1f0e2c0..58596fe 100644
--- a/Assets/GameMain/DataTables/Enemy.txt.meta
+++ b/Assets/GameMain/DataTables/tbentityconfig.bytes.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 44cfa1c448225554c961ad6eb667d80b
+guid: fe46fcc8cf06a4b47b3cc9c1ad2cdf1b
TextScriptImporter:
externalObjects: {}
userData:
diff --git a/Assets/GameMain/DataTables/tbentityconfig.json b/Assets/GameMain/DataTables/tbentityconfig.json
new file mode 100644
index 0000000..10629f4
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbentityconfig.json
@@ -0,0 +1,46 @@
+[
+ {
+ "assetName": "FollowCamera",
+ "prefabPath": "FollowCamera.prefab"
+ },
+ {
+ "assetName": "Player",
+ "prefabPath": "Player.prefab"
+ },
+ {
+ "assetName": "MeleeEnemy",
+ "prefabPath": "MeleeEnemy.prefab"
+ },
+ {
+ "assetName": "RemoteEnemy",
+ "prefabPath": "RemoteEnemy.prefab"
+ },
+ {
+ "assetName": "WeaponKnife",
+ "prefabPath": "WeaponKnife.prefab"
+ },
+ {
+ "assetName": "WeaponHandgun",
+ "prefabPath": "WeaponHandgun.prefab"
+ },
+ {
+ "assetName": "WeaponSlash",
+ "prefabPath": "WeaponSlash.prefab"
+ },
+ {
+ "assetName": "WeaponLightning",
+ "prefabPath": "WeaponLightning.prefab"
+ },
+ {
+ "assetName": "WeaponLance",
+ "prefabPath": "WeaponLance.prefab"
+ },
+ {
+ "assetName": "CoinEntity",
+ "prefabPath": "CoinEntity.prefab"
+ },
+ {
+ "assetName": "ExpEntity",
+ "prefabPath": "ExpEntity.prefab"
+ }
+]
\ No newline at end of file
diff --git a/Assets/GameMain/DataTables/Level.txt.meta b/Assets/GameMain/DataTables/tbentityconfig.json.meta
similarity index 75%
rename from Assets/GameMain/DataTables/Level.txt.meta
rename to Assets/GameMain/DataTables/tbentityconfig.json.meta
index 75b2757..e880258 100644
--- a/Assets/GameMain/DataTables/Level.txt.meta
+++ b/Assets/GameMain/DataTables/tbentityconfig.json.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 414af21e34e96c343a4d2a0613175657
+guid: 78c15b1ef3ec02044a8754c561f47ff9
TextScriptImporter:
externalObjects: {}
userData:
diff --git a/Assets/GameMain/DataTables/tbglobalconfig.bytes b/Assets/GameMain/DataTables/tbglobalconfig.bytes
new file mode 100644
index 0000000..4cc7ebf
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbglobalconfig.bytes
@@ -0,0 +1 @@
+ď
\ No newline at end of file
diff --git a/Assets/GameMain/DataTables/tbglobalconfig.bytes.meta b/Assets/GameMain/DataTables/tbglobalconfig.bytes.meta
new file mode 100644
index 0000000..76ff98b
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbglobalconfig.bytes.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 3e2e8566c4832d94fa488aac86464e23
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tbglobalconfig.json b/Assets/GameMain/DataTables/tbglobalconfig.json
new file mode 100644
index 0000000..a25131d
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbglobalconfig.json
@@ -0,0 +1,5 @@
+[
+ {
+ "elapsedTime": 1000
+ }
+]
\ No newline at end of file
diff --git a/Assets/GameMain/DataTables/tbglobalconfig.json.meta b/Assets/GameMain/DataTables/tbglobalconfig.json.meta
new file mode 100644
index 0000000..d032a76
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbglobalconfig.json.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: a17766a004c520a42b9257af2d83e78a
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tbgoodsconfig.bytes b/Assets/GameMain/DataTables/tbgoodsconfig.bytes
new file mode 100644
index 0000000..8edfd3e
Binary files /dev/null and b/Assets/GameMain/DataTables/tbgoodsconfig.bytes differ
diff --git a/Assets/GameMain/DataTables/tbgoodsconfig.bytes.meta b/Assets/GameMain/DataTables/tbgoodsconfig.bytes.meta
new file mode 100644
index 0000000..ab43a06
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbgoodsconfig.bytes.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: cf3a6f8c44db6fd4f878d3a943b0ee10
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tbgoodsconfig.json b/Assets/GameMain/DataTables/tbgoodsconfig.json
new file mode 100644
index 0000000..1b76be2
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbgoodsconfig.json
@@ -0,0 +1,127 @@
+[
+ {
+ "Id": 1001,
+ "GoodsType": 1,
+ "GoodsTypeId": 1001
+ },
+ {
+ "Id": 1002,
+ "GoodsType": 2,
+ "GoodsTypeId": 1001
+ },
+ {
+ "Id": 1003,
+ "GoodsType": 1,
+ "GoodsTypeId": 1002
+ },
+ {
+ "Id": 1004,
+ "GoodsType": 1,
+ "GoodsTypeId": 1003
+ },
+ {
+ "Id": 1005,
+ "GoodsType": 1,
+ "GoodsTypeId": 1004
+ },
+ {
+ "Id": 1006,
+ "GoodsType": 2,
+ "GoodsTypeId": 1002
+ },
+ {
+ "Id": 1007,
+ "GoodsType": 1,
+ "GoodsTypeId": 1005
+ },
+ {
+ "Id": 1008,
+ "GoodsType": 1,
+ "GoodsTypeId": 1006
+ },
+ {
+ "Id": 1009,
+ "GoodsType": 1,
+ "GoodsTypeId": 1007
+ },
+ {
+ "Id": 1010,
+ "GoodsType": 1,
+ "GoodsTypeId": 1008
+ },
+ {
+ "Id": 1011,
+ "GoodsType": 1,
+ "GoodsTypeId": 1009
+ },
+ {
+ "Id": 1012,
+ "GoodsType": 1,
+ "GoodsTypeId": 1010
+ },
+ {
+ "Id": 1013,
+ "GoodsType": 1,
+ "GoodsTypeId": 1011
+ },
+ {
+ "Id": 1014,
+ "GoodsType": 1,
+ "GoodsTypeId": 1012
+ },
+ {
+ "Id": 1015,
+ "GoodsType": 1,
+ "GoodsTypeId": 1013
+ },
+ {
+ "Id": 1016,
+ "GoodsType": 1,
+ "GoodsTypeId": 1014
+ },
+ {
+ "Id": 1017,
+ "GoodsType": 1,
+ "GoodsTypeId": 1015
+ },
+ {
+ "Id": 1018,
+ "GoodsType": 1,
+ "GoodsTypeId": 1016
+ },
+ {
+ "Id": 1019,
+ "GoodsType": 1,
+ "GoodsTypeId": 1017
+ },
+ {
+ "Id": 1020,
+ "GoodsType": 1,
+ "GoodsTypeId": 1018
+ },
+ {
+ "Id": 1021,
+ "GoodsType": 1,
+ "GoodsTypeId": 1019
+ },
+ {
+ "Id": 1022,
+ "GoodsType": 1,
+ "GoodsTypeId": 1020
+ },
+ {
+ "Id": 1023,
+ "GoodsType": 2,
+ "GoodsTypeId": 1003
+ },
+ {
+ "Id": 1024,
+ "GoodsType": 2,
+ "GoodsTypeId": 1004
+ },
+ {
+ "Id": 1025,
+ "GoodsType": 2,
+ "GoodsTypeId": 1005
+ }
+]
\ No newline at end of file
diff --git a/Assets/GameMain/DataTables/tbgoodsconfig.json.meta b/Assets/GameMain/DataTables/tbgoodsconfig.json.meta
new file mode 100644
index 0000000..930c64e
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbgoodsconfig.json.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: e8ea787e37ebf4042965ef816d645584
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tblevelconfig.bytes b/Assets/GameMain/DataTables/tblevelconfig.bytes
new file mode 100644
index 0000000..31aecab
--- /dev/null
+++ b/Assets/GameMain/DataTables/tblevelconfig.bytes
@@ -0,0 +1,5 @@
+
+近战敌人� 远程敌人“ˆ<近战敌人�¬<近战敌人�¬蝙蝠‹¸< 骷髅兵‹¸远程敌人� <近战敌人
+‰Ä蝙蝠‡Ð< 骷髅兵‹¸幽灵�¬F蝙蝠‹¸幽灵‹¸F近战敌人‹¸骷髅巨人Ÿ@火焰法师“ˆP 骷髅兵‰Ä骷髅巨人—p火焰法师‹¸Z
+蝙蝠
+‡Ð 骷髅兵Ÿ@幽灵‹¸火焰法师� x
\ No newline at end of file
diff --git a/Assets/GameMain/DataTables/tblevelconfig.bytes.meta b/Assets/GameMain/DataTables/tblevelconfig.bytes.meta
new file mode 100644
index 0000000..8bbfba6
--- /dev/null
+++ b/Assets/GameMain/DataTables/tblevelconfig.bytes.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 293fc547daf25ad499fc1c6c905fce41
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tblevelconfig.json b/Assets/GameMain/DataTables/tblevelconfig.json
new file mode 100644
index 0000000..29c4d1b
--- /dev/null
+++ b/Assets/GameMain/DataTables/tblevelconfig.json
@@ -0,0 +1,177 @@
+[
+ {
+ "id": 1,
+ "enemySpawnConfigs": [
+ {
+ "enemyName": "近战敌人",
+ "enemyCount": 5,
+ "interval": 4000
+ },
+ {
+ "enemyName": "远程敌人",
+ "enemyCount": 2,
+ "interval": 5000
+ }
+ ],
+ "duration": 60
+ },
+ {
+ "id": 2,
+ "enemySpawnConfigs": [
+ {
+ "enemyName": "近战敌人",
+ "enemyCount": 8,
+ "interval": 3500
+ }
+ ],
+ "duration": 60
+ },
+ {
+ "id": 3,
+ "enemySpawnConfigs": [
+ {
+ "enemyName": "近战敌人",
+ "enemyCount": 6,
+ "interval": 3500
+ },
+ {
+ "enemyName": "蝙蝠",
+ "enemyCount": 4,
+ "interval": 3000
+ }
+ ],
+ "duration": 60
+ },
+ {
+ "id": 4,
+ "enemySpawnConfigs": [
+ {
+ "enemyName": "骷髅兵",
+ "enemyCount": 6,
+ "interval": 3000
+ },
+ {
+ "enemyName": "远程敌人",
+ "enemyCount": 4,
+ "interval": 4000
+ }
+ ],
+ "duration": 60
+ },
+ {
+ "id": 5,
+ "enemySpawnConfigs": [
+ {
+ "enemyName": "近战敌人",
+ "enemyCount": 10,
+ "interval": 2500
+ },
+ {
+ "enemyName": "蝙蝠",
+ "enemyCount": 5,
+ "interval": 2000
+ }
+ ],
+ "duration": 60
+ },
+ {
+ "id": 6,
+ "enemySpawnConfigs": [
+ {
+ "enemyName": "骷髅兵",
+ "enemyCount": 6,
+ "interval": 3000
+ },
+ {
+ "enemyName": "幽灵",
+ "enemyCount": 5,
+ "interval": 3500
+ }
+ ],
+ "duration": 70
+ },
+ {
+ "id": 7,
+ "enemySpawnConfigs": [
+ {
+ "enemyName": "蝙蝠",
+ "enemyCount": 5,
+ "interval": 3000
+ },
+ {
+ "enemyName": "幽灵",
+ "enemyCount": 4,
+ "interval": 3000
+ }
+ ],
+ "duration": 70
+ },
+ {
+ "id": 8,
+ "enemySpawnConfigs": [
+ {
+ "enemyName": "近战敌人",
+ "enemyCount": 8,
+ "interval": 3000
+ },
+ {
+ "enemyName": "骷髅巨人",
+ "enemyCount": 2,
+ "interval": 8000
+ },
+ {
+ "enemyName": "火焰法师",
+ "enemyCount": 3,
+ "interval": 5000
+ }
+ ],
+ "duration": 80
+ },
+ {
+ "id": 9,
+ "enemySpawnConfigs": [
+ {
+ "enemyName": "骷髅兵",
+ "enemyCount": 8,
+ "interval": 2500
+ },
+ {
+ "enemyName": "骷髅巨人",
+ "enemyCount": 3,
+ "interval": 6000
+ },
+ {
+ "enemyName": "火焰法师",
+ "enemyCount": 4,
+ "interval": 3000
+ }
+ ],
+ "duration": 90
+ },
+ {
+ "id": 10,
+ "enemySpawnConfigs": [
+ {
+ "enemyName": "蝙蝠",
+ "enemyCount": 10,
+ "interval": 2000
+ },
+ {
+ "enemyName": "骷髅兵",
+ "enemyCount": 3,
+ "interval": 8000
+ },
+ {
+ "enemyName": "幽灵",
+ "enemyCount": 5,
+ "interval": 3000
+ },
+ {
+ "enemyName": "火焰法师",
+ "enemyCount": 4,
+ "interval": 4000
+ }
+ ],
+ "duration": 120
+ }
+]
\ No newline at end of file
diff --git a/Assets/GameMain/DataTables/tblevelconfig.json.meta b/Assets/GameMain/DataTables/tblevelconfig.json.meta
new file mode 100644
index 0000000..130b11e
--- /dev/null
+++ b/Assets/GameMain/DataTables/tblevelconfig.json.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 6e2e48e91e9a4c04eb0d927dfcca0b75
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tbleveldropconfig.bytes b/Assets/GameMain/DataTables/tbleveldropconfig.bytes
new file mode 100644
index 0000000..7d0f5e7
Binary files /dev/null and b/Assets/GameMain/DataTables/tbleveldropconfig.bytes differ
diff --git a/Assets/GameMain/DataTables/tbleveldropconfig.bytes.meta b/Assets/GameMain/DataTables/tbleveldropconfig.bytes.meta
new file mode 100644
index 0000000..855c2d8
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbleveldropconfig.bytes.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: f6970f0548631d94788ab0168d22624e
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tbleveldropconfig.json b/Assets/GameMain/DataTables/tbleveldropconfig.json
new file mode 100644
index 0000000..99ed61d
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbleveldropconfig.json
@@ -0,0 +1,82 @@
+[
+ {
+ "Id": 1001,
+ "WhiteWeight": 75,
+ "GreenWeight": 20,
+ "BlueWeight": 4,
+ "PurpleWeight": 1,
+ "RedWeight": 0
+ },
+ {
+ "Id": 1002,
+ "WhiteWeight": 75,
+ "GreenWeight": 20,
+ "BlueWeight": 4,
+ "PurpleWeight": 1,
+ "RedWeight": 0
+ },
+ {
+ "Id": 1003,
+ "WhiteWeight": 75,
+ "GreenWeight": 20,
+ "BlueWeight": 4,
+ "PurpleWeight": 1,
+ "RedWeight": 0
+ },
+ {
+ "Id": 1004,
+ "WhiteWeight": 30,
+ "GreenWeight": 50,
+ "BlueWeight": 15,
+ "PurpleWeight": 4,
+ "RedWeight": 1
+ },
+ {
+ "Id": 1005,
+ "WhiteWeight": 30,
+ "GreenWeight": 50,
+ "BlueWeight": 15,
+ "PurpleWeight": 4,
+ "RedWeight": 1
+ },
+ {
+ "Id": 1006,
+ "WhiteWeight": 10,
+ "GreenWeight": 20,
+ "BlueWeight": 40,
+ "PurpleWeight": 20,
+ "RedWeight": 10
+ },
+ {
+ "Id": 1007,
+ "WhiteWeight": 10,
+ "GreenWeight": 20,
+ "BlueWeight": 40,
+ "PurpleWeight": 20,
+ "RedWeight": 10
+ },
+ {
+ "Id": 1008,
+ "WhiteWeight": 10,
+ "GreenWeight": 20,
+ "BlueWeight": 40,
+ "PurpleWeight": 20,
+ "RedWeight": 10
+ },
+ {
+ "Id": 1009,
+ "WhiteWeight": 10,
+ "GreenWeight": 20,
+ "BlueWeight": 40,
+ "PurpleWeight": 20,
+ "RedWeight": 10
+ },
+ {
+ "Id": 1010,
+ "WhiteWeight": 10,
+ "GreenWeight": 20,
+ "BlueWeight": 40,
+ "PurpleWeight": 20,
+ "RedWeight": 10
+ }
+]
\ No newline at end of file
diff --git a/Assets/GameMain/DataTables/tbleveldropconfig.json.meta b/Assets/GameMain/DataTables/tbleveldropconfig.json.meta
new file mode 100644
index 0000000..8654e53
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbleveldropconfig.json.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 76b24e5957c874a48bab79b65990b362
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tblevelexperienceconfig.bytes b/Assets/GameMain/DataTables/tblevelexperienceconfig.bytes
new file mode 100644
index 0000000..ee9bcf5
--- /dev/null
+++ b/Assets/GameMain/DataTables/tblevelexperienceconfig.bytes
@@ -0,0 +1 @@
+ 全能者dny€…€’€¡€±€Àրì���:�Y�|�¢�ˁù‚,‚d‚¡‚äƒ.ƒƒل;„¨……¢†2†чˆ?‰‰ûŠúŒ�HŽœ�‘®“s•d—ˆ™âœyŸR¢t¥橰۲q·|½ ÀC#ÀIÚÀQ=ÀY\ÀbLÀl Àvð老人dp}€Œ€�€°€ŀ݀ø��7�\�†�´�é‚#‚e‚¯ƒƒ]ƒń8„º…K…‡pˆT‰TŠs‹´�Ž®�q’j” —™ߜú t¤Y¨¶˜³¹2À@ÀG¿ÀP[ÀYÿÀdÌÀpäÀ~pÀ�œÀž›À±£ÀÆôÀÞÔÀù‘Á„Á9Á^
\ No newline at end of file
diff --git a/Assets/GameMain/DataTables/tblevelexperienceconfig.bytes.meta b/Assets/GameMain/DataTables/tblevelexperienceconfig.bytes.meta
new file mode 100644
index 0000000..76b09c7
--- /dev/null
+++ b/Assets/GameMain/DataTables/tblevelexperienceconfig.bytes.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 887d5a8d5320cb44b985ee23d43d9daa
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tblevelexperienceconfig.json b/Assets/GameMain/DataTables/tblevelexperienceconfig.json
new file mode 100644
index 0000000..0640088
--- /dev/null
+++ b/Assets/GameMain/DataTables/tblevelexperienceconfig.json
@@ -0,0 +1,130 @@
+[
+ {
+ "key": "全能者",
+ "Lv0": 100,
+ "Lv1": 110,
+ "Lv2": 121,
+ "Lv3": 133,
+ "Lv4": 146,
+ "Lv5": 161,
+ "Lv6": 177,
+ "Lv7": 195,
+ "Lv8": 214,
+ "Lv9": 236,
+ "Lv10": 259,
+ "Lv11": 285,
+ "Lv12": 314,
+ "Lv13": 345,
+ "Lv14": 380,
+ "Lv15": 418,
+ "Lv16": 459,
+ "Lv17": 505,
+ "Lv18": 556,
+ "Lv19": 612,
+ "Lv20": 673,
+ "Lv21": 740,
+ "Lv22": 814,
+ "Lv23": 895,
+ "Lv24": 985,
+ "Lv25": 1083,
+ "Lv26": 1192,
+ "Lv27": 1311,
+ "Lv28": 1442,
+ "Lv29": 1586,
+ "Lv30": 1745,
+ "Lv31": 1919,
+ "Lv32": 2111,
+ "Lv33": 2323,
+ "Lv34": 2555,
+ "Lv35": 2810,
+ "Lv36": 3091,
+ "Lv37": 3400,
+ "Lv38": 3740,
+ "Lv39": 4114,
+ "Lv40": 4526,
+ "Lv41": 4979,
+ "Lv42": 5476,
+ "Lv43": 6024,
+ "Lv44": 6626,
+ "Lv45": 7289,
+ "Lv46": 8018,
+ "Lv47": 8820,
+ "Lv48": 9702,
+ "Lv49": 10672,
+ "Lv50": 11739,
+ "Lv51": 12913,
+ "Lv52": 14204,
+ "Lv53": 15625,
+ "Lv54": 17187,
+ "Lv55": 18906,
+ "Lv56": 20797,
+ "Lv57": 22876,
+ "Lv58": 25164,
+ "Lv59": 27680,
+ "Lv60": 30448
+ },
+ {
+ "key": "老人",
+ "Lv0": 100,
+ "Lv1": 112,
+ "Lv2": 125,
+ "Lv3": 140,
+ "Lv4": 157,
+ "Lv5": 176,
+ "Lv6": 197,
+ "Lv7": 221,
+ "Lv8": 248,
+ "Lv9": 277,
+ "Lv10": 311,
+ "Lv11": 348,
+ "Lv12": 390,
+ "Lv13": 436,
+ "Lv14": 489,
+ "Lv15": 547,
+ "Lv16": 613,
+ "Lv17": 687,
+ "Lv18": 769,
+ "Lv19": 861,
+ "Lv20": 965,
+ "Lv21": 1080,
+ "Lv22": 1210,
+ "Lv23": 1355,
+ "Lv24": 1518,
+ "Lv25": 1700,
+ "Lv26": 1904,
+ "Lv27": 2132,
+ "Lv28": 2388,
+ "Lv29": 2675,
+ "Lv30": 2996,
+ "Lv31": 3356,
+ "Lv32": 3758,
+ "Lv33": 4209,
+ "Lv34": 4714,
+ "Lv35": 5280,
+ "Lv36": 5914,
+ "Lv37": 6623,
+ "Lv38": 7418,
+ "Lv39": 8308,
+ "Lv40": 9305,
+ "Lv41": 10422,
+ "Lv42": 11672,
+ "Lv43": 13073,
+ "Lv44": 14642,
+ "Lv45": 16399,
+ "Lv46": 18367,
+ "Lv47": 20571,
+ "Lv48": 23039,
+ "Lv49": 25804,
+ "Lv50": 28900,
+ "Lv51": 32368,
+ "Lv52": 36252,
+ "Lv53": 40603,
+ "Lv54": 45475,
+ "Lv55": 50932,
+ "Lv56": 57044,
+ "Lv57": 63889,
+ "Lv58": 71556,
+ "Lv59": 80143,
+ "Lv60": 89760
+ }
+]
\ No newline at end of file
diff --git a/Assets/GameMain/DataTables/tblevelexperienceconfig.json.meta b/Assets/GameMain/DataTables/tblevelexperienceconfig.json.meta
new file mode 100644
index 0000000..9f8611c
--- /dev/null
+++ b/Assets/GameMain/DataTables/tblevelexperienceconfig.json.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 2285810b642292949997fce96eabf85c
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tbleveluprewardconfig.bytes b/Assets/GameMain/DataTables/tbleveluprewardconfig.bytes
new file mode 100644
index 0000000..bba9827
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbleveluprewardconfig.bytes
@@ -0,0 +1 @@
+ƒé肌肉2ƒê牙齿2ƒë脑2ƒì鼻子 2ƒí腿2ƒî眼睛2ƒï肌肉€–ƒð牙齿€–ƒñ脑€–ƒò鼻子 €–ƒó腿€–ƒô眼睛€–ƒõ肌肉�,ƒö牙齿�,ƒ÷脑�,ƒø鼻子 �,ƒù腿�,ƒú眼睛�,
\ No newline at end of file
diff --git a/Assets/GameMain/DataTables/tbleveluprewardconfig.bytes.meta b/Assets/GameMain/DataTables/tbleveluprewardconfig.bytes.meta
new file mode 100644
index 0000000..50284a9
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbleveluprewardconfig.bytes.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: cddecab03cc92f0439c9b30ebc46981e
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tbleveluprewardconfig.json b/Assets/GameMain/DataTables/tbleveluprewardconfig.json
new file mode 100644
index 0000000..4112aa9
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbleveluprewardconfig.json
@@ -0,0 +1,218 @@
+[
+ {
+ "id": 1001,
+ "title": "肌肉",
+ "rarity": 1,
+ "modifiers": [
+ {
+ "key": 3,
+ "value": 50,
+ "isPercent": true
+ }
+ ]
+ },
+ {
+ "id": 1002,
+ "title": "牙齿",
+ "rarity": 1,
+ "modifiers": [
+ {
+ "key": 3,
+ "value": 50,
+ "isPercent": true
+ }
+ ]
+ },
+ {
+ "id": 1003,
+ "title": "脑",
+ "rarity": 1,
+ "modifiers": [
+ {
+ "key": 6,
+ "value": 50,
+ "isPercent": true
+ }
+ ]
+ },
+ {
+ "id": 1004,
+ "title": "鼻子",
+ "rarity": 1,
+ "modifiers": [
+ {
+ "key": 9,
+ "value": 50,
+ "isPercent": true
+ }
+ ]
+ },
+ {
+ "id": 1005,
+ "title": "腿",
+ "rarity": 1,
+ "modifiers": [
+ {
+ "key": 2,
+ "value": 50,
+ "isPercent": true
+ }
+ ]
+ },
+ {
+ "id": 1006,
+ "title": "眼睛",
+ "rarity": 1,
+ "modifiers": [
+ {
+ "key": 1,
+ "value": 50,
+ "isPercent": true
+ }
+ ]
+ },
+ {
+ "id": 1007,
+ "title": "肌肉",
+ "rarity": 2,
+ "modifiers": [
+ {
+ "key": 3,
+ "value": 150,
+ "isPercent": true
+ }
+ ]
+ },
+ {
+ "id": 1008,
+ "title": "牙齿",
+ "rarity": 2,
+ "modifiers": [
+ {
+ "key": 3,
+ "value": 150,
+ "isPercent": true
+ }
+ ]
+ },
+ {
+ "id": 1009,
+ "title": "脑",
+ "rarity": 2,
+ "modifiers": [
+ {
+ "key": 6,
+ "value": 150,
+ "isPercent": true
+ }
+ ]
+ },
+ {
+ "id": 1010,
+ "title": "鼻子",
+ "rarity": 2,
+ "modifiers": [
+ {
+ "key": 9,
+ "value": 150,
+ "isPercent": true
+ }
+ ]
+ },
+ {
+ "id": 1011,
+ "title": "腿",
+ "rarity": 2,
+ "modifiers": [
+ {
+ "key": 2,
+ "value": 150,
+ "isPercent": true
+ }
+ ]
+ },
+ {
+ "id": 1012,
+ "title": "眼睛",
+ "rarity": 2,
+ "modifiers": [
+ {
+ "key": 1,
+ "value": 150,
+ "isPercent": true
+ }
+ ]
+ },
+ {
+ "id": 1013,
+ "title": "肌肉",
+ "rarity": 3,
+ "modifiers": [
+ {
+ "key": 3,
+ "value": 300,
+ "isPercent": true
+ }
+ ]
+ },
+ {
+ "id": 1014,
+ "title": "牙齿",
+ "rarity": 3,
+ "modifiers": [
+ {
+ "key": 3,
+ "value": 300,
+ "isPercent": true
+ }
+ ]
+ },
+ {
+ "id": 1015,
+ "title": "脑",
+ "rarity": 3,
+ "modifiers": [
+ {
+ "key": 6,
+ "value": 300,
+ "isPercent": true
+ }
+ ]
+ },
+ {
+ "id": 1016,
+ "title": "鼻子",
+ "rarity": 3,
+ "modifiers": [
+ {
+ "key": 9,
+ "value": 300,
+ "isPercent": true
+ }
+ ]
+ },
+ {
+ "id": 1017,
+ "title": "腿",
+ "rarity": 3,
+ "modifiers": [
+ {
+ "key": 2,
+ "value": 300,
+ "isPercent": true
+ }
+ ]
+ },
+ {
+ "id": 1018,
+ "title": "眼睛",
+ "rarity": 3,
+ "modifiers": [
+ {
+ "key": 1,
+ "value": 300,
+ "isPercent": true
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/Assets/GameMain/DataTables/tbleveluprewardconfig.json.meta b/Assets/GameMain/DataTables/tbleveluprewardconfig.json.meta
new file mode 100644
index 0000000..569c70a
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbleveluprewardconfig.json.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 39cc16aedcbca5647be53f56dce6a5ad
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tbmusicconfig.bytes b/Assets/GameMain/DataTables/tbmusicconfig.bytes
new file mode 100644
index 0000000..a87d894
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbmusicconfig.bytes
@@ -0,0 +1,2 @@
+
+music_menumusic_backgroundmusic_about
\ No newline at end of file
diff --git a/Assets/GameMain/DataTables/tbmusicconfig.bytes.meta b/Assets/GameMain/DataTables/tbmusicconfig.bytes.meta
new file mode 100644
index 0000000..dc17297
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbmusicconfig.bytes.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: e6057df910f120543b84d5f7d531ee1a
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tbmusicconfig.json b/Assets/GameMain/DataTables/tbmusicconfig.json
new file mode 100644
index 0000000..960b5bb
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbmusicconfig.json
@@ -0,0 +1,14 @@
+[
+ {
+ "id": 1,
+ "assetName": "music_menu"
+ },
+ {
+ "id": 2,
+ "assetName": "music_background"
+ },
+ {
+ "id": 3,
+ "assetName": "music_about"
+ }
+]
\ No newline at end of file
diff --git a/Assets/GameMain/DataTables/tbmusicconfig.json.meta b/Assets/GameMain/DataTables/tbmusicconfig.json.meta
new file mode 100644
index 0000000..5bddb52
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbmusicconfig.json.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: de92febed48d9284ca086119dae53f81
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tbpropconfig.bytes b/Assets/GameMain/DataTables/tbpropconfig.bytes
new file mode 100644
index 0000000..d4159c3
Binary files /dev/null and b/Assets/GameMain/DataTables/tbpropconfig.bytes differ
diff --git a/Assets/GameMain/DataTables/tbpropconfig.bytes.meta b/Assets/GameMain/DataTables/tbpropconfig.bytes.meta
new file mode 100644
index 0000000..5f90c5a
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbpropconfig.bytes.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 95704d9db33214d4ba398b74e2183456
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tbpropconfig.json b/Assets/GameMain/DataTables/tbpropconfig.json
new file mode 100644
index 0000000..1d367da
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbpropconfig.json
@@ -0,0 +1,372 @@
+[
+ {
+ "id": 1001,
+ "name": "铁护腕",
+ "rarity": 1,
+ "price": 120,
+ "modifiers": [
+ {
+ "key": 3,
+ "value": 10,
+ "isPercent": false
+ },
+ {
+ "key": 4,
+ "value": 12,
+ "isPercent": false
+ }
+ ]
+ },
+ {
+ "id": 1002,
+ "name": "狂战士药剂",
+ "rarity": 2,
+ "price": 250,
+ "modifiers": [
+ {
+ "key": 1,
+ "value": 53,
+ "isPercent": false
+ },
+ {
+ "key": 5,
+ "value": 90,
+ "isPercent": true
+ },
+ {
+ "key": 3,
+ "value": 11,
+ "isPercent": false
+ }
+ ]
+ },
+ {
+ "id": 1003,
+ "name": "龙鳞护符",
+ "rarity": 3,
+ "price": 330,
+ "modifiers": [
+ {
+ "key": 6,
+ "value": 15,
+ "isPercent": false
+ },
+ {
+ "key": 7,
+ "value": 21,
+ "isPercent": false
+ },
+ {
+ "key": 4,
+ "value": 23,
+ "isPercent": false
+ }
+ ]
+ },
+ {
+ "id": 1004,
+ "name": "泰坦壁垒",
+ "rarity": 5,
+ "price": 423,
+ "modifiers": [
+ {
+ "key": 4,
+ "value": 79,
+ "isPercent": false
+ }
+ ]
+ },
+ {
+ "id": 1005,
+ "name": "轻便短靴",
+ "rarity": 1,
+ "price": 120,
+ "modifiers": [
+ {
+ "key": 2,
+ "value": 800,
+ "isPercent": false
+ },
+ {
+ "key": 3,
+ "value": 10,
+ "isPercent": false
+ }
+ ]
+ },
+ {
+ "id": 1006,
+ "name": "幽灵披风",
+ "rarity": 2,
+ "price": 195,
+ "modifiers": [
+ {
+ "key": 8,
+ "value": 10,
+ "isPercent": false
+ },
+ {
+ "key": 3,
+ "value": 12,
+ "isPercent": false
+ },
+ {
+ "key": 1,
+ "value": 44,
+ "isPercent": false
+ }
+ ]
+ },
+ {
+ "id": 1007,
+ "name": "精钢胸甲",
+ "rarity": 3,
+ "price": 335,
+ "modifiers": [
+ {
+ "key": 4,
+ "value": 62,
+ "isPercent": false
+ }
+ ]
+ },
+ {
+ "id": 1008,
+ "name": "暗影之刃",
+ "rarity": 5,
+ "price": 433,
+ "modifiers": [
+ {
+ "key": 3,
+ "value": 44,
+ "isPercent": false
+ },
+ {
+ "key": 8,
+ "value": 27,
+ "isPercent": false
+ }
+ ]
+ },
+ {
+ "id": 1009,
+ "name": "旅行者徽章",
+ "rarity": 1,
+ "price": 121,
+ "modifiers": [
+ {
+ "key": 1,
+ "value": 32,
+ "isPercent": false
+ },
+ {
+ "key": 3,
+ "value": 7,
+ "isPercent": false
+ },
+ {
+ "key": 4,
+ "value": 8,
+ "isPercent": false
+ }
+ ]
+ },
+ {
+ "id": 1010,
+ "name": "疾风手套",
+ "rarity": 2,
+ "price": 198,
+ "modifiers": [
+ {
+ "key": 5,
+ "value": 190,
+ "isPercent": true
+ }
+ ]
+ },
+ {
+ "id": 1011,
+ "name": "巨人之力卷轴",
+ "rarity": 3,
+ "price": 341,
+ "modifiers": [
+ {
+ "key": 3,
+ "value": 57,
+ "isPercent": false
+ }
+ ]
+ },
+ {
+ "id": 1012,
+ "name": "不死鸟之心",
+ "rarity": 5,
+ "price": 443,
+ "modifiers": [
+ {
+ "key": 1,
+ "value": 139,
+ "isPercent": false
+ },
+ {
+ "key": 6,
+ "value": 27,
+ "isPercent": false
+ }
+ ]
+ },
+ {
+ "id": 1013,
+ "name": "幸运草",
+ "rarity": 1,
+ "price": 122,
+ "modifiers": [
+ {
+ "key": 6,
+ "value": 5,
+ "isPercent": false
+ },
+ {
+ "key": 8,
+ "value": 7,
+ "isPercent": false
+ }
+ ]
+ },
+ {
+ "id": 1014,
+ "name": "石肤戒指",
+ "rarity": 2,
+ "price": 201,
+ "modifiers": [
+ {
+ "key": 2,
+ "value": 600,
+ "isPercent": false
+ },
+ {
+ "key": 4,
+ "value": 38,
+ "isPercent": false
+ }
+ ]
+ },
+ {
+ "id": 1015,
+ "name": "风行者胫甲",
+ "rarity": 3,
+ "price": 346,
+ "modifiers": [
+ {
+ "key": 2,
+ "value": 1600,
+ "isPercent": false
+ },
+ {
+ "key": 4,
+ "value": 32,
+ "isPercent": false
+ }
+ ]
+ },
+ {
+ "id": 1016,
+ "name": "幻影斗篷",
+ "rarity": 5,
+ "price": 454,
+ "modifiers": [
+ {
+ "key": 8,
+ "value": 28,
+ "isPercent": false
+ },
+ {
+ "key": 4,
+ "value": 24,
+ "isPercent": false
+ },
+ {
+ "key": 3,
+ "value": 24,
+ "isPercent": false
+ }
+ ]
+ },
+ {
+ "id": 1017,
+ "name": "木质盾牌",
+ "rarity": 1,
+ "price": 124,
+ "modifiers": [
+ {
+ "key": 4,
+ "value": 23,
+ "isPercent": false
+ }
+ ]
+ },
+ {
+ "id": 1018,
+ "name": "生命之戒",
+ "rarity": 2,
+ "price": 204,
+ "modifiers": [
+ {
+ "key": 3,
+ "value": 17,
+ "isPercent": false
+ },
+ {
+ "key": 1,
+ "value": 69,
+ "isPercent": false
+ }
+ ]
+ },
+ {
+ "id": 1019,
+ "name": "精灵耳环",
+ "rarity": 3,
+ "price": 352,
+ "modifiers": [
+ {
+ "key": 1,
+ "value": 74,
+ "isPercent": false
+ },
+ {
+ "key": 3,
+ "value": 19,
+ "isPercent": false
+ },
+ {
+ "key": 8,
+ "value": 20,
+ "isPercent": false
+ }
+ ]
+ },
+ {
+ "id": 1020,
+ "name": "战神勋章",
+ "rarity": 5,
+ "price": 464,
+ "modifiers": [
+ {
+ "key": 5,
+ "value": 150,
+ "isPercent": true
+ },
+ {
+ "key": 3,
+ "value": 29,
+ "isPercent": false
+ },
+ {
+ "key": 4,
+ "value": 27,
+ "isPercent": false
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/Assets/GameMain/DataTables/tbpropconfig.json.meta b/Assets/GameMain/DataTables/tbpropconfig.json.meta
new file mode 100644
index 0000000..3f6975b
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbpropconfig.json.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: fd4e6b4c609edf242a9f07964bdd963d
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tbroleconfig.bytes b/Assets/GameMain/DataTables/tbroleconfig.bytes
new file mode 100644
index 0000000..b30b063
Binary files /dev/null and b/Assets/GameMain/DataTables/tbroleconfig.bytes differ
diff --git a/Assets/GameMain/DataTables/tbroleconfig.bytes.meta b/Assets/GameMain/DataTables/tbroleconfig.bytes.meta
new file mode 100644
index 0000000..ece2859
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbroleconfig.bytes.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 7456d83d63724fd41a3f4ea54fece6a8
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tbroleconfig.json b/Assets/GameMain/DataTables/tbroleconfig.json
new file mode 100644
index 0000000..1729b1d
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbroleconfig.json
@@ -0,0 +1,31 @@
+[
+ {
+ "name": "全能者",
+ "maxHealth": 100,
+ "speed": 6,
+ "coin": 10,
+ "modifiers": [
+ {
+ "key": 2,
+ "value": 500,
+ "isPercent": true
+ },
+ {
+ "key": 1,
+ "value": 200,
+ "isPercent": true
+ }
+ ],
+ "initialItems": [],
+ "prefab": "Player"
+ },
+ {
+ "name": "老人",
+ "maxHealth": 200,
+ "speed": 4,
+ "coin": 5,
+ "modifiers": [],
+ "initialItems": [],
+ "prefab": "Player"
+ }
+]
\ No newline at end of file
diff --git a/Assets/GameMain/DataTables/tbroleconfig.json.meta b/Assets/GameMain/DataTables/tbroleconfig.json.meta
new file mode 100644
index 0000000..5bc1d04
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbroleconfig.json.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 2fe2aad193827b44b8720e458e85119f
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tbsceneconfig.bytes b/Assets/GameMain/DataTables/tbsceneconfig.bytes
new file mode 100644
index 0000000..048f97b
Binary files /dev/null and b/Assets/GameMain/DataTables/tbsceneconfig.bytes differ
diff --git a/Assets/GameMain/DataTables/tbsceneconfig.bytes.meta b/Assets/GameMain/DataTables/tbsceneconfig.bytes.meta
new file mode 100644
index 0000000..8642b16
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbsceneconfig.bytes.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: c80cd1bf6fe63204995d43942c964a81
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tbsceneconfig.json b/Assets/GameMain/DataTables/tbsceneconfig.json
new file mode 100644
index 0000000..29f080d
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbsceneconfig.json
@@ -0,0 +1,22 @@
+[
+ {
+ "id": 1,
+ "assetName": "Menu",
+ "backgroundMusicId": 1
+ },
+ {
+ "id": 2,
+ "assetName": "Main",
+ "backgroundMusicId": 2
+ },
+ {
+ "id": 3,
+ "assetName": "StressTest",
+ "backgroundMusicId": 0
+ },
+ {
+ "id": 4,
+ "assetName": "Game",
+ "backgroundMusicId": 0
+ }
+]
\ No newline at end of file
diff --git a/Assets/GameMain/DataTables/tbsceneconfig.json.meta b/Assets/GameMain/DataTables/tbsceneconfig.json.meta
new file mode 100644
index 0000000..eb08652
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbsceneconfig.json.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 2e3f9973612afe3428bbdee83327b95e
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tbsoundconfig.bytes b/Assets/GameMain/DataTables/tbsoundconfig.bytes
new file mode 100644
index 0000000..2337b73
Binary files /dev/null and b/Assets/GameMain/DataTables/tbsoundconfig.bytes differ
diff --git a/Assets/GameMain/DataTables/tbsoundconfig.bytes.meta b/Assets/GameMain/DataTables/tbsoundconfig.bytes.meta
new file mode 100644
index 0000000..05ad37e
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbsoundconfig.bytes.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: f774609ceb87ba242860fd2bca3f8c7e
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tbsoundconfig.json b/Assets/GameMain/DataTables/tbsoundconfig.json
new file mode 100644
index 0000000..a3a9050
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbsoundconfig.json
@@ -0,0 +1,52 @@
+[
+ {
+ "id": 10000,
+ "name": "玩家子弹",
+ "assetName": "weapon_player",
+ "priority": 0,
+ "loop": false,
+ "volume": 1,
+ "spatialBlend": 0,
+ "maxDistance": 100
+ },
+ {
+ "id": 10001,
+ "name": "敌人子弹",
+ "assetName": "weapon_enemy",
+ "priority": 0,
+ "loop": false,
+ "volume": 1,
+ "spatialBlend": 0,
+ "maxDistance": 100
+ },
+ {
+ "id": 20000,
+ "name": "玩家爆炸",
+ "assetName": "explosion_player",
+ "priority": 0,
+ "loop": false,
+ "volume": 1,
+ "spatialBlend": 0,
+ "maxDistance": 100
+ },
+ {
+ "id": 20001,
+ "name": "敌人爆炸",
+ "assetName": "explosion_enemy",
+ "priority": 0,
+ "loop": false,
+ "volume": 1,
+ "spatialBlend": 0,
+ "maxDistance": 100
+ },
+ {
+ "id": 20002,
+ "name": "小行星爆炸",
+ "assetName": "explosion_asteroid",
+ "priority": 0,
+ "loop": false,
+ "volume": 1,
+ "spatialBlend": 0,
+ "maxDistance": 100
+ }
+]
\ No newline at end of file
diff --git a/Assets/GameMain/DataTables/tbsoundconfig.json.meta b/Assets/GameMain/DataTables/tbsoundconfig.json.meta
new file mode 100644
index 0000000..979ec68
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbsoundconfig.json.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: f6985e55f5d7d8340a20469458a322aa
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tbspriteconfig.bytes b/Assets/GameMain/DataTables/tbspriteconfig.bytes
new file mode 100644
index 0000000..f76dd23
Binary files /dev/null and b/Assets/GameMain/DataTables/tbspriteconfig.bytes differ
diff --git a/Assets/GameMain/DataTables/tbspriteconfig.bytes.meta b/Assets/GameMain/DataTables/tbspriteconfig.bytes.meta
new file mode 100644
index 0000000..2a4ffad
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbspriteconfig.bytes.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 6eb54a506884f5f4cae28dda00621b99
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tbspriteconfig.json b/Assets/GameMain/DataTables/tbspriteconfig.json
new file mode 100644
index 0000000..0637a08
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbspriteconfig.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/Assets/GameMain/DataTables/tbspriteconfig.json.meta b/Assets/GameMain/DataTables/tbspriteconfig.json.meta
new file mode 100644
index 0000000..b4bf2b7
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbspriteconfig.json.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 743019ea56b594149a9d5ef429112715
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tbuiformconfig.bytes b/Assets/GameMain/DataTables/tbuiformconfig.bytes
new file mode 100644
index 0000000..f57af2d
Binary files /dev/null and b/Assets/GameMain/DataTables/tbuiformconfig.bytes differ
diff --git a/Assets/GameMain/DataTables/tbuiformconfig.bytes.meta b/Assets/GameMain/DataTables/tbuiformconfig.bytes.meta
new file mode 100644
index 0000000..e08e1df
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbuiformconfig.bytes.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 2dc7693ba236dae4a917dae46fd9a69f
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tbuiformconfig.json b/Assets/GameMain/DataTables/tbuiformconfig.json
new file mode 100644
index 0000000..ce99475
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbuiformconfig.json
@@ -0,0 +1,79 @@
+[
+ {
+ "id": 1,
+ "assetName": "DialogForm",
+ "UIGroupName": "Default",
+ "allowMultiInstance": true,
+ "pauseCoveredUIForm": true
+ },
+ {
+ "id": 100,
+ "assetName": "MenuForm",
+ "UIGroupName": "Default",
+ "allowMultiInstance": false,
+ "pauseCoveredUIForm": true
+ },
+ {
+ "id": 101,
+ "assetName": "SettingForm",
+ "UIGroupName": "Default",
+ "allowMultiInstance": false,
+ "pauseCoveredUIForm": true
+ },
+ {
+ "id": 102,
+ "assetName": "AboutForm",
+ "UIGroupName": "Default",
+ "allowMultiInstance": false,
+ "pauseCoveredUIForm": true
+ },
+ {
+ "id": 103,
+ "assetName": "StartMenuForm",
+ "UIGroupName": "Default",
+ "allowMultiInstance": false,
+ "pauseCoveredUIForm": true
+ },
+ {
+ "id": 104,
+ "assetName": "SelectRoleForm",
+ "UIGroupName": "Default",
+ "allowMultiInstance": false,
+ "pauseCoveredUIForm": true
+ },
+ {
+ "id": 105,
+ "assetName": "ShopForm",
+ "UIGroupName": "Default",
+ "allowMultiInstance": false,
+ "pauseCoveredUIForm": true
+ },
+ {
+ "id": 106,
+ "assetName": "HudForm",
+ "UIGroupName": "HUD",
+ "allowMultiInstance": false,
+ "pauseCoveredUIForm": true
+ },
+ {
+ "id": 107,
+ "assetName": "LevelUpForm",
+ "UIGroupName": "Default",
+ "allowMultiInstance": false,
+ "pauseCoveredUIForm": true
+ },
+ {
+ "id": 108,
+ "assetName": "ItemTooltipForm",
+ "UIGroupName": "Default",
+ "allowMultiInstance": false,
+ "pauseCoveredUIForm": false
+ },
+ {
+ "id": 109,
+ "assetName": "JoystickForm",
+ "UIGroupName": "Default",
+ "allowMultiInstance": false,
+ "pauseCoveredUIForm": false
+ }
+]
\ No newline at end of file
diff --git a/Assets/GameMain/DataTables/tbuiformconfig.json.meta b/Assets/GameMain/DataTables/tbuiformconfig.json.meta
new file mode 100644
index 0000000..ab734fc
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbuiformconfig.json.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 26b7693616d1ae142a820ca189fceaae
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tbuisoundconfig.bytes b/Assets/GameMain/DataTables/tbuisoundconfig.bytes
new file mode 100644
index 0000000..43f6cf4
Binary files /dev/null and b/Assets/GameMain/DataTables/tbuisoundconfig.bytes differ
diff --git a/Assets/GameMain/DataTables/tbuisoundconfig.bytes.meta b/Assets/GameMain/DataTables/tbuisoundconfig.bytes.meta
new file mode 100644
index 0000000..d316407
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbuisoundconfig.bytes.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 2d905599c9e1bda40b300ef2a0815aa9
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tbuisoundconfig.json b/Assets/GameMain/DataTables/tbuisoundconfig.json
new file mode 100644
index 0000000..4977efc
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbuisoundconfig.json
@@ -0,0 +1,14 @@
+[
+ {
+ "id": 10000,
+ "assetName": "select",
+ "priority": 0,
+ "volume": 1
+ },
+ {
+ "id": 10001,
+ "assetName": "click",
+ "priority": 0,
+ "volume": 1
+ }
+]
\ No newline at end of file
diff --git a/Assets/GameMain/DataTables/tbuisoundconfig.json.meta b/Assets/GameMain/DataTables/tbuisoundconfig.json.meta
new file mode 100644
index 0000000..5038835
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbuisoundconfig.json.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 27ed926b74c11814e9dcd3117dc7bead
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tbweaponconfig.bytes b/Assets/GameMain/DataTables/tbweaponconfig.bytes
new file mode 100644
index 0000000..acda727
Binary files /dev/null and b/Assets/GameMain/DataTables/tbweaponconfig.bytes differ
diff --git a/Assets/GameMain/DataTables/tbweaponconfig.bytes.meta b/Assets/GameMain/DataTables/tbweaponconfig.bytes.meta
new file mode 100644
index 0000000..c57295e
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbweaponconfig.bytes.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: bc2fdc7a4bbc5dd4c93b60e6d49fbbc7
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DataTables/tbweaponconfig.json b/Assets/GameMain/DataTables/tbweaponconfig.json
new file mode 100644
index 0000000..b95c31c
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbweaponconfig.json
@@ -0,0 +1,95 @@
+[
+ {
+ "id": 1001,
+ "name": "小刀",
+ "rarity": 1,
+ "price": 120,
+ "attack": 100,
+ "cooldown": 1500,
+ "attackRange": 5000,
+ "attackSoundId": 10000,
+ "parameters": [
+ [
+ 1,
+ 2000
+ ]
+ ],
+ "modifiers": [],
+ "prefab": "WeaponKnife"
+ },
+ {
+ "id": 1002,
+ "name": "手枪",
+ "rarity": 1,
+ "price": 130,
+ "attack": 120,
+ "cooldown": 1000,
+ "attackRange": 15000,
+ "attackSoundId": 10000,
+ "parameters": [],
+ "modifiers": [],
+ "prefab": "WeaponHandgun"
+ },
+ {
+ "id": 1003,
+ "name": "斧头",
+ "rarity": 1,
+ "price": 100,
+ "attack": 150,
+ "cooldown": 2000,
+ "attackRange": 5000,
+ "attackSoundId": 10000,
+ "parameters": [
+ [
+ 2,
+ 120
+ ]
+ ],
+ "modifiers": [],
+ "prefab": "WeaponSlash"
+ },
+ {
+ "id": 1004,
+ "name": "闪电",
+ "rarity": 1,
+ "price": 150,
+ "attack": 80,
+ "cooldown": 3000,
+ "attackRange": 12000,
+ "attackSoundId": 10000,
+ "parameters": [
+ [
+ 1,
+ 3000
+ ]
+ ],
+ "modifiers": [],
+ "prefab": "WeaponLightning"
+ },
+ {
+ "id": 1005,
+ "name": "长枪",
+ "rarity": 1,
+ "price": 100,
+ "attack": 100,
+ "cooldown": 1500,
+ "attackRange": 5000,
+ "attackSoundId": 10000,
+ "parameters": [
+ [
+ 3,
+ 700
+ ],
+ [
+ 4,
+ 4500
+ ],
+ [
+ 5,
+ 500
+ ]
+ ],
+ "modifiers": [],
+ "prefab": "WeaponLance"
+ }
+]
\ No newline at end of file
diff --git a/Assets/GameMain/DataTables/tbweaponconfig.json.meta b/Assets/GameMain/DataTables/tbweaponconfig.json.meta
new file mode 100644
index 0000000..9e04856
--- /dev/null
+++ b/Assets/GameMain/DataTables/tbweaponconfig.json.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: ef5fdcfaabb6416449b65150b0b795c9
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/DebugPanel/RuntimeDebugPanelComponent.cs b/Assets/GameMain/DebugPanel/RuntimeDebugPanelComponent.cs
index ba69441..7658ada 100644
--- a/Assets/GameMain/DebugPanel/RuntimeDebugPanelComponent.cs
+++ b/Assets/GameMain/DebugPanel/RuntimeDebugPanelComponent.cs
@@ -1,7 +1,6 @@
using System;
using System.Linq;
using SepCore.Event;
-using SepCore.DataTable;
using SepCore.Definition;
using SepCore.Entity;
using SepCore.Components;
@@ -49,8 +48,8 @@ public class RuntimeDebugPanelComponent : MonoBehaviour
private float _spawnRateScaleInput = 1f;
private float _extendDurationSeconds = 30f;
- private DRProp[] _allProps = Array.Empty();
- private DRProp[] _filteredProps = Array.Empty();
+ private PropConfig[] _allProps = Array.Empty();
+ private PropConfig[] _filteredProps = Array.Empty();
private string[] _displayNames = Array.Empty();
private int _cornerTapCount;
@@ -210,7 +209,7 @@ public class RuntimeDebugPanelComponent : MonoBehaviour
_selectedIndex = GUILayout.SelectionGrid(_selectedIndex, _displayNames, 1);
GUILayout.EndScrollView();
- DRProp selectedProp = GetSelectedProp();
+ PropConfig selectedProp = GetSelectedProp();
if (selectedProp == null) return;
GUILayout.Label($"Selected: {selectedProp.Title} ({selectedProp.Rarity})");
@@ -400,16 +399,16 @@ public class RuntimeDebugPanelComponent : MonoBehaviour
{
if (!force && _allProps != null && _allProps.Length > 0) return;
- if (GameEntry.DataTable == null)
+ if (GameEntry.Luban == null)
{
- _allProps = Array.Empty();
- _filteredProps = Array.Empty();
+ _allProps = Array.Empty();
+ _filteredProps = Array.Empty();
_displayNames = Array.Empty();
return;
}
- var table = GameEntry.DataTable.GetDataTable();
- _allProps = table != null ? table.ToArray() : Array.Empty();
+ var table = GameEntry.Luban.GetTable();
+ _allProps = table != null ? table.ToArray() : Array.Empty();
_selectedIndex = Mathf.Clamp(_selectedIndex, 0, Mathf.Max(0, _allProps.Length - 1));
ApplyFilter(_searchText);
}
@@ -418,7 +417,7 @@ public class RuntimeDebugPanelComponent : MonoBehaviour
{
if (_allProps == null || _allProps.Length == 0)
{
- _filteredProps = Array.Empty();
+ _filteredProps = Array.Empty();
_displayNames = Array.Empty();
return;
}
@@ -441,7 +440,7 @@ public class RuntimeDebugPanelComponent : MonoBehaviour
else _selectedIndex = Mathf.Clamp(_selectedIndex, 0, _displayNames.Length - 1);
}
- private DRProp GetSelectedProp()
+ private PropConfig GetSelectedProp()
{
if (_filteredProps == null || _filteredProps.Length == 0) return null;
_selectedIndex = Mathf.Clamp(_selectedIndex, 0, _filteredProps.Length - 1);
@@ -499,7 +498,7 @@ public class RuntimeDebugPanelComponent : MonoBehaviour
PlayerHealthChangeEventArgs.Create(0, playerHealth.CurrentHealth, playerHealth.MaxHealth));
}
- private static void AddSelectedBuffToPlayer(DRProp prop, int count)
+ private static void AddSelectedBuffToPlayer(PropConfig prop, int count)
{
Player player = FindPlayer();
if (player == null || prop == null || prop.Modifiers == null) return;
@@ -507,7 +506,7 @@ public class RuntimeDebugPanelComponent : MonoBehaviour
int applyCount = Mathf.Clamp(count, 1, 99);
for (int i = 0; i < applyCount; i++)
{
- player.AddProp(new PropItem(prop.Modifiers, prop.Rarity, prop.Title, prop.IconAssetName));
+ player.AddProp(new PropItem(prop));
}
}
diff --git a/Assets/GameMain/Scripts/Base/DataTable/BinaryReaderExtension.cs b/Assets/GameMain/Scripts/Base/DataTable/BinaryReaderExtension.cs
deleted file mode 100644
index edf3917..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/BinaryReaderExtension.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-using System;
-using System.IO;
-using UnityEngine;
-
-namespace SepCore.DataTable
-{
- public static class BinaryReaderExtension
- {
- public static Color32 ReadColor32(this BinaryReader binaryReader)
- {
- return new Color32(binaryReader.ReadByte(), binaryReader.ReadByte(), binaryReader.ReadByte(), binaryReader.ReadByte());
- }
-
- public static Color ReadColor(this BinaryReader binaryReader)
- {
- return new Color(binaryReader.ReadSingle(), binaryReader.ReadSingle(), binaryReader.ReadSingle(), binaryReader.ReadSingle());
- }
-
- public static DateTime ReadDateTime(this BinaryReader binaryReader)
- {
- return new DateTime(binaryReader.ReadInt64());
- }
-
- public static Quaternion ReadQuaternion(this BinaryReader binaryReader)
- {
- return new Quaternion(binaryReader.ReadSingle(), binaryReader.ReadSingle(), binaryReader.ReadSingle(), binaryReader.ReadSingle());
- }
-
- public static Rect ReadRect(this BinaryReader binaryReader)
- {
- return new Rect(binaryReader.ReadSingle(), binaryReader.ReadSingle(), binaryReader.ReadSingle(), binaryReader.ReadSingle());
- }
-
- public static Vector2 ReadVector2(this BinaryReader binaryReader)
- {
- return new Vector2(binaryReader.ReadSingle(), binaryReader.ReadSingle());
- }
-
- public static Vector3 ReadVector3(this BinaryReader binaryReader)
- {
- return new Vector3(binaryReader.ReadSingle(), binaryReader.ReadSingle(), binaryReader.ReadSingle());
- }
-
- public static Vector4 ReadVector4(this BinaryReader binaryReader)
- {
- return new Vector4(binaryReader.ReadSingle(), binaryReader.ReadSingle(), binaryReader.ReadSingle(), binaryReader.ReadSingle());
- }
- }
-}
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DRBullet.cs b/Assets/GameMain/Scripts/Base/DataTable/DRBullet.cs
deleted file mode 100644
index 0575a4c..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DRBullet.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-using UnityGameFramework.Runtime;
-
-namespace SepCore.DataTable
-{
- ///
- /// Bullet config table.
- /// Id uses BulletType value.
- ///
- public class DRBullet : DataRowBase
- {
- private int m_Id;
-
- public override int Id => m_Id;
-
- ///
- /// 子弹实体 Id,用于在 DREntity 中查询资源路径
- ///
- public int EntityTypeId { get; private set; }
-
- ///
- /// 子弹速度
- ///
- public float Speed { get; private set; }
-
- ///
- /// 子弹生存时间
- ///
- public float MaxAliveTime { get; private set; }
-
- public override bool ParseDataRow(string dataRowString, object userData)
- {
- string[] columnStrings = dataRowString.Split(DataTableExtension.DataSplitSeparators);
-
- int index = 0;
- index++;
- m_Id = int.Parse(columnStrings[index++]);
- index++;
- EntityTypeId = int.Parse(columnStrings[index++]);
- Speed = float.Parse(columnStrings[index++]);
- MaxAliveTime = float.Parse(columnStrings[index++]);
- return true;
- }
- }
-}
\ No newline at end of file
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DREnemy.cs b/Assets/GameMain/Scripts/Base/DataTable/DREnemy.cs
deleted file mode 100644
index 31a6ca7..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DREnemy.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-using System;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityGameFramework.Runtime;
-
-namespace SepCore.DataTable
-{
- public class DREnemy : DataRowBase
- {
- private int m_id;
-
- public override int Id => m_id;
-
- public int EntityTypeId { get; private set; }
-
- public int MaxHealth { get; private set; }
-
- public int HpAddPerLevel { get; private set; }
-
- public int AttackDamage { get; private set; }
-
- public float AttackCooldown { get; private set; }
-
- public float AttackRange { get; private set; }
-
- public float Speed { get; private set; }
-
- public int DropCoin { get; private set; }
-
- public int DropExp { get; private set; }
-
- public float DropPercent { get; private set; }
-
- public float Scale { get; private set; } = 1f;
-
- public Color Color { get; private set; } = Color.white;
-
- public Dictionary Params { get; private set; }
-
- public override bool ParseDataRow(string dataRowString, object userData)
- {
- string[] columnStrings = dataRowString.Split(DataTableExtension.DataSplitSeparators);
-
- int index = 0;
- index++;
- m_id = int.Parse(columnStrings[index++]);
- index++;
- EntityTypeId = int.Parse(columnStrings[index++]);
- MaxHealth = int.Parse(columnStrings[index++]);
- HpAddPerLevel = int.Parse(columnStrings[index++]);
- AttackDamage = int.Parse(columnStrings[index++]);
- AttackCooldown = float.Parse(columnStrings[index++]);
- AttackRange = float.Parse(columnStrings[index++]);
- Speed = float.Parse(columnStrings[index++]);
- DropCoin = int.Parse(columnStrings[index++]);
- DropExp = int.Parse(columnStrings[index++]);
- DropPercent = float.Parse(columnStrings[index++]);
- Scale = float.Parse(columnStrings[index++]);
- Color = ParseColor(columnStrings[index++]);
- Params = DeserializeParams(columnStrings[index++]);
-
- return true;
- }
-
- private static Color ParseColor(string raw)
- {
- if (ColorUtility.TryParseHtmlString(raw.Trim(), out Color color))
- {
- return color;
- }
-
- return Color.white;
- }
-
- private Dictionary DeserializeParams(string rawParams)
- {
- if (!rawParams.StartsWith('[') || !rawParams.EndsWith(']'))
- {
- throw new ArgumentException("Input must be enclosed in square brackets.");
- }
-
- var dict = new Dictionary();
-
- if (string.IsNullOrEmpty(rawParams)) return dict;
-
- string[] items = rawParams.Substring(1, rawParams.Length - 2).Split(";");
- foreach (var item in items)
- {
- string entry = item.Trim();
- if (string.IsNullOrEmpty(entry)) continue;
-
- string[] pair = entry.Split(':', StringSplitOptions.RemoveEmptyEntries);
- if (pair.Length != 2) continue;
- dict.Add(pair[0].ToLower(), pair[1]);
- }
-
- return dict;
- }
- }
-}
\ No newline at end of file
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DREnemy.cs.meta b/Assets/GameMain/Scripts/Base/DataTable/DREnemy.cs.meta
deleted file mode 100644
index d82e619..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DREnemy.cs.meta
+++ /dev/null
@@ -1,3 +0,0 @@
-fileFormatVersion: 2
-guid: 65140fe454964f14951a73965686fb0e
-timeCreated: 1769221617
\ No newline at end of file
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DREntity.cs b/Assets/GameMain/Scripts/Base/DataTable/DREntity.cs
deleted file mode 100644
index 73cb233..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DREntity.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-using System.IO;
-using System.Text;
-using UnityGameFramework.Runtime;
-
-namespace SepCore.DataTable
-{
- ///
- /// 实体表。
- ///
- public class DREntity : DataRowBase
- {
- private int m_Id = 0;
-
- ///
- /// 获取实体编号。
- ///
- public override int Id
- {
- get { return m_Id; }
- }
-
- ///
- /// 获取资源名称。
- ///
- public string AssetName { get; private set; }
-
- public override bool ParseDataRow(string dataRowString, object userData)
- {
- string[] columnStrings = dataRowString.Split(DataTableExtension.DataSplitSeparators);
- for (int i = 0; i < columnStrings.Length; i++)
- {
- columnStrings[i] = columnStrings[i].Trim(DataTableExtension.DataTrimSeparators);
- }
-
- int index = 0;
- index++;
- m_Id = int.Parse(columnStrings[index++]);
- index++;
- AssetName = columnStrings[index++];
-
- GeneratePropertyArray();
- return true;
- }
-
- public override bool ParseDataRow(byte[] dataRowBytes, int startIndex, int length, object userData)
- {
- using (MemoryStream memoryStream = new MemoryStream(dataRowBytes, startIndex, length, false))
- {
- using (BinaryReader binaryReader = new BinaryReader(memoryStream, Encoding.UTF8))
- {
- m_Id = binaryReader.Read7BitEncodedInt32();
- AssetName = binaryReader.ReadString();
- }
- }
-
- GeneratePropertyArray();
- return true;
- }
-
- private void GeneratePropertyArray()
- {
- }
- }
-}
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DREntity.cs.meta b/Assets/GameMain/Scripts/Base/DataTable/DREntity.cs.meta
deleted file mode 100644
index 8b5f55b..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DREntity.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: a48a9c6b974d6674f8a0421fc603dc56
-timeCreated: 1528026147
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DRGoods.cs b/Assets/GameMain/Scripts/Base/DataTable/DRGoods.cs
deleted file mode 100644
index 8f82759..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DRGoods.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-using SepCore.Definition;
-using SepCore.CustomUtility;
-using UnityGameFramework.Runtime;
-
-namespace SepCore.DataTable
-{
- public class DRGoods : DataRowBase
- {
- private int m_Id = 0;
-
- ///
- /// 获取商品Id。
- ///
- public override int Id => m_Id;
-
- ///
- /// 获取商品类型。
- ///
- public GoodsType GoodsType { get; private set; }
-
- ///
- /// 获取商品对应具体类型的表Id
- ///
- public int GoodsTypeId { get; set; }
-
- public override bool ParseDataRow(string dataRowString, object userData)
- {
- string[] fields = dataRowString.Split(DataTableExtension.DataSplitSeparators);
-
- int index = 0;
-
- index++;
- m_Id = int.Parse(fields[index++]);
- index++;
- GoodsType = EnumUtility.Get(fields[index++]);
- GoodsTypeId = int.Parse(fields[index++]);
-
- return true;
- }
- }
-}
\ No newline at end of file
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DRLevel.cs b/Assets/GameMain/Scripts/Base/DataTable/DRLevel.cs
deleted file mode 100644
index 5bbd196..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DRLevel.cs
+++ /dev/null
@@ -1,109 +0,0 @@
-using System;
-using SepCore.CustomUtility;
-using SepCore.Definition;
-using UnityGameFramework.Runtime;
-
-namespace SepCore.DataTable
-{
- public class DRLevel : DataRowBase
- {
- private int m_Id = 0;
-
- ///
- /// 获取关卡编号。
- ///
- public override int Id => m_Id;
-
- ///
- /// 获取关卡内会生成的实体编号
- ///
- public EnemyType[] EntityTypes { get; private set; }
-
- ///
- /// 获取关卡内每次生成实体的数量
- ///
- public int[] EntityCounts { get; private set; }
-
- ///
- /// 获取关卡内生成实体的间隔时间
- ///
- public float[] Intervals { get; private set; }
-
- ///
- /// 获取关卡时间。
- ///
- public int Duration { get; private set; }
-
- public override bool ParseDataRow(string dataRowString, object userData)
- {
- string[] columnStrings = dataRowString.Split(DataTableExtension.DataSplitSeparators);
-
- int index = 0;
- index++;
- m_Id = int.Parse(columnStrings[index++]);
- index++;
- GenerateEntityTypes(columnStrings[index++]);
- GenerateEntityCounts(columnStrings[index++]);
- GenerateIntervals(columnStrings[index++]);
- Duration = int.Parse(columnStrings[index++]);
-
- GeneratePropertyArray();
- return true;
- }
-
- private void GeneratePropertyArray()
- {
- }
-
- private void GenerateEntityTypes(string raw)
- {
- if (!raw.StartsWith('[') || !raw.EndsWith(']'))
- {
- throw new ArgumentException("Input must be enclosed in square brackets.");
- }
-
- if (raw.Length == 2) return;
- string[] entityIds = raw.Substring(1, raw.Length - 2).Split(",");
- int length = entityIds.Length;
- EntityTypes = new EnemyType[length];
- for (int i = 0; i < length; i++)
- {
- EntityTypes[i] = EnumUtility.Get(entityIds[i]);
- }
- }
-
- private void GenerateEntityCounts(string raw)
- {
- if (!raw.StartsWith('[') || !raw.EndsWith(']'))
- {
- throw new ArgumentException("Input must be enclosed in square brackets.");
- }
-
- if (raw.Length == 2) return;
- string[] entityCounts = raw.Substring(1, raw.Length - 2).Split(",");
- int length = entityCounts.Length;
- EntityCounts = new int[length];
- for (int i = 0; i < length; i++)
- {
- EntityCounts[i] = int.Parse(entityCounts[i]);
- }
- }
-
- private void GenerateIntervals(string raw)
- {
- if (!raw.StartsWith('[') || !raw.EndsWith(']'))
- {
- throw new ArgumentException("Input must be enclosed in square brackets.");
- }
-
- if (raw.Length == 2) return;
- string[] intervals = raw.Substring(1, raw.Length - 2).Split(",");
- int length = intervals.Length;
- Intervals = new float[length];
- for (int i = 0; i < length; i++)
- {
- Intervals[i] = float.Parse(intervals[i]);
- }
- }
- }
-}
\ No newline at end of file
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DRLevel.cs.meta b/Assets/GameMain/Scripts/Base/DataTable/DRLevel.cs.meta
deleted file mode 100644
index 708d598..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DRLevel.cs.meta
+++ /dev/null
@@ -1,3 +0,0 @@
-fileFormatVersion: 2
-guid: d2c6e5a5e57b464397483dd1f164ddf8
-timeCreated: 1769159930
\ No newline at end of file
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DRLevelRarity.cs b/Assets/GameMain/Scripts/Base/DataTable/DRLevelRarity.cs
deleted file mode 100644
index 1da0178..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DRLevelRarity.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using UnityGameFramework.Runtime;
-
-namespace SepCore.DataTable
-{
- public class DRLevelRarity : DataRowBase
- {
- private int m_Id;
-
- public override int Id => m_Id;
-
- public int LevelMin { get; private set; }
- public int LevelMax { get; private set; }
-
- public int WhiteWeight { get; private set; }
- public int GreenWeight { get; private set; }
- public int BlueWeight { get; private set; }
- public int PurpleWeight { get; private set; }
- public int RedWeight { get; private set; }
-
- public override bool ParseDataRow(string dataRowString, object userData)
- {
- string[] fields = dataRowString.Split(DataTableExtension.DataSplitSeparators);
-
- int index = 0;
- index++;
- m_Id = int.Parse(fields[index++]);
- index++;
- LevelMin = int.Parse(fields[index++]);
- LevelMax = int.Parse(fields[index++]);
- WhiteWeight = int.Parse(fields[index++]);
- GreenWeight = int.Parse(fields[index++]);
- BlueWeight = int.Parse(fields[index++]);
- PurpleWeight = int.Parse(fields[index++]);
- RedWeight = int.Parse(fields[index++]);
-
- return true;
- }
- }
-}
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DRLevelUpReward.cs b/Assets/GameMain/Scripts/Base/DataTable/DRLevelUpReward.cs
deleted file mode 100644
index a5a8256..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DRLevelUpReward.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using SepCore.Definition;
-using Newtonsoft.Json;
-using SepCore.CustomUtility;
-using UnityGameFramework.Runtime;
-
-namespace SepCore.DataTable
-{
- public class DRLevelUpReward : DataRowBase
- {
- private int m_Id;
-
- public override int Id => m_Id;
-
- public string Title { get; private set; }
-
- public string IconAssetName => $"levelupreward_{m_Id}_icon";
-
- public ItemRarity Rarity { get; private set; }
-
- public StatModifier[] Modifiers { get; private set; }
-
- public override bool ParseDataRow(string dataRowString, object userData)
- {
- string[] fields = dataRowString.Split(DataTableExtension.DataSplitSeparators);
- int index = 0;
-
- index++;
- m_Id = int.Parse(fields[index++]);
- index++;
- Title = fields[index++];
- Rarity = EnumUtility.Get(fields[index++]);
- Modifiers = JsonConvert.DeserializeObject(fields[index++]);
-
- return true;
- }
- }
-}
\ No newline at end of file
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DRLevelUpReward.cs.meta b/Assets/GameMain/Scripts/Base/DataTable/DRLevelUpReward.cs.meta
deleted file mode 100644
index 611c7b7..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DRLevelUpReward.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: d84933d61f76d7942a903b8db26a3ad6
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DRMusic.cs b/Assets/GameMain/Scripts/Base/DataTable/DRMusic.cs
deleted file mode 100644
index 405e97a..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DRMusic.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-using System.IO;
-using System.Text;
-using UnityGameFramework.Runtime;
-
-namespace SepCore.DataTable
-{
- ///
- /// 音乐配置表。
- ///
- public class DRMusic : DataRowBase
- {
- private int m_Id = 0;
-
- ///
- /// 获取音乐编号。
- ///
- public override int Id
- {
- get { return m_Id; }
- }
-
- ///
- /// 获取资源名称。
- ///
- public string AssetName { get; private set; }
-
- public override bool ParseDataRow(string dataRowString, object userData)
- {
- string[] columnStrings = dataRowString.Split(DataTableExtension.DataSplitSeparators);
- for (int i = 0; i < columnStrings.Length; i++)
- {
- columnStrings[i] = columnStrings[i].Trim(DataTableExtension.DataTrimSeparators);
- }
-
- int index = 0;
- index++;
- m_Id = int.Parse(columnStrings[index++]);
- index++;
- AssetName = columnStrings[index++];
-
- GeneratePropertyArray();
- return true;
- }
-
- public override bool ParseDataRow(byte[] dataRowBytes, int startIndex, int length, object userData)
- {
- using (MemoryStream memoryStream = new MemoryStream(dataRowBytes, startIndex, length, false))
- {
- using (BinaryReader binaryReader = new BinaryReader(memoryStream, Encoding.UTF8))
- {
- m_Id = binaryReader.Read7BitEncodedInt32();
- AssetName = binaryReader.ReadString();
- }
- }
-
- GeneratePropertyArray();
- return true;
- }
-
- private void GeneratePropertyArray()
- {
- }
- }
-}
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DRMusic.cs.meta b/Assets/GameMain/Scripts/Base/DataTable/DRMusic.cs.meta
deleted file mode 100644
index 25e33f7..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DRMusic.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 5539646031a664344b90aeb64f92930d
-timeCreated: 1528026147
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DRProp.cs b/Assets/GameMain/Scripts/Base/DataTable/DRProp.cs
deleted file mode 100644
index 0a6ba3a..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DRProp.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using SepCore.Definition;
-using Newtonsoft.Json;
-using SepCore.CustomUtility;
-using UnityGameFramework.Runtime;
-
-namespace SepCore.DataTable
-{
- public class DRProp : DataRowBase
- {
- private int m_Id;
-
- public override int Id => m_Id;
- public string Title { get; private set; }
- public string IconAssetName => $"prop_{m_Id}_icon";
- public ItemRarity Rarity { get; private set; }
- public int Price { get; private set; }
- public float PriceRandomPercent { get; private set; }
- public StatModifier[] Modifiers { get; private set; }
-
- public override bool ParseDataRow(string dataRowString, object userData)
- {
- string[] fields = dataRowString.Split(DataTableExtension.DataSplitSeparators);
- int index = 0;
-
- index++;
- m_Id = int.Parse(fields[index++]);
- index++;
- Title = fields[index++];
- Rarity = EnumUtility.Get(fields[index++]);
- Price = int.Parse(fields[index++]);
- PriceRandomPercent = float.Parse(fields[index++]);
- Modifiers = JsonConvert.DeserializeObject(fields[index++]);
-
- return true;
- }
- }
-}
\ No newline at end of file
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DRProp.cs.meta b/Assets/GameMain/Scripts/Base/DataTable/DRProp.cs.meta
deleted file mode 100644
index 5f1a908..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DRProp.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 84edcc54b1524344a9f7b36d1bf55419
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DRRole.cs b/Assets/GameMain/Scripts/Base/DataTable/DRRole.cs
deleted file mode 100644
index 53c7e59..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DRRole.cs
+++ /dev/null
@@ -1,134 +0,0 @@
-using System;
-using System.Collections.Generic;
-using GameFramework;
-using SepCore.Definition;
-using UnityGameFramework.Runtime;
-
-namespace SepCore.DataTable
-{
- public class DRRole : DataRowBase
- {
- private int m_Id = 0;
-
- ///
- /// 获取角色编号。
- ///
- public override int Id => m_Id;
-
- ///
- /// 获取资源名称。
- ///
- public string RoleName { get; private set; }
-
- ///
- /// 获取图标名称。
- ///
- public string IconName => $"role_{m_Id}_icon";
-
- ///
- /// 获取初始最大生命。
- ///
- public int MaxHealth { get; private set; }
-
- ///
- /// 获取初始速度。
- ///
- public float Speed { get; private set; }
-
- ///
- /// 获取初始金币。
- ///
- public int Coin { get; private set; }
-
- ///
- /// 获取最大持有武器数。
- ///
- public int WeaponCapacity { get; private set; }
-
- ///
- /// 获取初始属性。
- ///
- public StatModifier[] InitialProperties { get; private set; }
-
- ///
- /// 获取初始物品。
- ///
- public KeyValuePair[] InitialItemIds { get; private set; }
-
- public int[] ExpRequires { get; private set; }
-
- public override bool ParseDataRow(string dataRowString, object userData)
- {
- string[] columnStrings = dataRowString.Split(DataTableExtension.DataSplitSeparators);
-
- int index = 0;
- index++;
- m_Id = int.Parse(columnStrings[index++]);
- index++;
- RoleName = columnStrings[index++];
- MaxHealth = int.Parse(columnStrings[index++]);
- Speed = float.Parse(columnStrings[index++]);
- Coin = int.Parse(columnStrings[index++]);
- WeaponCapacity = int.Parse(columnStrings[index++]);
- InitialProperties = Utility.Json.ToObject(columnStrings[index++]);
- GenerateItems(columnStrings[index++]);
- GenerateExpRequires(ref columnStrings, index);
-
- GeneratePropertyArray();
- return true;
- }
-
- private void GeneratePropertyArray()
- {
- }
-
- private void GenerateItems(string raw)
- {
- if (!raw.StartsWith('[') || !raw.EndsWith(']'))
- {
- throw new ArgumentException("Input must be enclosed in square brackets.");
- }
-
- if (raw.Length <= 2) return;
-
- string[] items = raw.Substring(1, raw.Length - 2).Split(";");
- int length = items.Length;
- InitialItemIds = new KeyValuePair[length];
- for (int i = 0; i < length; i++)
- {
- string input = items[i];
- if (string.IsNullOrEmpty(input))
- {
- Log.Warning("Invalid item: {0}", input);
- continue;
- }
-
- if (!input.StartsWith('[') || !input.EndsWith(']'))
- {
- throw new ArgumentException("Input must be enclosed in square brackets.");
- }
-
- string inner = input.Substring(1, input.Length - 2);
-
- // 如果是空列表 "[]"
- if (inner.Length == 0) continue;
-
- string[] index = inner.Split(",");
- var item = new KeyValuePair(int.Parse(index[0]), int.Parse(index[1]));
- InitialItemIds[i] = item;
- }
- }
-
- private void GenerateExpRequires(ref string[] columnStrings, int index)
- {
- List expRequires = new List();
- int baseExp = int.Parse(columnStrings[index]);
- for (int i = index; i < columnStrings.Length; i++)
- {
- expRequires.Add(int.Parse(columnStrings[i]) - baseExp);
- }
-
- ExpRequires = expRequires.ToArray();
- }
- }
-}
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DRRole.cs.meta b/Assets/GameMain/Scripts/Base/DataTable/DRRole.cs.meta
deleted file mode 100644
index 10d0e31..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DRRole.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: d596bc33ed84659449059b972a2c4e26
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DRScene.cs b/Assets/GameMain/Scripts/Base/DataTable/DRScene.cs
deleted file mode 100644
index 1f43df3..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DRScene.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-using System.IO;
-using System.Text;
-using UnityGameFramework.Runtime;
-
-namespace SepCore.DataTable
-{
- ///
- /// 场景配置表。
- ///
- public class DRScene : DataRowBase
- {
- private int m_Id = 0;
-
- ///
- /// 获取场景编号。
- ///
- public override int Id
- {
- get { return m_Id; }
- }
-
- ///
- /// 获取资源名称。
- ///
- public string AssetName { get; private set; }
-
- ///
- /// 获取背景音乐编号。
- ///
- public int BackgroundMusicId { get; private set; }
-
- public override bool ParseDataRow(string dataRowString, object userData)
- {
- string[] columnStrings = dataRowString.Split(DataTableExtension.DataSplitSeparators);
- for (int i = 0; i < columnStrings.Length; i++)
- {
- columnStrings[i] = columnStrings[i].Trim(DataTableExtension.DataTrimSeparators);
- }
-
- int index = 0;
- index++;
- m_Id = int.Parse(columnStrings[index++]);
- index++;
- AssetName = columnStrings[index++];
- BackgroundMusicId = int.Parse(columnStrings[index++]);
-
- GeneratePropertyArray();
- return true;
- }
-
- public override bool ParseDataRow(byte[] dataRowBytes, int startIndex, int length, object userData)
- {
- using (MemoryStream memoryStream = new MemoryStream(dataRowBytes, startIndex, length, false))
- {
- using (BinaryReader binaryReader = new BinaryReader(memoryStream, Encoding.UTF8))
- {
- m_Id = binaryReader.Read7BitEncodedInt32();
- AssetName = binaryReader.ReadString();
- BackgroundMusicId = binaryReader.Read7BitEncodedInt32();
- }
- }
-
- GeneratePropertyArray();
- return true;
- }
-
- private void GeneratePropertyArray()
- {
- }
- }
-}
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DRScene.cs.meta b/Assets/GameMain/Scripts/Base/DataTable/DRScene.cs.meta
deleted file mode 100644
index 3183a7f..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DRScene.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 0ce61902e6e3c23409f9ef10ccc8c550
-timeCreated: 1528026147
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DRSound.cs b/Assets/GameMain/Scripts/Base/DataTable/DRSound.cs
deleted file mode 100644
index 681bfba..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DRSound.cs
+++ /dev/null
@@ -1,99 +0,0 @@
-using System.IO;
-using System.Text;
-using UnityGameFramework.Runtime;
-
-namespace SepCore.DataTable
-{
- ///
- /// 声音配置表。
- ///
- public class DRSound : DataRowBase
- {
- private int m_Id = 0;
-
- ///
- /// 获取声音编号。
- ///
- public override int Id
- {
- get { return m_Id; }
- }
-
- ///
- /// 获取资源名称。
- ///
- public string AssetName { get; private set; }
-
- ///
- /// 获取优先级(默认0,128最高,-128最低)。
- ///
- public int Priority { get; private set; }
-
- ///
- /// 获取是否循环。
- ///
- public bool Loop { get; private set; }
-
- ///
- /// 获取音量(0~1)。
- ///
- public float Volume { get; private set; }
-
- ///
- /// 获取声音空间混合量(0为2D,1为3D,中间值混合效果)。
- ///
- public float SpatialBlend { get; private set; }
-
- ///
- /// 获取声音最大距离。
- ///
- public float MaxDistance { get; private set; }
-
- public override bool ParseDataRow(string dataRowString, object userData)
- {
- string[] columnStrings = dataRowString.Split(DataTableExtension.DataSplitSeparators);
- for (int i = 0; i < columnStrings.Length; i++)
- {
- columnStrings[i] = columnStrings[i].Trim(DataTableExtension.DataTrimSeparators);
- }
-
- int index = 0;
- index++;
- m_Id = int.Parse(columnStrings[index++]);
- index++;
- AssetName = columnStrings[index++];
- Priority = int.Parse(columnStrings[index++]);
- Loop = bool.Parse(columnStrings[index++]);
- Volume = float.Parse(columnStrings[index++]);
- SpatialBlend = float.Parse(columnStrings[index++]);
- MaxDistance = float.Parse(columnStrings[index++]);
-
- GeneratePropertyArray();
- return true;
- }
-
- public override bool ParseDataRow(byte[] dataRowBytes, int startIndex, int length, object userData)
- {
- using (MemoryStream memoryStream = new MemoryStream(dataRowBytes, startIndex, length, false))
- {
- using (BinaryReader binaryReader = new BinaryReader(memoryStream, Encoding.UTF8))
- {
- m_Id = binaryReader.Read7BitEncodedInt32();
- AssetName = binaryReader.ReadString();
- Priority = binaryReader.Read7BitEncodedInt32();
- Loop = binaryReader.ReadBoolean();
- Volume = binaryReader.ReadSingle();
- SpatialBlend = binaryReader.ReadSingle();
- MaxDistance = binaryReader.ReadSingle();
- }
- }
-
- GeneratePropertyArray();
- return true;
- }
-
- private void GeneratePropertyArray()
- {
- }
- }
-}
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DRSound.cs.meta b/Assets/GameMain/Scripts/Base/DataTable/DRSound.cs.meta
deleted file mode 100644
index daead29..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DRSound.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: fc0abcc42a26c844d91d422da22eb94d
-timeCreated: 1528026147
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DRUIForm.cs b/Assets/GameMain/Scripts/Base/DataTable/DRUIForm.cs
deleted file mode 100644
index 3b4f6e7..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DRUIForm.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-using System.IO;
-using System.Text;
-using UnityGameFramework.Runtime;
-
-namespace SepCore.DataTable
-{
- ///
- /// 界面配置表。
- ///
- public class DRUIForm : DataRowBase
- {
- private int m_Id = 0;
-
- ///
- /// 获取界面编号。
- ///
- public override int Id
- {
- get { return m_Id; }
- }
-
- ///
- /// 获取资源名称。
- ///
- public string AssetName { get; private set; }
-
- ///
- /// 获取界面组名称。
- ///
- public string UIGroupName { get; private set; }
-
- ///
- /// 获取是否允许多个界面实例。
- ///
- public bool AllowMultiInstance { get; private set; }
-
- ///
- /// 获取是否暂停被其覆盖的界面。
- ///
- public bool PauseCoveredUIForm { get; private set; }
-
- public override bool ParseDataRow(string dataRowString, object userData)
- {
- string[] columnStrings = dataRowString.Split(DataTableExtension.DataSplitSeparators);
- for (int i = 0; i < columnStrings.Length; i++)
- {
- columnStrings[i] = columnStrings[i].Trim(DataTableExtension.DataTrimSeparators);
- }
-
- int index = 0;
- index++;
- m_Id = int.Parse(columnStrings[index++]);
- index++;
- AssetName = columnStrings[index++];
- UIGroupName = columnStrings[index++];
- AllowMultiInstance = bool.Parse(columnStrings[index++]);
- PauseCoveredUIForm = bool.Parse(columnStrings[index++]);
-
- GeneratePropertyArray();
- return true;
- }
-
- public override bool ParseDataRow(byte[] dataRowBytes, int startIndex, int length, object userData)
- {
- using (MemoryStream memoryStream = new MemoryStream(dataRowBytes, startIndex, length, false))
- {
- using (BinaryReader binaryReader = new BinaryReader(memoryStream, Encoding.UTF8))
- {
- m_Id = binaryReader.Read7BitEncodedInt32();
- AssetName = binaryReader.ReadString();
- UIGroupName = binaryReader.ReadString();
- AllowMultiInstance = binaryReader.ReadBoolean();
- PauseCoveredUIForm = binaryReader.ReadBoolean();
- }
- }
-
- GeneratePropertyArray();
- return true;
- }
-
- private void GeneratePropertyArray()
- {
- }
- }
-}
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DRUIForm.cs.meta b/Assets/GameMain/Scripts/Base/DataTable/DRUIForm.cs.meta
deleted file mode 100644
index 9c303e0..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DRUIForm.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: f28db9f996bc3d04eb73541b1f8b1036
-timeCreated: 1528026148
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DRUISound.cs b/Assets/GameMain/Scripts/Base/DataTable/DRUISound.cs
deleted file mode 100644
index ee24f6a..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DRUISound.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-using System.IO;
-using System.Text;
-using UnityGameFramework.Runtime;
-
-namespace SepCore.DataTable
-{
- ///
- /// 声音配置表。
- ///
- public class DRUISound : DataRowBase
- {
- private int m_Id = 0;
-
- ///
- /// 获取声音编号。
- ///
- public override int Id
- {
- get { return m_Id; }
- }
-
- ///
- /// 获取资源名称。
- ///
- public string AssetName { get; private set; }
-
- ///
- /// 获取优先级(默认0,128最高,-128最低)。
- ///
- public int Priority { get; private set; }
-
- ///
- /// 获取音量(0~1)。
- ///
- public float Volume { get; private set; }
-
- public override bool ParseDataRow(string dataRowString, object userData)
- {
- string[] columnStrings = dataRowString.Split(DataTableExtension.DataSplitSeparators);
- for (int i = 0; i < columnStrings.Length; i++)
- {
- columnStrings[i] = columnStrings[i].Trim(DataTableExtension.DataTrimSeparators);
- }
-
- int index = 0;
- index++;
- m_Id = int.Parse(columnStrings[index++]);
- index++;
- AssetName = columnStrings[index++];
- Priority = int.Parse(columnStrings[index++]);
- Volume = float.Parse(columnStrings[index++]);
-
- GeneratePropertyArray();
- return true;
- }
-
- public override bool ParseDataRow(byte[] dataRowBytes, int startIndex, int length, object userData)
- {
- using (MemoryStream memoryStream = new MemoryStream(dataRowBytes, startIndex, length, false))
- {
- using (BinaryReader binaryReader = new BinaryReader(memoryStream, Encoding.UTF8))
- {
- m_Id = binaryReader.Read7BitEncodedInt32();
- AssetName = binaryReader.ReadString();
- Priority = binaryReader.Read7BitEncodedInt32();
- Volume = binaryReader.ReadSingle();
- }
- }
-
- GeneratePropertyArray();
- return true;
- }
-
- private void GeneratePropertyArray()
- {
- }
- }
-}
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DRUISound.cs.meta b/Assets/GameMain/Scripts/Base/DataTable/DRUISound.cs.meta
deleted file mode 100644
index 563f350..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DRUISound.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: d69c673440234c24a9718897060d4e14
-timeCreated: 1528026148
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DRWeapon.cs b/Assets/GameMain/Scripts/Base/DataTable/DRWeapon.cs
deleted file mode 100644
index b145cf7..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DRWeapon.cs
+++ /dev/null
@@ -1,154 +0,0 @@
-using System;
-using System.Collections.Generic;
-using GameFramework;
-using SepCore.Definition;
-using SepCore.CustomUtility;
-using Newtonsoft.Json.Linq;
-using UnityGameFramework.Runtime;
-
-namespace SepCore.DataTable
-{
- ///
- /// 武器表。
- ///
- public class DRWeapon : DataRowBase
- {
- private int m_Id = 0;
-
- ///
- /// 获取武器编号。
- ///
- public override int Id => m_Id;
-
- public int EntityTypeId { get; private set; }
-
- ///
- /// 获取武器名称。
- ///
- public string Title { get; private set; }
-
- ///
- /// 获取图标资源名称。
- ///
- public string IconAssetName => $"weapon_{m_Id}_icon";
-
- ///
- /// 获取武器稀有度
- ///
- public ItemRarity Rarity { get; private set; }
-
- ///
- /// 获取武器价值
- ///
- public int Price { get; private set; }
-
- ///
- /// 获取武器价值浮动率
- ///
- public float PriceRandomPercent { get; private set; }
-
- ///
- /// 获取武器伤害。
- ///
- public int Attack { get; private set; }
-
- ///
- /// 获取武器冷却。
- ///
- public float Cooldown { get; private set; }
-
- ///
- /// 获取武器攻击范围。
- ///
- public float AttackRange { get; private set; }
-
- ///
- /// 获取武器攻击音效。
- ///
- public int AttackSoundId { get; private set; }
-
- ///
- /// 获取武器额外参数。
- ///
- public Dictionary Pramas { get; private set; }
-
- ///
- /// 获取武器额外参数 Json。
- ///
- public string ParamsJson { get; private set; }
-
- ///
- /// 获取武器额外属性。
- ///
- public StatModifier[] Modifiers { get; private set; }
-
- public override bool ParseDataRow(string dataRowString, object userData)
- {
- string[] columnStrings = dataRowString.Split(DataTableExtension.DataSplitSeparators);
-
- int index = 0;
- index++;
- m_Id = int.Parse(columnStrings[index++]);
- index++;
- EntityTypeId = int.Parse(columnStrings[index++]);
- Title = columnStrings[index++];
- Rarity = EnumUtility.Get(columnStrings[index++]);
- Price = int.Parse(columnStrings[index++]);
- PriceRandomPercent = float.Parse(columnStrings[index++]);
- Attack = int.Parse(columnStrings[index++]);
- Cooldown = float.Parse(columnStrings[index++]);
- AttackRange = float.Parse(columnStrings[index++]);
- AttackSoundId = int.Parse(columnStrings[index++]);
- ParamsJson = columnStrings[index++];
- Pramas = DeserializeParams(ParamsJson);
- Modifiers = Utility.Json.ToObject(columnStrings[index++]);
-
- GeneratePropertyArray();
-
- return true;
- }
-
- private void GeneratePropertyArray()
- {
- }
-
- ///
- /// 解参数
- ///
- ///
- ///
- private Dictionary DeserializeParams(string rawParams)
- {
- var dict = new Dictionary(StringComparer.OrdinalIgnoreCase);
- if (string.IsNullOrWhiteSpace(rawParams))
- {
- return dict;
- }
-
- try
- {
- JObject paramObject = Utility.Json.ToObject(rawParams);
- if (paramObject == null)
- {
- return dict;
- }
-
- foreach (var pair in paramObject)
- {
- if (string.IsNullOrWhiteSpace(pair.Key) || pair.Value == null)
- {
- continue;
- }
-
- dict[pair.Key] = pair.Value.ToString();
- }
- }
- catch (Exception exception)
- {
- Log.Warning("Failed to parse weapon params json '{0}'. Error: {1}", rawParams, exception.Message);
- }
-
- return dict;
- }
- }
-}
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DRWeapon.cs.meta b/Assets/GameMain/Scripts/Base/DataTable/DRWeapon.cs.meta
deleted file mode 100644
index 15dd73b..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DRWeapon.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 9b386151345d3f14ab9b7dc5ed6dd864
-timeCreated: 1528026148
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DataTableExtension.cs b/Assets/GameMain/Scripts/Base/DataTable/DataTableExtension.cs
deleted file mode 100644
index 659fea3..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DataTableExtension.cs
+++ /dev/null
@@ -1,97 +0,0 @@
-using GameFramework.DataTable;
-using System;
-using SepCore.Definition;
-using UnityEngine;
-using UnityGameFramework.Runtime;
-
-namespace SepCore.DataTable
-{
- public static class DataTableExtension
- {
- private const string DataRowClassPrefixName = "SepCore.DataTable.DR";
- internal static readonly char[] DataSplitSeparators = new char[] { '\t' };
- internal static readonly char[] DataTrimSeparators = new char[] { '\"' };
-
- public static void LoadDataTable(this DataTableComponent dataTableComponent, string dataTableName,
- string dataTableAssetName, object userData)
- {
- if (string.IsNullOrEmpty(dataTableName))
- {
- Log.Warning("Data table name is invalid.");
- return;
- }
-
- string[] splitedNames = dataTableName.Split('_');
- if (splitedNames.Length > 2)
- {
- Log.Warning("Data table name is invalid.");
- return;
- }
-
- string dataRowClassName = DataRowClassPrefixName + splitedNames[0];
- Type dataRowType = Type.GetType(dataRowClassName);
- if (dataRowType == null)
- {
- Log.Warning("Can not get data row type with class name '{0}'.", dataRowClassName);
- return;
- }
-
- string name = splitedNames.Length > 1 ? splitedNames[1] : null;
- DataTableBase dataTable = dataTableComponent.CreateDataTable(dataRowType, name);
- dataTable.ReadData(dataTableAssetName, Constant.AssetPriority.DataTableAsset, userData);
- }
-
- public static Color32 ParseColor32(string value)
- {
- string[] splitedValue = value.Split(',');
- return new Color32(byte.Parse(splitedValue[0]), byte.Parse(splitedValue[1]), byte.Parse(splitedValue[2]),
- byte.Parse(splitedValue[3]));
- }
-
- public static Color ParseColor(string value)
- {
- string[] splitedValue = value.Split(',');
- return new Color(float.Parse(splitedValue[0]), float.Parse(splitedValue[1]), float.Parse(splitedValue[2]),
- float.Parse(splitedValue[3]));
- }
-
- public static Quaternion ParseQuaternion(string value)
- {
- string[] splitedValue = value.Split(',');
- return new Quaternion(float.Parse(splitedValue[0]), float.Parse(splitedValue[1]),
- float.Parse(splitedValue[2]), float.Parse(splitedValue[3]));
- }
-
- public static Rect ParseRect(string value)
- {
- string[] splitedValue = value.Split(',');
- return new Rect(float.Parse(splitedValue[0]), float.Parse(splitedValue[1]), float.Parse(splitedValue[2]),
- float.Parse(splitedValue[3]));
- }
-
- public static Vector2 ParseVector2(string value)
- {
- string[] splitedValue = value.Split(',');
- return new Vector2(float.Parse(splitedValue[0]), float.Parse(splitedValue[1]));
- }
-
- public static Vector3 ParseVector3(string value)
- {
- string[] splitedValue = value.Split(',');
- return new Vector3(float.Parse(splitedValue[0]), float.Parse(splitedValue[1]),
- float.Parse(splitedValue[2]));
- }
-
- public static Vector4 ParseVector4(string value)
- {
- string[] splitedValue = value.Split(',');
- return new Vector4(float.Parse(splitedValue[0]), float.Parse(splitedValue[1]), float.Parse(splitedValue[2]),
- float.Parse(splitedValue[3]));
- }
-
- public static T GetDataTableRow(this DataTableComponent dataTableComponent, int id) where T : DataRowBase
- {
- return dataTableComponent.GetDataTable().GetDataRow(id);
- }
- }
-}
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DataTableExtension.cs.meta b/Assets/GameMain/Scripts/Base/DataTable/DataTableExtension.cs.meta
deleted file mode 100644
index 092db9f..0000000
--- a/Assets/GameMain/Scripts/Base/DataTable/DataTableExtension.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 23740ffb8ecb90b48ad986504e1d2474
-timeCreated: 1528026147
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/DataTable.meta b/Assets/GameMain/Scripts/Base/Definition/ConfigExtension.meta
similarity index 58%
rename from Assets/GameMain/Scripts/Base/DataTable.meta
rename to Assets/GameMain/Scripts/Base/Definition/ConfigExtension.meta
index 0734728..c4beb81 100644
--- a/Assets/GameMain/Scripts/Base/DataTable.meta
+++ b/Assets/GameMain/Scripts/Base/Definition/ConfigExtension.meta
@@ -1,9 +1,8 @@
fileFormatVersion: 2
-guid: 35199cfd0c69c8c42895c16263b21b7b
+guid: 6e86225af5c8e9e44804e796e7972b29
folderAsset: yes
-timeCreated: 1528026146
-licenseType: Pro
DefaultImporter:
+ externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Definition/ConfigExtension/LevelExperienceConfig.Extension.cs b/Assets/GameMain/Scripts/Base/Definition/ConfigExtension/LevelExperienceConfig.Extension.cs
new file mode 100644
index 0000000..19ab186
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Definition/ConfigExtension/LevelExperienceConfig.Extension.cs
@@ -0,0 +1,42 @@
+namespace SepCore.Definition
+{
+ public sealed partial class LevelExperienceConfig
+ {
+ ///
+ /// 转换为按目标等级为下标索引的经验需求数组。
+ /// 下标 0 为 0(无目标 0 级),下标 1 为达到 1 级所需经验(即 Lv0 对应经验 100),以此类推。
+ /// 与 Player.cs 中 _expRequires[_currentLevel + 1] 的升级判定逻辑完全匹配。
+ ///
+ public int[] ToTargetLevelArray()
+ {
+ return new int[]
+ {
+ 0,
+ Lv0, Lv1, Lv2, Lv3, Lv4, Lv5, Lv6, Lv7, Lv8, Lv9,
+ Lv10, Lv11, Lv12, Lv13, Lv14, Lv15, Lv16, Lv17, Lv18, Lv19,
+ Lv20, Lv21, Lv22, Lv23, Lv24, Lv25, Lv26, Lv27, Lv28, Lv29,
+ Lv30, Lv31, Lv32, Lv33, Lv34, Lv35, Lv36, Lv37, Lv38, Lv39,
+ Lv40, Lv41, Lv42, Lv43, Lv44, Lv45, Lv46, Lv47, Lv48, Lv49,
+ Lv50, Lv51, Lv52, Lv53, Lv54, Lv55, Lv56, Lv57, Lv58, Lv59,
+ Lv60
+ };
+ }
+
+ ///
+ /// 转换为包含 Lv0~Lv60 的原始数组(长度 61)。
+ ///
+ public int[] ToArray()
+ {
+ return new int[]
+ {
+ Lv0, Lv1, Lv2, Lv3, Lv4, Lv5, Lv6, Lv7, Lv8, Lv9,
+ Lv10, Lv11, Lv12, Lv13, Lv14, Lv15, Lv16, Lv17, Lv18, Lv19,
+ Lv20, Lv21, Lv22, Lv23, Lv24, Lv25, Lv26, Lv27, Lv28, Lv29,
+ Lv30, Lv31, Lv32, Lv33, Lv34, Lv35, Lv36, Lv37, Lv38, Lv39,
+ Lv40, Lv41, Lv42, Lv43, Lv44, Lv45, Lv46, Lv47, Lv48, Lv49,
+ Lv50, Lv51, Lv52, Lv53, Lv54, Lv55, Lv56, Lv57, Lv58, Lv59,
+ Lv60
+ };
+ }
+ }
+}
diff --git a/Assets/GameMain/Scripts/Base/DataTable/BinaryReaderExtension.cs.meta b/Assets/GameMain/Scripts/Base/Definition/ConfigExtension/LevelExperienceConfig.Extension.cs.meta
similarity index 83%
rename from Assets/GameMain/Scripts/Base/DataTable/BinaryReaderExtension.cs.meta
rename to Assets/GameMain/Scripts/Base/Definition/ConfigExtension/LevelExperienceConfig.Extension.cs.meta
index ce4d8df..5fca84a 100644
--- a/Assets/GameMain/Scripts/Base/DataTable/BinaryReaderExtension.cs.meta
+++ b/Assets/GameMain/Scripts/Base/Definition/ConfigExtension/LevelExperienceConfig.Extension.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: f303871e05cae2d489d6ba3adb6e39d3
+guid: e7b3f39341ca70f439664dceb9ea7552
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Assets/GameMain/Scripts/Base/Definition/ConfigExtension/LevelUpRewardConfig.Extension.cs b/Assets/GameMain/Scripts/Base/Definition/ConfigExtension/LevelUpRewardConfig.Extension.cs
new file mode 100644
index 0000000..8453973
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Definition/ConfigExtension/LevelUpRewardConfig.Extension.cs
@@ -0,0 +1,7 @@
+namespace SepCore.Definition
+{
+ public sealed partial class LevelUpRewardConfig
+ {
+ public string IconAssetName => $"levelupreward_{(Id >= 1000 ? Id - 900 : Id)}_icon";
+ }
+}
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DRBullet.cs.meta b/Assets/GameMain/Scripts/Base/Definition/ConfigExtension/LevelUpRewardConfig.Extension.cs.meta
similarity index 83%
rename from Assets/GameMain/Scripts/Base/DataTable/DRBullet.cs.meta
rename to Assets/GameMain/Scripts/Base/Definition/ConfigExtension/LevelUpRewardConfig.Extension.cs.meta
index 50c3562..ab4e009 100644
--- a/Assets/GameMain/Scripts/Base/DataTable/DRBullet.cs.meta
+++ b/Assets/GameMain/Scripts/Base/Definition/ConfigExtension/LevelUpRewardConfig.Extension.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 537419cc75316184b84b9f806b114976
+guid: a30aae743bbd22b4cac1ef60f96a1bed
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Assets/GameMain/Scripts/Base/Definition/ConfigExtension/PropConfig.Extension.cs b/Assets/GameMain/Scripts/Base/Definition/ConfigExtension/PropConfig.Extension.cs
new file mode 100644
index 0000000..4afb863
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Definition/ConfigExtension/PropConfig.Extension.cs
@@ -0,0 +1,8 @@
+namespace SepCore.Definition
+{
+ public sealed partial class PropConfig
+ {
+ public string Title => Name;
+ public string IconAssetName => $"prop_{(Id >= 1000 ? Id - 900 : Id)}_icon";
+ }
+}
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DRLevelRarity.cs.meta b/Assets/GameMain/Scripts/Base/Definition/ConfigExtension/PropConfig.Extension.cs.meta
similarity index 83%
rename from Assets/GameMain/Scripts/Base/DataTable/DRLevelRarity.cs.meta
rename to Assets/GameMain/Scripts/Base/Definition/ConfigExtension/PropConfig.Extension.cs.meta
index 13b53a9..f031821 100644
--- a/Assets/GameMain/Scripts/Base/DataTable/DRLevelRarity.cs.meta
+++ b/Assets/GameMain/Scripts/Base/Definition/ConfigExtension/PropConfig.Extension.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 2be3a3c9896a441496abfb07467e9e19
+guid: 37131c7b023611f4b83978960f4b3df4
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Assets/GameMain/Scripts/Base/Definition/ConfigExtension/RoleConfig.Extension.cs b/Assets/GameMain/Scripts/Base/Definition/ConfigExtension/RoleConfig.Extension.cs
new file mode 100644
index 0000000..d590fea
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Definition/ConfigExtension/RoleConfig.Extension.cs
@@ -0,0 +1,10 @@
+namespace SepCore.Definition
+{
+ public sealed partial class RoleConfig
+ {
+ public int Id => Name == "老人" ? 102 : 101;
+ public string RoleName => Name;
+ public string IconName => $"role_{Id}_icon";
+ public int WeaponCapacity => 6;
+ }
+}
diff --git a/Assets/GameMain/Scripts/Base/DataTable/DRGoods.cs.meta b/Assets/GameMain/Scripts/Base/Definition/ConfigExtension/RoleConfig.Extension.cs.meta
similarity index 83%
rename from Assets/GameMain/Scripts/Base/DataTable/DRGoods.cs.meta
rename to Assets/GameMain/Scripts/Base/Definition/ConfigExtension/RoleConfig.Extension.cs.meta
index 1f094bb..2ee2ac2 100644
--- a/Assets/GameMain/Scripts/Base/DataTable/DRGoods.cs.meta
+++ b/Assets/GameMain/Scripts/Base/Definition/ConfigExtension/RoleConfig.Extension.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 595bda561b5491c4e878f071ceb31089
+guid: 6d60ad7c035b4aa4abd87deb1d572847
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Assets/GameMain/Scripts/Base/Definition/ConfigExtension/WeaponConfig.Extension.cs b/Assets/GameMain/Scripts/Base/Definition/ConfigExtension/WeaponConfig.Extension.cs
new file mode 100644
index 0000000..ca7870e
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Definition/ConfigExtension/WeaponConfig.Extension.cs
@@ -0,0 +1,10 @@
+namespace SepCore.Definition
+{
+ public sealed partial class WeaponConfig
+ {
+ ///
+ /// 图标资源名称(映射 weapon_1_icon ~ weapon_5_icon)。
+ ///
+ public string IconAssetName => $"weapon_{(Id >= 1000 ? Id % 1000 : Id)}_icon";
+ }
+}
diff --git a/Assets/GameMain/Scripts/Base/Definition/ConfigExtension/WeaponConfig.Extension.cs.meta b/Assets/GameMain/Scripts/Base/Definition/ConfigExtension/WeaponConfig.Extension.cs.meta
new file mode 100644
index 0000000..808fc7a
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Definition/ConfigExtension/WeaponConfig.Extension.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 430f837865b92144c82328dc2ce58823
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Definition/DataStruct/PropItem.cs b/Assets/GameMain/Scripts/Base/Definition/DataStruct/PropItem.cs
index 35aefb1..ae507be 100644
--- a/Assets/GameMain/Scripts/Base/Definition/DataStruct/PropItem.cs
+++ b/Assets/GameMain/Scripts/Base/Definition/DataStruct/PropItem.cs
@@ -1,33 +1,40 @@
-using SepCore.DataTable;
+using System.Collections.Generic;
namespace SepCore.Definition
{
public class PropItem
{
- private readonly StatModifier[] _modifiers;
+ private readonly List _modifiers = new();
public string Title { get; private set; }
public string IconAssetName { get; private set; }
- public ItemRarity Rarity { get; private set; }
- public StatModifier[] Modifiers => _modifiers;
+ public Rarity Rarity { get; private set; }
+ public IReadOnlyList Modifiers => _modifiers;
- public PropItem(DRProp prop)
+ public PropItem(PropConfig prop)
{
- if (prop == null) return;
-
- _modifiers = prop.Modifiers;
+ if (prop.Modifiers != null)
+ {
+ _modifiers.AddRange(prop.Modifiers);
+ }
Title = prop.Title;
Rarity = prop.Rarity;
IconAssetName = prop.IconAssetName;
}
- public PropItem(StatModifier[] modifiers)
+ public PropItem(IEnumerable modifiers)
{
- _modifiers = modifiers;
+ if (modifiers != null)
+ {
+ _modifiers.AddRange(modifiers);
+ }
}
- public PropItem(StatModifier[] modifiers, ItemRarity rarity, string title, string iconAssetName)
+ public PropItem(IEnumerable modifiers, Rarity rarity, string title, string iconAssetName)
{
- _modifiers = modifiers;
+ if (modifiers != null)
+ {
+ _modifiers.AddRange(modifiers);
+ }
Title = title;
Rarity = rarity;
IconAssetName = iconAssetName;
diff --git a/Assets/GameMain/Scripts/Base/Definition/DataStruct/StatModifier.cs b/Assets/GameMain/Scripts/Base/Definition/DataStruct/StatModifier.cs
deleted file mode 100644
index 13827e9..0000000
--- a/Assets/GameMain/Scripts/Base/Definition/DataStruct/StatModifier.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-using System;
-using SepCore.Definition;
-using SepCore.CustomUtility;
-using UnityGameFramework.Runtime;
-
-namespace SepCore.Definition
-{
- public class StatModifier
- {
- public StatType StatType;
- public float Value;
- public bool IsPercent;
-
- public static StatModifier StringToModifier(string input)
- {
- if (string.IsNullOrEmpty(input))
- {
- Log.Warning("Invalid modifier: {0}", input);
- return null;
- }
-
- if (!input.StartsWith('[') || !input.EndsWith(']'))
- {
- throw new ArgumentException("Input must be enclosed in square brackets.");
- }
-
- string inner = input.Substring(1, input.Length - 2);
-
- // 如果是空列表 "[]"
- if (inner.Length == 0) return null;
-
- string[] property = inner.Split(",");
- int propertyIndex = 0;
- return new StatModifier
- {
- StatType = EnumUtility.Get(property[propertyIndex++]),
- Value = float.Parse(property[propertyIndex++]),
- IsPercent = bool.Parse(property[propertyIndex++])
- };
- }
- }
-}
\ No newline at end of file
diff --git a/Assets/GameMain/Scripts/Base/Definition/DataStruct/modifier.cs b/Assets/GameMain/Scripts/Base/Definition/DataStruct/modifier.cs
new file mode 100644
index 0000000..b3fb3e1
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Definition/DataStruct/modifier.cs
@@ -0,0 +1,70 @@
+using System;
+using UnityEngine;
+
+namespace SepCore.Definition
+{
+ public sealed partial class modifier
+ {
+ public StatType StatType => Key;
+
+ ///
+ /// 实际参与数值计算的浮点数值。
+ /// 1. 百分比加成(IsPercent == true):表内千分比(如 200 代表 20%),转换为 0.2f。
+ /// 2. 非百分比加成(IsPercent == false):移动速度原为 float 放大了 1000 倍(如 800 代表 0.8f),除以 1000f;其余(如生命+53、攻击+10)直接使用原值。
+ ///
+ 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}";
+ }
+ }
+}
diff --git a/Assets/GameMain/Scripts/Base/Definition/DataStruct/StatModifier.cs.meta b/Assets/GameMain/Scripts/Base/Definition/DataStruct/modifier.cs.meta
similarity index 100%
rename from Assets/GameMain/Scripts/Base/Definition/DataStruct/StatModifier.cs.meta
rename to Assets/GameMain/Scripts/Base/Definition/DataStruct/modifier.cs.meta
diff --git a/Assets/GameMain/Scripts/Base/Definition/Enum/BulletType.cs b/Assets/GameMain/Scripts/Base/Definition/Enum/BulletType.cs
deleted file mode 100644
index fdb0b29..0000000
--- a/Assets/GameMain/Scripts/Base/Definition/Enum/BulletType.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace SepCore.Definition
-{
- public enum BulletType : byte
- {
- None = 0,
- BulletHandgun = 1
- }
-}
diff --git a/Assets/GameMain/Scripts/Base/Definition/Enum/BulletType.cs.meta b/Assets/GameMain/Scripts/Base/Definition/Enum/BulletType.cs.meta
deleted file mode 100644
index 73e925b..0000000
--- a/Assets/GameMain/Scripts/Base/Definition/Enum/BulletType.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 2248c02c2c5529445992a2c2fef799dd
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Definition/Enum/CampType.cs b/Assets/GameMain/Scripts/Base/Definition/Enum/CampType.cs
deleted file mode 100644
index 9c8bb6f..0000000
--- a/Assets/GameMain/Scripts/Base/Definition/Enum/CampType.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-//------------------------------------------------------------
-// Game Framework
-// Copyright © 2013-2021 Jiang Yin. All rights reserved.
-// Homepage: https://gameframework.cn/
-// Feedback: mailto:ellan@gameframework.cn
-//------------------------------------------------------------
-
-namespace SepCore.Definition
-{
- ///
- /// 阵营类型。
- ///
- public enum CampType : byte
- {
- Unknown = 0,
-
- ///
- /// 第一玩家阵营。
- ///
- Player,
-
- ///
- /// 第一敌人阵营。
- ///
- Enemy,
-
- ///
- /// 第一中立阵营。
- ///
- Neutral,
-
- ///
- /// 第二玩家阵营。
- ///
- Player2,
-
- ///
- /// 第二敌人阵营。
- ///
- Enemy2,
-
- ///
- /// 第二中立阵营
- ///
- Neutral2,
- }
-}
diff --git a/Assets/GameMain/Scripts/Base/Definition/Enum/CampType.cs.meta b/Assets/GameMain/Scripts/Base/Definition/Enum/CampType.cs.meta
deleted file mode 100644
index 7e96769..0000000
--- a/Assets/GameMain/Scripts/Base/Definition/Enum/CampType.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 61f18b2b0752f32449d9978f481a75fc
-timeCreated: 1528026150
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Definition/Enum/GoodsType.cs b/Assets/GameMain/Scripts/Base/Definition/Enum/GoodsType.cs
deleted file mode 100644
index 61d4e7f..0000000
--- a/Assets/GameMain/Scripts/Base/Definition/Enum/GoodsType.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace SepCore.Definition
-{
- public enum GoodsType
- {
- None = 0,
- Weapon,
- Prop
- }
-}
\ No newline at end of file
diff --git a/Assets/GameMain/Scripts/Base/Definition/Enum/ItemRarity.cs b/Assets/GameMain/Scripts/Base/Definition/Enum/ItemRarity.cs
deleted file mode 100644
index cf4104a..0000000
--- a/Assets/GameMain/Scripts/Base/Definition/Enum/ItemRarity.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-namespace SepCore.Definition
-{
- public enum ItemRarity
- {
- None,
- White = 1,
- Green = 2,
- Blue,
- Purple,
- Red
- }
-}
\ No newline at end of file
diff --git a/Assets/GameMain/Scripts/Base/Definition/Enum/ItemRarity.cs.meta b/Assets/GameMain/Scripts/Base/Definition/Enum/ItemRarity.cs.meta
deleted file mode 100644
index 1fd836e..0000000
--- a/Assets/GameMain/Scripts/Base/Definition/Enum/ItemRarity.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: bb7ab0222a370b649956dacb56a122fc
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Definition/Enum/RelationType.cs b/Assets/GameMain/Scripts/Base/Definition/Enum/RelationType.cs
deleted file mode 100644
index 16c9525..0000000
--- a/Assets/GameMain/Scripts/Base/Definition/Enum/RelationType.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-//------------------------------------------------------------
-// Game Framework
-// Copyright © 2013-2021 Jiang Yin. All rights reserved.
-// Homepage: https://gameframework.cn/
-// Feedback: mailto:ellan@gameframework.cn
-//------------------------------------------------------------
-
-namespace SepCore.Definition
-{
- ///
- /// 关系类型。
- ///
- public enum RelationType : byte
- {
- ///
- /// 未知的。
- ///
- Unknown,
-
- ///
- /// 友好的。
- ///
- Friendly,
-
- ///
- /// 中立的。
- ///
- Neutral,
-
- ///
- /// 敌对的。
- ///
- Hostile
- }
-}
diff --git a/Assets/GameMain/Scripts/Base/Definition/Enum/RelationType.cs.meta b/Assets/GameMain/Scripts/Base/Definition/Enum/RelationType.cs.meta
deleted file mode 100644
index 589f1d4..0000000
--- a/Assets/GameMain/Scripts/Base/Definition/Enum/RelationType.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 2c5c37ca396eb9d47a70999b5825152b
-timeCreated: 1528026150
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Definition/Enum/SceneId.cs b/Assets/GameMain/Scripts/Base/Definition/Enum/SceneId.cs
deleted file mode 100644
index 178a8e2..0000000
--- a/Assets/GameMain/Scripts/Base/Definition/Enum/SceneId.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-namespace SepCore.Definition
-{
- public enum SceneId : byte
- {
- Launch = 0,
- Menu = 1,
- Main = 2,
-
- StressTest = 3,
- Game = 4,
- }
-}
\ No newline at end of file
diff --git a/Assets/GameMain/Scripts/Base/Definition/Enum/SceneId.cs.meta b/Assets/GameMain/Scripts/Base/Definition/Enum/SceneId.cs.meta
deleted file mode 100644
index 66333da..0000000
--- a/Assets/GameMain/Scripts/Base/Definition/Enum/SceneId.cs.meta
+++ /dev/null
@@ -1,3 +0,0 @@
-fileFormatVersion: 2
-guid: 20fc28f41ef04f8fa4fbfb9189b58d0d
-timeCreated: 1768899171
\ No newline at end of file
diff --git a/Assets/GameMain/Scripts/Base/Definition/Enum/StatType.cs b/Assets/GameMain/Scripts/Base/Definition/Enum/StatType.cs
deleted file mode 100644
index 921a994..0000000
--- a/Assets/GameMain/Scripts/Base/Definition/Enum/StatType.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-namespace SepCore.Definition
-{
- public enum StatType
- {
- None = 0,
-
- MaxHealth = 1,
- MovementSpeed = 2,
- Attack = 3,
- Defense = 4,
- AttackSpeed = 5,
- Critical = 6,
- CriticalDamage = 7,
- Dodge = 8,
- AbsorbRange = 9,
- }
-}
diff --git a/Assets/GameMain/Scripts/Base/Definition/Enum/StatType.cs.meta b/Assets/GameMain/Scripts/Base/Definition/Enum/StatType.cs.meta
deleted file mode 100644
index d8f906c..0000000
--- a/Assets/GameMain/Scripts/Base/Definition/Enum/StatType.cs.meta
+++ /dev/null
@@ -1,3 +0,0 @@
-fileFormatVersion: 2
-guid: 657fd4fd021a424397aa17c0359a1da1
-timeCreated: 1768966119
\ No newline at end of file
diff --git a/Assets/GameMain/Scripts/Base/Definition/Enum/UIFormType.cs b/Assets/GameMain/Scripts/Base/Definition/Enum/UIFormType.cs
deleted file mode 100644
index 6ba525d..0000000
--- a/Assets/GameMain/Scripts/Base/Definition/Enum/UIFormType.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-//------------------------------------------------------------
-// Game Framework
-// Copyright © 2013-2021 Jiang Yin. All rights reserved.
-// Homepage: https://gameframework.cn/
-// Feedback: mailto:ellan@gameframework.cn
-//------------------------------------------------------------
-
-namespace SepCore.Definition
-{
- ///
- /// 界面编号。
- ///
- public enum UIFormType : byte
- {
- Undefined = 0,
-
- ///
- /// 弹出框。
- ///
- DialogForm = 1,
-
- ///
- /// 主菜单。
- ///
- MenuForm = 100,
-
- ///
- /// 设置。
- ///
- SettingForm = 101,
-
- ///
- /// 关于。
- ///
- AboutForm = 102,
-
- ///
- /// 选择角色。
- ///
- SelectRoleForm = 201,
-
- ///
- /// 游戏商店。
- ///
- ShopForm = 202,
-
- ///
- /// 游戏HUD。
- ///
- HudForm = 203,
-
- ///
- /// 升级选择。
- ///
- LevelUpForm = 204,
-
- ///
- /// 物品信息展示页
- ///
- ItemTooltipForm = 205,
-
- ///
- /// 虚拟摇杆。
- ///
- JoystickForm = 206,
- }
-}
diff --git a/Assets/GameMain/Scripts/Base/Definition/Enum/UIFormType.cs.meta b/Assets/GameMain/Scripts/Base/Definition/Enum/UIFormType.cs.meta
deleted file mode 100644
index 2d33075..0000000
--- a/Assets/GameMain/Scripts/Base/Definition/Enum/UIFormType.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 75fd10c7585513846ab25372be0590b7
-timeCreated: 1528026162
-licenseType: Pro
-MonoImporter:
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Definition/Enum/WeaponType.cs b/Assets/GameMain/Scripts/Base/Definition/Enum/WeaponType.cs
index d0e59a0..972d4dc 100644
--- a/Assets/GameMain/Scripts/Base/Definition/Enum/WeaponType.cs
+++ b/Assets/GameMain/Scripts/Base/Definition/Enum/WeaponType.cs
@@ -1,12 +1,12 @@
namespace SepCore.Definition
{
- public enum WeaponType : byte
+ public enum WeaponType : int
{
None = 0,
- WeaponKnife = 1,
- WeaponHandgun = 2,
- WeaponSlash = 3,
- WeaponLightning = 4,
- WeaponLance = 5,
+ WeaponKnife = 1001,
+ WeaponHandgun = 1002,
+ WeaponSlash = 1003,
+ WeaponLightning = 1004,
+ WeaponLance = 1005,
}
}
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/AccessoryObjectData.cs b/Assets/GameMain/Scripts/Base/Entity/AccessoryObjectData.cs
similarity index 75%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/AccessoryObjectData.cs
rename to Assets/GameMain/Scripts/Base/Entity/AccessoryObjectData.cs
index 636e5db..29c2735 100644
--- a/Assets/GameMain/Scripts/Base/Entity/EntityData/AccessoryObjectData.cs
+++ b/Assets/GameMain/Scripts/Base/Entity/AccessoryObjectData.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using SepCore.Definition;
using UnityEngine;
@@ -11,6 +11,13 @@ namespace SepCore.Entity
[SerializeField] private CampType _ownerCamp = CampType.Unknown;
+ public AccessoryObjectData(string assetName, int entityId, int ownerId, CampType ownerCamp)
+ : base(assetName, entityId)
+ {
+ _ownerId = ownerId;
+ _ownerCamp = ownerCamp;
+ }
+
public AccessoryObjectData(int entityId, int typeId, int ownerId, CampType ownerCamp)
: base(entityId, typeId)
{
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/AccessoryObjectData.cs.meta b/Assets/GameMain/Scripts/Base/Entity/AccessoryObjectData.cs.meta
similarity index 100%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/AccessoryObjectData.cs.meta
rename to Assets/GameMain/Scripts/Base/Entity/AccessoryObjectData.cs.meta
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/CoinData.cs b/Assets/GameMain/Scripts/Base/Entity/CoinData.cs
similarity index 53%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/CoinData.cs
rename to Assets/GameMain/Scripts/Base/Entity/CoinData.cs
index 28fa060..92c06af 100644
--- a/Assets/GameMain/Scripts/Base/Entity/EntityData/CoinData.cs
+++ b/Assets/GameMain/Scripts/Base/Entity/CoinData.cs
@@ -4,11 +4,15 @@ namespace SepCore.Entity
{
private int _value;
- public CoinData(int value, int entityId, int typeId) : base(entityId, typeId)
+ public CoinData(int value, int entityId, string assetName = "CoinEntity") : base(assetName, entityId)
{
_value = value;
}
+ public CoinData(int value, int entityId, int typeId) : this(value, entityId, "CoinEntity")
+ {
+ }
+
public int Value
{
get => _value;
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/CoinData.cs.meta b/Assets/GameMain/Scripts/Base/Entity/CoinData.cs.meta
similarity index 100%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/CoinData.cs.meta
rename to Assets/GameMain/Scripts/Base/Entity/CoinData.cs.meta
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/EffectData.cs b/Assets/GameMain/Scripts/Base/Entity/EffectData.cs
similarity index 63%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/EffectData.cs
rename to Assets/GameMain/Scripts/Base/Entity/EffectData.cs
index c594486..14d8f7e 100644
--- a/Assets/GameMain/Scripts/Base/Entity/EntityData/EffectData.cs
+++ b/Assets/GameMain/Scripts/Base/Entity/EffectData.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using UnityEngine;
namespace SepCore.Entity
@@ -9,12 +9,17 @@ namespace SepCore.Entity
[SerializeField]
private float _keepTime = 0f;
- public EffectData(int entityId, int typeId)
- : base(entityId, typeId)
+ public EffectData(int entityId, string assetName = "Effect")
+ : base(assetName, entityId)
{
_keepTime = 3f;
}
+ public EffectData(int entityId, int typeId)
+ : this(entityId, typeId.ToString())
+ {
+ }
+
public float KeepTime => _keepTime;
}
}
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/EffectData.cs.meta b/Assets/GameMain/Scripts/Base/Entity/EffectData.cs.meta
similarity index 100%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/EffectData.cs.meta
rename to Assets/GameMain/Scripts/Base/Entity/EffectData.cs.meta
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/Enemy.meta b/Assets/GameMain/Scripts/Base/Entity/Enemy.meta
similarity index 100%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/Enemy.meta
rename to Assets/GameMain/Scripts/Base/Entity/Enemy.meta
diff --git a/Assets/GameMain/Scripts/Base/Entity/Enemy/EnemyData.cs b/Assets/GameMain/Scripts/Base/Entity/Enemy/EnemyData.cs
new file mode 100644
index 0000000..0f92031
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Entity/Enemy/EnemyData.cs
@@ -0,0 +1,68 @@
+using System;
+using System.Collections.Generic;
+using SepCore.Definition;
+using UnityEngine;
+
+namespace SepCore.Entity
+{
+ [Serializable]
+ public class EnemyData : TargetableObjectData
+ {
+ private readonly EnemyConfig _enemyConfig;
+ private readonly EnemyType _enemyType;
+
+ public EnemyData(int entityId, EnemyConfig enemyConfig, EnemyType enemyType, int level)
+ : base(enemyConfig != null ? enemyConfig.Prefab : string.Empty, entityId, CampType.Enemy)
+ {
+ _enemyConfig = enemyConfig;
+ _enemyType = enemyType;
+ int effectiveLevel = Mathf.Max(1, level);
+ MaxHealthBase = _enemyConfig != null
+ ? _enemyConfig.MaxHealth + _enemyConfig.HpAddPerLevel * (effectiveLevel - 1)
+ : 100;
+ }
+
+ public EnemyType EnemyType => _enemyType;
+
+ public override int MaxHealthBase { get; }
+
+ public int AttackDamage => _enemyConfig?.AttackDamage ?? 0;
+
+ public float AttackCooldown => _enemyConfig?.AttackCooldown ?? 1f;
+
+ public float AttackRange => _enemyConfig?.AttackRange ?? 1.5f;
+
+ public float SpeedBase => _enemyConfig?.Speed ?? 2f;
+
+ public int DropCoin => _enemyConfig?.CoinDrop ?? 0;
+
+ public int DropExp => _enemyConfig?.ExpDrop ?? 0;
+
+ public float DropPercent => _enemyConfig?.DropPercent ?? 0f;
+
+ public float Scale => _enemyConfig?.Scale ?? 1f;
+
+ public Color Color
+ {
+ get
+ {
+ if (_enemyConfig != null &&
+ !string.IsNullOrEmpty(_enemyConfig.Color) &&
+ ColorUtility.TryParseHtmlString(_enemyConfig.Color, out Color color))
+ {
+ return color;
+ }
+
+ return Color.white;
+ }
+ }
+
+ public IReadOnlyDictionary Params => null;
+
+ public bool TryGetParam(string key, out string value)
+ {
+ value = null;
+ return false;
+ }
+ }
+}
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/Enemy/EnemyData.cs.meta b/Assets/GameMain/Scripts/Base/Entity/Enemy/EnemyData.cs.meta
similarity index 100%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/Enemy/EnemyData.cs.meta
rename to Assets/GameMain/Scripts/Base/Entity/Enemy/EnemyData.cs.meta
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/Enemy/EnemyProjectileData.cs b/Assets/GameMain/Scripts/Base/Entity/Enemy/EnemyProjectileData.cs
similarity index 84%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/Enemy/EnemyProjectileData.cs
rename to Assets/GameMain/Scripts/Base/Entity/Enemy/EnemyProjectileData.cs
index 5153d23..d8da270 100644
--- a/Assets/GameMain/Scripts/Base/Entity/EntityData/Enemy/EnemyProjectileData.cs
+++ b/Assets/GameMain/Scripts/Base/Entity/Enemy/EnemyProjectileData.cs
@@ -8,8 +8,8 @@ namespace SepCore.Entity
public class EnemyProjectileData : EntityDataBase
{
public EnemyProjectileData(int entityId, int ownerEntityId, CampType ownerCamp, int attackDamage,
- float speed, float lifeTime, Vector3 direction)
- : base(entityId, 0)
+ float speed, float lifeTime, Vector3 direction, string assetName = "BulletHandgun")
+ : base(assetName, entityId)
{
OwnerEntityId = ownerEntityId;
OwnerCamp = ownerCamp;
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/Enemy/EnemyProjectileData.cs.meta b/Assets/GameMain/Scripts/Base/Entity/Enemy/EnemyProjectileData.cs.meta
similarity index 100%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/Enemy/EnemyProjectileData.cs.meta
rename to Assets/GameMain/Scripts/Base/Entity/Enemy/EnemyProjectileData.cs.meta
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/Enemy/EnemyData.cs b/Assets/GameMain/Scripts/Base/Entity/EntityData/Enemy/EnemyData.cs
deleted file mode 100644
index 87b0d9c..0000000
--- a/Assets/GameMain/Scripts/Base/Entity/EntityData/Enemy/EnemyData.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-using System;
-using System.Collections.Generic;
-using SepCore.DataTable;
-using SepCore.Definition;
-using UnityEngine;
-
-namespace SepCore.Entity
-{
- [Serializable]
- public class EnemyData : TargetableObjectData
- {
- private DREnemy _drEnemy;
-
- public EnemyData(int entityId, DREnemy drEnemy, int level) : base(
- entityId, drEnemy.Id, CampType.Enemy)
- {
- _drEnemy = drEnemy;
- int effectiveLevel = Mathf.Max(1, level);
- MaxHealthBase = _drEnemy.MaxHealth + _drEnemy.HpAddPerLevel * (effectiveLevel - 1);
- }
-
- public EnemyType EnemyType => (EnemyType)_drEnemy.Id;
-
- public int EntityTypeId => _drEnemy.EntityTypeId;
-
- public override int MaxHealthBase { get; }
-
- public int AttackDamage => _drEnemy.AttackDamage;
-
- public float AttackCooldown => _drEnemy.AttackCooldown;
-
- public float AttackRange => _drEnemy.AttackRange;
-
- public float SpeedBase => _drEnemy.Speed;
-
- public int DropCoin => _drEnemy.DropCoin;
-
- public int DropExp => _drEnemy.DropExp;
-
- public float DropPercent => _drEnemy.DropPercent;
-
- public float Scale => _drEnemy.Scale;
-
- public Color Color => _drEnemy.Color;
-
- public IReadOnlyDictionary Params => _drEnemy.Params;
-
- public bool TryGetParam(string key, out string value)
- {
- value = null;
- if (string.IsNullOrEmpty(key) || _drEnemy?.Params == null)
- {
- return false;
- }
-
- return _drEnemy.Params.TryGetValue(key, out value);
- }
- }
-}
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponData.cs b/Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponData.cs
deleted file mode 100644
index edcc3e9..0000000
--- a/Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponData.cs
+++ /dev/null
@@ -1,104 +0,0 @@
-using System;
-using System.Collections.Generic;
-using SepCore.DataTable;
-using SepCore.Definition;
-using GameFramework;
-
-namespace SepCore.Entity
-{
- [Serializable]
- public class WeaponData : AccessoryObjectData
- {
- private DRWeapon _drWeapon;
-
- private int _entityTypeId = 0;
-
- public WeaponData(int entityId, DRWeapon drWeapon, int ownerId, CampType ownerCamp)
- : base(entityId, drWeapon.Id, ownerId, ownerCamp)
- {
- _drWeapon = drWeapon;
- _entityTypeId = drWeapon.EntityTypeId;
- }
-
- public WeaponType WeaponType => (WeaponType)_drWeapon.Id;
-
- public bool TryGetParam(string key, out string value)
- {
- value = null;
- if (string.IsNullOrEmpty(key) || Params == null)
- {
- return false;
- }
-
- return Params.TryGetValue(key, out value);
- }
-
- protected TParams ParseParams() where TParams : new()
- {
- if (string.IsNullOrWhiteSpace(_drWeapon.ParamsJson))
- {
- return new TParams();
- }
-
- try
- {
- TParams parsed = Utility.Json.ToObject(_drWeapon.ParamsJson);
- return parsed ?? new TParams();
- }
- catch (Exception exception)
- {
- throw new Exception(
- $"Failed to parse weapon params, WeaponType='{WeaponType}', Json='{_drWeapon.ParamsJson}'.",
- exception);
- }
- }
-
- ///
- /// 攻击力。
- ///
- public int Attack => _drWeapon.Attack;
-
- public int EntityTypeId => _entityTypeId;
-
- ///
- /// 武器名称。
- ///
- public string Title => _drWeapon.Title;
-
- ///
- /// 图标资源名称。
- ///
- public string IconAssetName => _drWeapon.IconAssetName;
-
- public ItemRarity Rarity => _drWeapon.Rarity;
-
- public int Price => _drWeapon.Price;
-
- ///
- /// 攻击间隔。
- ///
- public float Cooldown => _drWeapon.Cooldown;
-
- ///
- /// 攻击范围。
- ///
- public float AttackRange => _drWeapon.AttackRange;
-
- ///
- /// 攻击音效。
- ///
- public int AttackSoundId => _drWeapon.AttackSoundId;
-
- ///
- /// 额外参数。
- ///
- public Dictionary Params => _drWeapon.Pramas;
-
- public string ParamsJson => _drWeapon.ParamsJson;
-
- ///
- /// 额外属性。
- ///
- public StatModifier[] Modifiers => _drWeapon.Modifiers;
- }
-}
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/EntityDataBase.cs b/Assets/GameMain/Scripts/Base/Entity/EntityDataBase.cs
similarity index 70%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/EntityDataBase.cs
rename to Assets/GameMain/Scripts/Base/Entity/EntityDataBase.cs
index 322f32a..7844719 100644
--- a/Assets/GameMain/Scripts/Base/Entity/EntityData/EntityDataBase.cs
+++ b/Assets/GameMain/Scripts/Base/Entity/EntityDataBase.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using UnityEngine;
namespace SepCore.Entity
@@ -6,6 +6,8 @@ namespace SepCore.Entity
[Serializable]
public abstract class EntityDataBase
{
+ [SerializeField] private string m_AssetName = string.Empty;
+
[SerializeField] private int _id = 0;
[SerializeField] private int _typeId = 0;
@@ -14,19 +16,31 @@ namespace SepCore.Entity
[SerializeField] private Quaternion _rotation = Quaternion.identity;
+ public EntityDataBase(string assetName, int entityId)
+ {
+ m_AssetName = assetName;
+ _id = entityId;
+ }
+
public EntityDataBase(int entityId, int typeId)
{
+ m_AssetName = typeId.ToString();
_id = entityId;
_typeId = typeId;
}
+ ///
+ /// 实体资源名称。
+ ///
+ public string AssetName => m_AssetName;
+
///
/// 实体编号。
///
public int Id => _id;
///
- /// 实体类型编号。
+ /// 实体类型编号(向后兼容)。
///
public int TypeId => _typeId;
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/EntityDataBase.cs.meta b/Assets/GameMain/Scripts/Base/Entity/EntityDataBase.cs.meta
similarity index 100%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/EntityDataBase.cs.meta
rename to Assets/GameMain/Scripts/Base/Entity/EntityDataBase.cs.meta
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/ExpData.cs b/Assets/GameMain/Scripts/Base/Entity/ExpData.cs
similarity index 54%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/ExpData.cs
rename to Assets/GameMain/Scripts/Base/Entity/ExpData.cs
index a24a776..715ecad 100644
--- a/Assets/GameMain/Scripts/Base/Entity/EntityData/ExpData.cs
+++ b/Assets/GameMain/Scripts/Base/Entity/ExpData.cs
@@ -4,11 +4,15 @@ namespace SepCore.Entity
{
private int _value;
- public ExpData(int value, int entityId, int typeId) : base(entityId, typeId)
+ public ExpData(int value, int entityId, string assetName = "ExpEntity") : base(assetName, entityId)
{
_value = value;
}
+ public ExpData(int value, int entityId, int typeId) : this(value, entityId, "ExpEntity")
+ {
+ }
+
public int Value
{
get => _value;
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/ExpData.cs.meta b/Assets/GameMain/Scripts/Base/Entity/ExpData.cs.meta
similarity index 100%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/ExpData.cs.meta
rename to Assets/GameMain/Scripts/Base/Entity/ExpData.cs.meta
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/PlayerData.cs b/Assets/GameMain/Scripts/Base/Entity/PlayerData.cs
similarity index 50%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/PlayerData.cs
rename to Assets/GameMain/Scripts/Base/Entity/PlayerData.cs
index 2070bf1..7a96eaa 100644
--- a/Assets/GameMain/Scripts/Base/Entity/EntityData/PlayerData.cs
+++ b/Assets/GameMain/Scripts/Base/Entity/PlayerData.cs
@@ -8,9 +8,13 @@ namespace SepCore.Entity
{
private int _maxExp;
- public PlayerData(int entityId, int typeId) : base(entityId, typeId, CampType.Player)
+ public PlayerData(int entityId, string assetName = "Player") : base(assetName, entityId, CampType.Player)
+ {
+ MaxHealthBase = 100;
+ }
+
+ public PlayerData(int entityId, int typeId) : this(entityId, "Player")
{
- MaxHealthBase = MaxHealthBase;
}
public override int MaxHealthBase { get; }
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/PlayerData.cs.meta b/Assets/GameMain/Scripts/Base/Entity/PlayerData.cs.meta
similarity index 100%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/PlayerData.cs.meta
rename to Assets/GameMain/Scripts/Base/Entity/PlayerData.cs.meta
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/TargetableObjectData.cs b/Assets/GameMain/Scripts/Base/Entity/TargetableObjectData.cs
similarity index 75%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/TargetableObjectData.cs
rename to Assets/GameMain/Scripts/Base/Entity/TargetableObjectData.cs
index 1ed4ac9..04daa35 100644
--- a/Assets/GameMain/Scripts/Base/Entity/EntityData/TargetableObjectData.cs
+++ b/Assets/GameMain/Scripts/Base/Entity/TargetableObjectData.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using SepCore.Definition;
namespace SepCore.Entity
@@ -8,6 +8,12 @@ namespace SepCore.Entity
{
private CampType _camp;
+ public TargetableObjectData(string assetName, int entityId, CampType camp)
+ : base(assetName, entityId)
+ {
+ _camp = camp;
+ }
+
public TargetableObjectData(int entityId, int typeId, CampType camp)
: base(entityId, typeId)
{
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/TargetableObjectData.cs.meta b/Assets/GameMain/Scripts/Base/Entity/TargetableObjectData.cs.meta
similarity index 100%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/TargetableObjectData.cs.meta
rename to Assets/GameMain/Scripts/Base/Entity/TargetableObjectData.cs.meta
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon.meta b/Assets/GameMain/Scripts/Base/Entity/Weapon.meta
similarity index 100%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon.meta
rename to Assets/GameMain/Scripts/Base/Entity/Weapon.meta
diff --git a/Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponData.cs b/Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponData.cs
new file mode 100644
index 0000000..de04d1e
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponData.cs
@@ -0,0 +1,57 @@
+using System;
+using System.Collections.Generic;
+using SepCore.Definition;
+
+namespace SepCore.Entity
+{
+ [Serializable]
+ public class WeaponData : AccessoryObjectData
+ {
+ private readonly WeaponConfig _weaponConfig;
+
+ public WeaponData(int entityId, WeaponConfig weaponConfig, int ownerId, CampType ownerCamp)
+ : base(weaponConfig.Prefab, entityId, ownerId, ownerCamp)
+ {
+ _weaponConfig = weaponConfig;
+ }
+
+ public WeaponConfig Config => _weaponConfig;
+
+ public WeaponType WeaponType => (WeaponType)_weaponConfig.Id;
+
+ public int Attack => _weaponConfig.Attack;
+
+ public string Title => _weaponConfig.Name;
+
+ public string IconAssetName => _weaponConfig.IconAssetName;
+
+ public Rarity Rarity => _weaponConfig.Rarity;
+
+ public int Price => _weaponConfig.Price;
+
+ public float Cooldown => _weaponConfig.Cooldown / 1000f;
+
+ public float AttackRange => _weaponConfig.AttackRange / 1000f;
+
+ public int AttackSoundId => _weaponConfig.AttackSoundId;
+
+ public IReadOnlyDictionary Parameters => _weaponConfig.Parameters;
+
+ public IReadOnlyList Modifiers => _weaponConfig.Modifiers;
+
+ public int GetParam(ParamType paramType, int defaultValue = 0)
+ {
+ return _weaponConfig.Parameters.TryGetValue(paramType, out int value) ? value : defaultValue;
+ }
+
+ public float GetParamFloat(ParamType paramType, float defaultValue = 0f)
+ {
+ if (_weaponConfig.Parameters.TryGetValue(paramType, out int val))
+ {
+ return paramType == ParamType.SectorAngle ? val : val / 1000f;
+ }
+
+ return defaultValue;
+ }
+ }
+}
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponData.cs.meta b/Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponData.cs.meta
similarity index 100%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponData.cs.meta
rename to Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponData.cs.meta
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponHandgunData.cs b/Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponHandgunData.cs
similarity index 53%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponHandgunData.cs
rename to Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponHandgunData.cs
index 631b82f..deafdc5 100644
--- a/Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponHandgunData.cs
+++ b/Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponHandgunData.cs
@@ -1,5 +1,4 @@
using System;
-using SepCore.DataTable;
using SepCore.Definition;
namespace SepCore.Entity
@@ -13,10 +12,10 @@ namespace SepCore.Entity
{
public WeaponHandgunParamsData ParamsData { get; }
- public WeaponHandgunData(int entityId, DRWeapon drWeapon, int ownerId, CampType ownerCamp)
- : base(entityId, drWeapon, ownerId, ownerCamp)
+ public WeaponHandgunData(int entityId, WeaponConfig weaponConfig, int ownerId, CampType ownerCamp)
+ : base(entityId, weaponConfig, ownerId, ownerCamp)
{
- ParamsData = ParseParams();
+ ParamsData = new WeaponHandgunParamsData();
}
}
}
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponHandgunData.cs.meta b/Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponHandgunData.cs.meta
similarity index 100%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponHandgunData.cs.meta
rename to Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponHandgunData.cs.meta
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponKnifeData.cs b/Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponKnifeData.cs
similarity index 51%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponKnifeData.cs
rename to Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponKnifeData.cs
index 7ec192d..25d90f3 100644
--- a/Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponKnifeData.cs
+++ b/Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponKnifeData.cs
@@ -1,5 +1,4 @@
using System;
-using SepCore.DataTable;
using SepCore.Definition;
namespace SepCore.Entity
@@ -14,10 +13,13 @@ namespace SepCore.Entity
{
public WeaponKnifeParamsData ParamsData { get; }
- public WeaponKnifeData(int entityId, DRWeapon drWeapon, int ownerId, CampType ownerCamp)
- : base(entityId, drWeapon, ownerId, ownerCamp)
+ public WeaponKnifeData(int entityId, WeaponConfig weaponConfig, int ownerId, CampType ownerCamp)
+ : base(entityId, weaponConfig, ownerId, ownerCamp)
{
- ParamsData = ParseParams();
+ ParamsData = new WeaponKnifeParamsData
+ {
+ HitRadius = GetParamFloat(ParamType.HitRadius)
+ };
}
}
}
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponKnifeData.cs.meta b/Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponKnifeData.cs.meta
similarity index 100%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponKnifeData.cs.meta
rename to Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponKnifeData.cs.meta
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponLanceData.cs b/Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponLanceData.cs
similarity index 80%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponLanceData.cs
rename to Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponLanceData.cs
index 9ded75a..e247dc8 100644
--- a/Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponLanceData.cs
+++ b/Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponLanceData.cs
@@ -1,5 +1,4 @@
using System;
-using SepCore.DataTable;
using SepCore.Definition;
namespace SepCore.Entity
@@ -63,10 +62,15 @@ namespace SepCore.Entity
{
public WeaponLanceParamsData ParamsData { get; }
- public WeaponLanceData(int entityId, DRWeapon drWeapon, int ownerId, CampType ownerCamp)
- : base(entityId, drWeapon, ownerId, ownerCamp)
+ public WeaponLanceData(int entityId, WeaponConfig weaponConfig, int ownerId, CampType ownerCamp)
+ : base(entityId, weaponConfig, ownerId, ownerCamp)
{
- ParamsData = ParseParams();
+ ParamsData = new WeaponLanceParamsData
+ {
+ HitHalfWidth = GetParamFloat(ParamType.HitHalfWidth),
+ PierceLength = GetParamFloat(ParamType.PierceLength),
+ HitHeight = GetParamFloat(ParamType.HitHeight)
+ };
}
}
}
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponLanceData.cs.meta b/Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponLanceData.cs.meta
similarity index 100%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponLanceData.cs.meta
rename to Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponLanceData.cs.meta
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponLightningData.cs b/Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponLightningData.cs
similarity index 52%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponLightningData.cs
rename to Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponLightningData.cs
index d29871d..eadda4c 100644
--- a/Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponLightningData.cs
+++ b/Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponLightningData.cs
@@ -1,5 +1,4 @@
using System;
-using SepCore.DataTable;
using SepCore.Definition;
namespace SepCore.Entity
@@ -15,10 +14,14 @@ namespace SepCore.Entity
{
public WeaponLightningParamsData ParamsData { get; }
- public WeaponLightningData(int entityId, DRWeapon drWeapon, int ownerId, CampType ownerCamp)
- : base(entityId, drWeapon, ownerId, ownerCamp)
+ public WeaponLightningData(int entityId, WeaponConfig weaponConfig, int ownerId, CampType ownerCamp)
+ : base(entityId, weaponConfig, ownerId, ownerCamp)
{
- ParamsData = ParseParams();
+ ParamsData = new WeaponLightningParamsData
+ {
+ HitRadius = GetParamFloat(ParamType.HitRadius),
+ HoverHeight = 0f
+ };
}
}
}
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponLightningData.cs.meta b/Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponLightningData.cs.meta
similarity index 100%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponLightningData.cs.meta
rename to Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponLightningData.cs.meta
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponSlashData.cs b/Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponSlashData.cs
similarity index 51%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponSlashData.cs
rename to Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponSlashData.cs
index 33c1b79..c38018e 100644
--- a/Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponSlashData.cs
+++ b/Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponSlashData.cs
@@ -1,5 +1,4 @@
using System;
-using SepCore.DataTable;
using SepCore.Definition;
namespace SepCore.Entity
@@ -14,10 +13,13 @@ namespace SepCore.Entity
{
public WeaponSlashParamsData ParamsData { get; }
- public WeaponSlashData(int entityId, DRWeapon drWeapon, int ownerId, CampType ownerCamp)
- : base(entityId, drWeapon, ownerId, ownerCamp)
+ public WeaponSlashData(int entityId, WeaponConfig weaponConfig, int ownerId, CampType ownerCamp)
+ : base(entityId, weaponConfig, ownerId, ownerCamp)
{
- ParamsData = ParseParams();
+ ParamsData = new WeaponSlashParamsData
+ {
+ SectorAngle = GetParamFloat(ParamType.SectorAngle)
+ };
}
}
}
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponSlashData.cs.meta b/Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponSlashData.cs.meta
similarity index 100%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData/Weapon/WeaponSlashData.cs.meta
rename to Assets/GameMain/Scripts/Base/Entity/Weapon/WeaponSlashData.cs.meta
diff --git a/Assets/GameMain/Scripts/Base/Entity/EntityData.meta b/Assets/GameMain/Scripts/Base/Gen.meta
similarity index 58%
rename from Assets/GameMain/Scripts/Base/Entity/EntityData.meta
rename to Assets/GameMain/Scripts/Base/Gen.meta
index 4a80c65..ab9b63b 100644
--- a/Assets/GameMain/Scripts/Base/Entity/EntityData.meta
+++ b/Assets/GameMain/Scripts/Base/Gen.meta
@@ -1,9 +1,8 @@
fileFormatVersion: 2
-guid: 58efe0589d7e90f498c8bcbbf94c6be4
+guid: 01fef49ce20c2de4ab89a34533a83be1
folderAsset: yes
-timeCreated: 1528026151
-licenseType: Pro
DefaultImporter:
+ externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/CampType.cs b/Assets/GameMain/Scripts/Base/Gen/CampType.cs
new file mode 100644
index 0000000..1bb4880
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/CampType.cs
@@ -0,0 +1,50 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+
+
+namespace SepCore.Definition
+{
+ ///
+ /// 阵营类型
+ ///
+ public enum CampType : byte
+ {
+ ///
+ /// 未知
+ ///
+ Unknown = 0,
+ ///
+ /// 第一玩家阵营
+ ///
+ Player = 1,
+ ///
+ /// 第一敌人阵营
+ ///
+ Enemy = 2,
+ ///
+ /// 第一中立阵营
+ ///
+ Neutral = 3,
+ ///
+ /// 第二玩家阵营
+ ///
+ Player2 = 4,
+ ///
+ /// 第二敌人阵营
+ ///
+ Enemy2 = 5,
+ ///
+ /// 第二中立阵营
+ ///
+ Neutral2 = 6,
+ }
+
+}
+
diff --git a/Assets/GameMain/Scripts/Base/Gen/CampType.cs.meta b/Assets/GameMain/Scripts/Base/Gen/CampType.cs.meta
new file mode 100644
index 0000000..775e4cb
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/CampType.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c672b051e2eb2a941b5e08d3be0ee797
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/EnemyConfig.cs b/Assets/GameMain/Scripts/Base/Gen/EnemyConfig.cs
new file mode 100644
index 0000000..761b730
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/EnemyConfig.cs
@@ -0,0 +1,134 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+public sealed partial class EnemyConfig : Luban.BeanBase
+{
+ public EnemyConfig(ByteBuf _buf)
+ {
+ Name = _buf.ReadString();
+ MaxHealth = _buf.ReadInt();
+ HpAddPerLevel = _buf.ReadInt();
+ AttackDamage = _buf.ReadInt();
+ AttackCooldown = _buf.ReadFloat();
+ AttackRange = _buf.ReadFloat();
+ Speed = _buf.ReadFloat();
+ CoinDrop = _buf.ReadInt();
+ ExpDrop = _buf.ReadInt();
+ DropPercent = _buf.ReadFloat();
+ Scale = _buf.ReadFloat();
+ Color = _buf.ReadString();
+ Prefab = _buf.ReadString();
+ Prefab_Ref = null;
+ }
+
+ public static EnemyConfig DeserializeEnemyConfig(ByteBuf _buf)
+ {
+ return new EnemyConfig(_buf);
+ }
+
+ ///
+ /// 名称
+ ///
+ public readonly string Name;
+ ///
+ /// 最大生命
+ ///
+ public readonly int MaxHealth;
+ ///
+ /// 每关卡增加生命
+ ///
+ public readonly int HpAddPerLevel;
+ ///
+ /// 基础伤害
+ ///
+ public readonly int AttackDamage;
+ ///
+ /// 攻击间隔
+ ///
+ public readonly float AttackCooldown;
+ ///
+ /// 攻击范围
+ ///
+ public readonly float AttackRange;
+ ///
+ /// 移动速度
+ ///
+ public readonly float Speed;
+ ///
+ /// 金币掉落
+ ///
+ public readonly int CoinDrop;
+ ///
+ /// 经验掉落
+ ///
+ public readonly int ExpDrop;
+ ///
+ /// 掉落概率
+ ///
+ public readonly float DropPercent;
+ ///
+ /// 缩放
+ ///
+ public readonly float Scale;
+ ///
+ /// 颜色
+ ///
+ public readonly string Color;
+ ///
+ /// 预制体
+ ///
+ public readonly string Prefab;
+ public EntityConfig Prefab_Ref;
+
+ public const int __ID__ = 1284055242;
+ public override int GetTypeId() => __ID__;
+
+ public void ResolveRef(Tables tables)
+ {
+
+
+
+
+
+
+
+
+
+
+
+
+ Prefab_Ref = tables.TbEntityConfig.GetOrDefault(Prefab);
+ }
+
+ public override string ToString()
+ {
+ return "{ "
+ + "name:" + Name + ","
+ + "maxHealth:" + MaxHealth + ","
+ + "hpAddPerLevel:" + HpAddPerLevel + ","
+ + "attackDamage:" + AttackDamage + ","
+ + "attackCooldown:" + AttackCooldown + ","
+ + "attackRange:" + AttackRange + ","
+ + "speed:" + Speed + ","
+ + "coinDrop:" + CoinDrop + ","
+ + "expDrop:" + ExpDrop + ","
+ + "dropPercent:" + DropPercent + ","
+ + "scale:" + Scale + ","
+ + "color:" + Color + ","
+ + "prefab:" + Prefab + ","
+ + "}";
+ }
+}
+
+}
diff --git a/Assets/GameMain/Scripts/Base/Gen/EnemyConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/EnemyConfig.cs.meta
new file mode 100644
index 0000000..7313258
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/EnemyConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ddf3bc21c406b6e4b96c476d8b58bee4
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/EntityConfig.cs b/Assets/GameMain/Scripts/Base/Gen/EntityConfig.cs
new file mode 100644
index 0000000..d5456c3
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/EntityConfig.cs
@@ -0,0 +1,55 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+public sealed partial class EntityConfig : Luban.BeanBase
+{
+ public EntityConfig(ByteBuf _buf)
+ {
+ AssetName = _buf.ReadString();
+ PrefabPath = _buf.ReadString();
+ }
+
+ public static EntityConfig DeserializeEntityConfig(ByteBuf _buf)
+ {
+ return new EntityConfig(_buf);
+ }
+
+ ///
+ /// 资源名称
+ ///
+ public readonly string AssetName;
+ ///
+ /// 资源路径(相较于Assets/GameMain/Entities)
+ ///
+ public readonly string PrefabPath;
+
+ public const int __ID__ = 436072741;
+ public override int GetTypeId() => __ID__;
+
+ public void ResolveRef(Tables tables)
+ {
+
+
+ }
+
+ public override string ToString()
+ {
+ return "{ "
+ + "assetName:" + AssetName + ","
+ + "prefabPath:" + PrefabPath + ","
+ + "}";
+ }
+}
+
+}
diff --git a/Assets/GameMain/Scripts/Base/Gen/EntityConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/EntityConfig.cs.meta
new file mode 100644
index 0000000..b51db16
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/EntityConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 190eab4113697c9498714db5a1c630bd
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/GlobalConfig.cs b/Assets/GameMain/Scripts/Base/Gen/GlobalConfig.cs
new file mode 100644
index 0000000..ab805df
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/GlobalConfig.cs
@@ -0,0 +1,45 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+public sealed partial class GlobalConfig : Luban.BeanBase
+{
+ public GlobalConfig(ByteBuf _buf)
+ {
+ ElapsedTime = _buf.ReadInt();
+ }
+
+ public static GlobalConfig DeserializeGlobalConfig(ByteBuf _buf)
+ {
+ return new GlobalConfig(_buf);
+ }
+
+ public readonly int ElapsedTime;
+
+ public const int __ID__ = -958250779;
+ public override int GetTypeId() => __ID__;
+
+ public void ResolveRef(Tables tables)
+ {
+
+ }
+
+ public override string ToString()
+ {
+ return "{ "
+ + "elapsedTime:" + ElapsedTime + ","
+ + "}";
+ }
+}
+
+}
diff --git a/Assets/GameMain/Scripts/Base/Gen/GlobalConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/GlobalConfig.cs.meta
new file mode 100644
index 0000000..0a6937d
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/GlobalConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2eadc3a801b420e42a692a8251881fd2
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/GoodsConfig.cs b/Assets/GameMain/Scripts/Base/Gen/GoodsConfig.cs
new file mode 100644
index 0000000..ab75e7d
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/GoodsConfig.cs
@@ -0,0 +1,62 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+public sealed partial class GoodsConfig : Luban.BeanBase
+{
+ public GoodsConfig(ByteBuf _buf)
+ {
+ Id = _buf.ReadInt();
+ GoodsType = (GoodsType)_buf.ReadInt();
+ GoodsTypeId = _buf.ReadInt();
+ }
+
+ public static GoodsConfig DeserializeGoodsConfig(ByteBuf _buf)
+ {
+ return new GoodsConfig(_buf);
+ }
+
+ ///
+ /// 商品编号
+ ///
+ public readonly int Id;
+ ///
+ /// 商品类型
+ ///
+ public readonly GoodsType GoodsType;
+ ///
+ /// 商品对应物品Id
+ ///
+ public readonly int GoodsTypeId;
+
+ public const int __ID__ = 1358452248;
+ public override int GetTypeId() => __ID__;
+
+ public void ResolveRef(Tables tables)
+ {
+
+
+
+ }
+
+ public override string ToString()
+ {
+ return "{ "
+ + "Id:" + Id + ","
+ + "GoodsType:" + GoodsType + ","
+ + "GoodsTypeId:" + GoodsTypeId + ","
+ + "}";
+ }
+}
+
+}
diff --git a/Assets/GameMain/Scripts/Base/Gen/GoodsConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/GoodsConfig.cs.meta
new file mode 100644
index 0000000..8c11096
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/GoodsConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7b5ba1da241763e43a3c5f0e89f95404
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/GoodsType.cs b/Assets/GameMain/Scripts/Base/Gen/GoodsType.cs
new file mode 100644
index 0000000..d094e63
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/GoodsType.cs
@@ -0,0 +1,34 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+
+
+namespace SepCore.Definition
+{
+ ///
+ /// 商品类型
+ ///
+ public enum GoodsType : byte
+ {
+ ///
+ /// 无
+ ///
+ None = 0,
+ ///
+ /// 道具
+ ///
+ Prop = 1,
+ ///
+ /// 武器
+ ///
+ Weapon = 2,
+ }
+
+}
+
diff --git a/Assets/GameMain/Scripts/Base/Definition/Enum/GoodsType.cs.meta b/Assets/GameMain/Scripts/Base/Gen/GoodsType.cs.meta
similarity index 83%
rename from Assets/GameMain/Scripts/Base/Definition/Enum/GoodsType.cs.meta
rename to Assets/GameMain/Scripts/Base/Gen/GoodsType.cs.meta
index 07496d9..edb4aae 100644
--- a/Assets/GameMain/Scripts/Base/Definition/Enum/GoodsType.cs.meta
+++ b/Assets/GameMain/Scripts/Base/Gen/GoodsType.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 4b6d8e25599afc54bb6e29b09e606bbd
+guid: 2d0093ee34e61df448d002037325577e
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Assets/GameMain/Scripts/Base/Gen/LevelConfig.cs b/Assets/GameMain/Scripts/Base/Gen/LevelConfig.cs
new file mode 100644
index 0000000..555b16d
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/LevelConfig.cs
@@ -0,0 +1,59 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+public sealed partial class LevelConfig : Luban.BeanBase
+{
+ public LevelConfig(ByteBuf _buf)
+ {
+ Id = _buf.ReadInt();
+ {int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);EnemySpawnConfigs = new System.Collections.Generic.List(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { enemySpawnConfig _e0; _e0 = enemySpawnConfig.DeserializeenemySpawnConfig(_buf); EnemySpawnConfigs.Add(_e0);}}
+ Duration = _buf.ReadInt();
+ }
+
+ public static LevelConfig DeserializeLevelConfig(ByteBuf _buf)
+ {
+ return new LevelConfig(_buf);
+ }
+
+ ///
+ /// 关卡id
+ ///
+ public readonly int Id;
+ public readonly System.Collections.Generic.List EnemySpawnConfigs;
+ ///
+ /// 关卡时间
+ ///
+ public readonly int Duration;
+
+ public const int __ID__ = -1308229690;
+ public override int GetTypeId() => __ID__;
+
+ public void ResolveRef(Tables tables)
+ {
+
+ foreach (var _e in EnemySpawnConfigs) { _e?.ResolveRef(tables); }
+
+ }
+
+ public override string ToString()
+ {
+ return "{ "
+ + "id:" + Id + ","
+ + "enemySpawnConfigs:" + Luban.StringUtil.CollectionToString(EnemySpawnConfigs) + ","
+ + "duration:" + Duration + ","
+ + "}";
+ }
+}
+
+}
diff --git a/Assets/GameMain/Scripts/Base/Gen/LevelConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/LevelConfig.cs.meta
new file mode 100644
index 0000000..2367cbe
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/LevelConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 99b000f67ba374b45995312ff1d40309
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/LevelDropConfig.cs b/Assets/GameMain/Scripts/Base/Gen/LevelDropConfig.cs
new file mode 100644
index 0000000..1effb61
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/LevelDropConfig.cs
@@ -0,0 +1,83 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+public sealed partial class LevelDropConfig : Luban.BeanBase
+{
+ public LevelDropConfig(ByteBuf _buf)
+ {
+ Id = _buf.ReadInt();
+ WhiteWeight = _buf.ReadFloat();
+ GreenWeight = _buf.ReadFloat();
+ BlueWeight = _buf.ReadFloat();
+ PurpleWeight = _buf.ReadFloat();
+ RedWeight = _buf.ReadFloat();
+ }
+
+ public static LevelDropConfig DeserializeLevelDropConfig(ByteBuf _buf)
+ {
+ return new LevelDropConfig(_buf);
+ }
+
+ ///
+ /// 关卡编号
+ ///
+ public readonly int Id;
+ ///
+ /// 白色掉落率
+ ///
+ public readonly float WhiteWeight;
+ ///
+ /// 绿色掉落率
+ ///
+ public readonly float GreenWeight;
+ ///
+ /// 蓝色掉落率
+ ///
+ public readonly float BlueWeight;
+ ///
+ /// 紫色掉落率
+ ///
+ public readonly float PurpleWeight;
+ ///
+ /// 红色掉落率
+ ///
+ public readonly float RedWeight;
+
+ public const int __ID__ = 630655381;
+ public override int GetTypeId() => __ID__;
+
+ public void ResolveRef(Tables tables)
+ {
+
+
+
+
+
+
+ }
+
+ public override string ToString()
+ {
+ return "{ "
+ + "Id:" + Id + ","
+ + "WhiteWeight:" + WhiteWeight + ","
+ + "GreenWeight:" + GreenWeight + ","
+ + "BlueWeight:" + BlueWeight + ","
+ + "PurpleWeight:" + PurpleWeight + ","
+ + "RedWeight:" + RedWeight + ","
+ + "}";
+ }
+}
+
+}
diff --git a/Assets/GameMain/Scripts/Base/Gen/LevelDropConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/LevelDropConfig.cs.meta
new file mode 100644
index 0000000..5e05315
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/LevelDropConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 885d818e75c447947b2173e82ad3918b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/LevelExperienceConfig.cs b/Assets/GameMain/Scripts/Base/Gen/LevelExperienceConfig.cs
new file mode 100644
index 0000000..f587c7b
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/LevelExperienceConfig.cs
@@ -0,0 +1,292 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+public sealed partial class LevelExperienceConfig : Luban.BeanBase
+{
+ public LevelExperienceConfig(ByteBuf _buf)
+ {
+ Key = _buf.ReadString();
+ Lv0 = _buf.ReadInt();
+ Lv1 = _buf.ReadInt();
+ Lv2 = _buf.ReadInt();
+ Lv3 = _buf.ReadInt();
+ Lv4 = _buf.ReadInt();
+ Lv5 = _buf.ReadInt();
+ Lv6 = _buf.ReadInt();
+ Lv7 = _buf.ReadInt();
+ Lv8 = _buf.ReadInt();
+ Lv9 = _buf.ReadInt();
+ Lv10 = _buf.ReadInt();
+ Lv11 = _buf.ReadInt();
+ Lv12 = _buf.ReadInt();
+ Lv13 = _buf.ReadInt();
+ Lv14 = _buf.ReadInt();
+ Lv15 = _buf.ReadInt();
+ Lv16 = _buf.ReadInt();
+ Lv17 = _buf.ReadInt();
+ Lv18 = _buf.ReadInt();
+ Lv19 = _buf.ReadInt();
+ Lv20 = _buf.ReadInt();
+ Lv21 = _buf.ReadInt();
+ Lv22 = _buf.ReadInt();
+ Lv23 = _buf.ReadInt();
+ Lv24 = _buf.ReadInt();
+ Lv25 = _buf.ReadInt();
+ Lv26 = _buf.ReadInt();
+ Lv27 = _buf.ReadInt();
+ Lv28 = _buf.ReadInt();
+ Lv29 = _buf.ReadInt();
+ Lv30 = _buf.ReadInt();
+ Lv31 = _buf.ReadInt();
+ Lv32 = _buf.ReadInt();
+ Lv33 = _buf.ReadInt();
+ Lv34 = _buf.ReadInt();
+ Lv35 = _buf.ReadInt();
+ Lv36 = _buf.ReadInt();
+ Lv37 = _buf.ReadInt();
+ Lv38 = _buf.ReadInt();
+ Lv39 = _buf.ReadInt();
+ Lv40 = _buf.ReadInt();
+ Lv41 = _buf.ReadInt();
+ Lv42 = _buf.ReadInt();
+ Lv43 = _buf.ReadInt();
+ Lv44 = _buf.ReadInt();
+ Lv45 = _buf.ReadInt();
+ Lv46 = _buf.ReadInt();
+ Lv47 = _buf.ReadInt();
+ Lv48 = _buf.ReadInt();
+ Lv49 = _buf.ReadInt();
+ Lv50 = _buf.ReadInt();
+ Lv51 = _buf.ReadInt();
+ Lv52 = _buf.ReadInt();
+ Lv53 = _buf.ReadInt();
+ Lv54 = _buf.ReadInt();
+ Lv55 = _buf.ReadInt();
+ Lv56 = _buf.ReadInt();
+ Lv57 = _buf.ReadInt();
+ Lv58 = _buf.ReadInt();
+ Lv59 = _buf.ReadInt();
+ Lv60 = _buf.ReadInt();
+ }
+
+ public static LevelExperienceConfig DeserializeLevelExperienceConfig(ByteBuf _buf)
+ {
+ return new LevelExperienceConfig(_buf);
+ }
+
+ ///
+ /// 角色名
+ ///
+ public readonly string Key;
+ public readonly int Lv0;
+ public readonly int Lv1;
+ public readonly int Lv2;
+ public readonly int Lv3;
+ public readonly int Lv4;
+ public readonly int Lv5;
+ public readonly int Lv6;
+ public readonly int Lv7;
+ public readonly int Lv8;
+ public readonly int Lv9;
+ public readonly int Lv10;
+ public readonly int Lv11;
+ public readonly int Lv12;
+ public readonly int Lv13;
+ public readonly int Lv14;
+ public readonly int Lv15;
+ public readonly int Lv16;
+ public readonly int Lv17;
+ public readonly int Lv18;
+ public readonly int Lv19;
+ public readonly int Lv20;
+ public readonly int Lv21;
+ public readonly int Lv22;
+ public readonly int Lv23;
+ public readonly int Lv24;
+ public readonly int Lv25;
+ public readonly int Lv26;
+ public readonly int Lv27;
+ public readonly int Lv28;
+ public readonly int Lv29;
+ public readonly int Lv30;
+ public readonly int Lv31;
+ public readonly int Lv32;
+ public readonly int Lv33;
+ public readonly int Lv34;
+ public readonly int Lv35;
+ public readonly int Lv36;
+ public readonly int Lv37;
+ public readonly int Lv38;
+ public readonly int Lv39;
+ public readonly int Lv40;
+ public readonly int Lv41;
+ public readonly int Lv42;
+ public readonly int Lv43;
+ public readonly int Lv44;
+ public readonly int Lv45;
+ public readonly int Lv46;
+ public readonly int Lv47;
+ public readonly int Lv48;
+ public readonly int Lv49;
+ public readonly int Lv50;
+ public readonly int Lv51;
+ public readonly int Lv52;
+ public readonly int Lv53;
+ public readonly int Lv54;
+ public readonly int Lv55;
+ public readonly int Lv56;
+ public readonly int Lv57;
+ public readonly int Lv58;
+ public readonly int Lv59;
+ public readonly int Lv60;
+
+ public const int __ID__ = 1891645648;
+ public override int GetTypeId() => __ID__;
+
+ public void ResolveRef(Tables tables)
+ {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+
+ public override string ToString()
+ {
+ return "{ "
+ + "key:" + Key + ","
+ + "Lv0:" + Lv0 + ","
+ + "Lv1:" + Lv1 + ","
+ + "Lv2:" + Lv2 + ","
+ + "Lv3:" + Lv3 + ","
+ + "Lv4:" + Lv4 + ","
+ + "Lv5:" + Lv5 + ","
+ + "Lv6:" + Lv6 + ","
+ + "Lv7:" + Lv7 + ","
+ + "Lv8:" + Lv8 + ","
+ + "Lv9:" + Lv9 + ","
+ + "Lv10:" + Lv10 + ","
+ + "Lv11:" + Lv11 + ","
+ + "Lv12:" + Lv12 + ","
+ + "Lv13:" + Lv13 + ","
+ + "Lv14:" + Lv14 + ","
+ + "Lv15:" + Lv15 + ","
+ + "Lv16:" + Lv16 + ","
+ + "Lv17:" + Lv17 + ","
+ + "Lv18:" + Lv18 + ","
+ + "Lv19:" + Lv19 + ","
+ + "Lv20:" + Lv20 + ","
+ + "Lv21:" + Lv21 + ","
+ + "Lv22:" + Lv22 + ","
+ + "Lv23:" + Lv23 + ","
+ + "Lv24:" + Lv24 + ","
+ + "Lv25:" + Lv25 + ","
+ + "Lv26:" + Lv26 + ","
+ + "Lv27:" + Lv27 + ","
+ + "Lv28:" + Lv28 + ","
+ + "Lv29:" + Lv29 + ","
+ + "Lv30:" + Lv30 + ","
+ + "Lv31:" + Lv31 + ","
+ + "Lv32:" + Lv32 + ","
+ + "Lv33:" + Lv33 + ","
+ + "Lv34:" + Lv34 + ","
+ + "Lv35:" + Lv35 + ","
+ + "Lv36:" + Lv36 + ","
+ + "Lv37:" + Lv37 + ","
+ + "Lv38:" + Lv38 + ","
+ + "Lv39:" + Lv39 + ","
+ + "Lv40:" + Lv40 + ","
+ + "Lv41:" + Lv41 + ","
+ + "Lv42:" + Lv42 + ","
+ + "Lv43:" + Lv43 + ","
+ + "Lv44:" + Lv44 + ","
+ + "Lv45:" + Lv45 + ","
+ + "Lv46:" + Lv46 + ","
+ + "Lv47:" + Lv47 + ","
+ + "Lv48:" + Lv48 + ","
+ + "Lv49:" + Lv49 + ","
+ + "Lv50:" + Lv50 + ","
+ + "Lv51:" + Lv51 + ","
+ + "Lv52:" + Lv52 + ","
+ + "Lv53:" + Lv53 + ","
+ + "Lv54:" + Lv54 + ","
+ + "Lv55:" + Lv55 + ","
+ + "Lv56:" + Lv56 + ","
+ + "Lv57:" + Lv57 + ","
+ + "Lv58:" + Lv58 + ","
+ + "Lv59:" + Lv59 + ","
+ + "Lv60:" + Lv60 + ","
+ + "}";
+ }
+}
+
+}
diff --git a/Assets/GameMain/Scripts/Base/Gen/LevelExperienceConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/LevelExperienceConfig.cs.meta
new file mode 100644
index 0000000..a58aa8f
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/LevelExperienceConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9f625edfd0fc40345bd8147faa4a2ca1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/LevelUpRewardConfig.cs b/Assets/GameMain/Scripts/Base/Gen/LevelUpRewardConfig.cs
new file mode 100644
index 0000000..3fe856b
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/LevelUpRewardConfig.cs
@@ -0,0 +1,66 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+public sealed partial class LevelUpRewardConfig : Luban.BeanBase
+{
+ public LevelUpRewardConfig(ByteBuf _buf)
+ {
+ Id = _buf.ReadInt();
+ Title = _buf.ReadString();
+ Rarity = (Rarity)_buf.ReadInt();
+ {int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Modifiers = new System.Collections.Generic.List(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { modifier _e0; _e0 = modifier.Deserializemodifier(_buf); Modifiers.Add(_e0);}}
+ }
+
+ public static LevelUpRewardConfig DeserializeLevelUpRewardConfig(ByteBuf _buf)
+ {
+ return new LevelUpRewardConfig(_buf);
+ }
+
+ ///
+ /// 奖励编号
+ ///
+ public readonly int Id;
+ ///
+ /// 奖励名
+ ///
+ public readonly string Title;
+ ///
+ /// 道具品质
+ ///
+ public readonly Rarity Rarity;
+ public readonly System.Collections.Generic.List Modifiers;
+
+ public const int __ID__ = 1603299856;
+ public override int GetTypeId() => __ID__;
+
+ public void ResolveRef(Tables tables)
+ {
+
+
+
+ foreach (var _e in Modifiers) { _e?.ResolveRef(tables); }
+ }
+
+ public override string ToString()
+ {
+ return "{ "
+ + "id:" + Id + ","
+ + "title:" + Title + ","
+ + "rarity:" + Rarity + ","
+ + "modifiers:" + Luban.StringUtil.CollectionToString(Modifiers) + ","
+ + "}";
+ }
+}
+
+}
diff --git a/Assets/GameMain/Scripts/Base/Gen/LevelUpRewardConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/LevelUpRewardConfig.cs.meta
new file mode 100644
index 0000000..7ed406c
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/LevelUpRewardConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 71326e34f07cb9945b20e91d60f38186
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/MusicConfig.cs b/Assets/GameMain/Scripts/Base/Gen/MusicConfig.cs
new file mode 100644
index 0000000..0af6ade
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/MusicConfig.cs
@@ -0,0 +1,55 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+public sealed partial class MusicConfig : Luban.BeanBase
+{
+ public MusicConfig(ByteBuf _buf)
+ {
+ Id = _buf.ReadInt();
+ AssetName = _buf.ReadString();
+ }
+
+ public static MusicConfig DeserializeMusicConfig(ByteBuf _buf)
+ {
+ return new MusicConfig(_buf);
+ }
+
+ ///
+ /// 音乐编号
+ ///
+ public readonly int Id;
+ ///
+ /// 资源名称
+ ///
+ public readonly string AssetName;
+
+ public const int __ID__ = -1843325529;
+ public override int GetTypeId() => __ID__;
+
+ public void ResolveRef(Tables tables)
+ {
+
+
+ }
+
+ public override string ToString()
+ {
+ return "{ "
+ + "id:" + Id + ","
+ + "assetName:" + AssetName + ","
+ + "}";
+ }
+}
+
+}
diff --git a/Assets/GameMain/Scripts/Base/Gen/MusicConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/MusicConfig.cs.meta
new file mode 100644
index 0000000..9df0151
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/MusicConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5781a4179943295449af179456cabec2
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/ParamType.cs b/Assets/GameMain/Scripts/Base/Gen/ParamType.cs
new file mode 100644
index 0000000..d35f915
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/ParamType.cs
@@ -0,0 +1,46 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+
+
+namespace SepCore.Definition
+{
+ ///
+ /// 参数类型
+ ///
+ public enum ParamType : int
+ {
+ ///
+ /// 无
+ ///
+ None = 0,
+ ///
+ /// 攻击半径
+ ///
+ HitRadius = 1,
+ ///
+ /// 挥动角度
+ ///
+ SectorAngle = 2,
+ ///
+ /// 攻击半宽
+ ///
+ HitHalfWidth = 3,
+ ///
+ /// 戳刺长度
+ ///
+ PierceLength = 4,
+ ///
+ /// 攻击高度
+ ///
+ HitHeight = 5,
+ }
+
+}
+
diff --git a/Assets/GameMain/Scripts/Base/Gen/ParamType.cs.meta b/Assets/GameMain/Scripts/Base/Gen/ParamType.cs.meta
new file mode 100644
index 0000000..7038ae0
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/ParamType.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9a785535c64bd914c99b14f1fd33b6db
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/PropConfig.cs b/Assets/GameMain/Scripts/Base/Gen/PropConfig.cs
new file mode 100644
index 0000000..c66c2f3
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/PropConfig.cs
@@ -0,0 +1,73 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+public sealed partial class PropConfig : Luban.BeanBase
+{
+ public PropConfig(ByteBuf _buf)
+ {
+ Id = _buf.ReadInt();
+ Name = _buf.ReadString();
+ Rarity = (Rarity)_buf.ReadInt();
+ Price = _buf.ReadInt();
+ {int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Modifiers = new System.Collections.Generic.List(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { modifier _e0; _e0 = modifier.Deserializemodifier(_buf); Modifiers.Add(_e0);}}
+ }
+
+ public static PropConfig DeserializePropConfig(ByteBuf _buf)
+ {
+ return new PropConfig(_buf);
+ }
+
+ ///
+ /// 道具id
+ ///
+ public readonly int Id;
+ ///
+ /// 道具名
+ ///
+ public readonly string Name;
+ ///
+ /// 道具品质
+ ///
+ public readonly Rarity Rarity;
+ ///
+ /// 道具价格
+ ///
+ public readonly int Price;
+ public readonly System.Collections.Generic.List Modifiers;
+
+ public const int __ID__ = 91068581;
+ public override int GetTypeId() => __ID__;
+
+ public void ResolveRef(Tables tables)
+ {
+
+
+
+
+ foreach (var _e in Modifiers) { _e?.ResolveRef(tables); }
+ }
+
+ public override string ToString()
+ {
+ return "{ "
+ + "id:" + Id + ","
+ + "name:" + Name + ","
+ + "rarity:" + Rarity + ","
+ + "price:" + Price + ","
+ + "modifiers:" + Luban.StringUtil.CollectionToString(Modifiers) + ","
+ + "}";
+ }
+}
+
+}
diff --git a/Assets/GameMain/Scripts/Base/Gen/PropConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/PropConfig.cs.meta
new file mode 100644
index 0000000..c74eb88
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/PropConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d304263d3efd87a4a9b55c70b1c3eeee
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/Rarity.cs b/Assets/GameMain/Scripts/Base/Gen/Rarity.cs
new file mode 100644
index 0000000..d12784c
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/Rarity.cs
@@ -0,0 +1,46 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+
+
+namespace SepCore.Definition
+{
+ ///
+ /// 稀有度
+ ///
+ public enum Rarity : byte
+ {
+ ///
+ /// 无
+ ///
+ None = 0,
+ ///
+ /// 白
+ ///
+ White = 1,
+ ///
+ /// 绿
+ ///
+ Green = 2,
+ ///
+ /// 蓝
+ ///
+ Blue = 3,
+ ///
+ /// 紫
+ ///
+ Purple = 4,
+ ///
+ /// 红
+ ///
+ Red = 5,
+ }
+
+}
+
diff --git a/Assets/GameMain/Scripts/Base/Gen/Rarity.cs.meta b/Assets/GameMain/Scripts/Base/Gen/Rarity.cs.meta
new file mode 100644
index 0000000..2b2ab07
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/Rarity.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 328e66a7ca3814e4499226bd4be04170
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/RelationType.cs b/Assets/GameMain/Scripts/Base/Gen/RelationType.cs
new file mode 100644
index 0000000..c5e22e5
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/RelationType.cs
@@ -0,0 +1,38 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+
+
+namespace SepCore.Definition
+{
+ ///
+ /// 关系类型
+ ///
+ public enum RelationType : byte
+ {
+ ///
+ /// 未知
+ ///
+ Unknown = 0,
+ ///
+ /// 友好
+ ///
+ Friendly = 1,
+ ///
+ /// 中立
+ ///
+ Neutral = 2,
+ ///
+ /// 敌对
+ ///
+ Hostile = 3,
+ }
+
+}
+
diff --git a/Assets/GameMain/Scripts/Base/Gen/RelationType.cs.meta b/Assets/GameMain/Scripts/Base/Gen/RelationType.cs.meta
new file mode 100644
index 0000000..8796eaa
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/RelationType.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9fa67f831ebd8f14cb7fcfa3a16c71b8
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/RoleConfig.cs b/Assets/GameMain/Scripts/Base/Gen/RoleConfig.cs
new file mode 100644
index 0000000..7f83368
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/RoleConfig.cs
@@ -0,0 +1,74 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+public sealed partial class RoleConfig : Luban.BeanBase
+{
+ public RoleConfig(ByteBuf _buf)
+ {
+ Name = _buf.ReadString();
+ MaxHealth = _buf.ReadInt();
+ Speed = _buf.ReadFloat();
+ Coin = _buf.ReadInt();
+ {int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Modifiers = new System.Collections.Generic.List(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);InitialItems = new System.Collections.Generic.List(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { int _e0; _e0 = _buf.ReadInt(); InitialItems.Add(_e0);}}
+ Prefab = _buf.ReadString();
+ Prefab_Ref = null;
+ }
+
+ public static RoleConfig DeserializeRoleConfig(ByteBuf _buf)
+ {
+ return new RoleConfig(_buf);
+ }
+
+ public readonly string Name;
+ public readonly int MaxHealth;
+ public readonly float Speed;
+ public readonly int Coin;
+ ///
+ /// key
+ ///
+ public readonly System.Collections.Generic.List Modifiers;
+ public readonly System.Collections.Generic.List InitialItems;
+ public readonly string Prefab;
+ public EntityConfig Prefab_Ref;
+
+ public const int __ID__ = -1280631944;
+ public override int GetTypeId() => __ID__;
+
+ public void ResolveRef(Tables tables)
+ {
+
+
+
+
+ foreach (var _e in Modifiers) { _e?.ResolveRef(tables); }
+
+ Prefab_Ref = tables.TbEntityConfig.GetOrDefault(Prefab);
+ }
+
+ public override string ToString()
+ {
+ return "{ "
+ + "name:" + Name + ","
+ + "maxHealth:" + MaxHealth + ","
+ + "speed:" + Speed + ","
+ + "coin:" + Coin + ","
+ + "modifiers:" + Luban.StringUtil.CollectionToString(Modifiers) + ","
+ + "initialItems:" + Luban.StringUtil.CollectionToString(InitialItems) + ","
+ + "prefab:" + Prefab + ","
+ + "}";
+ }
+}
+
+}
diff --git a/Assets/GameMain/Scripts/Base/Gen/RoleConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/RoleConfig.cs.meta
new file mode 100644
index 0000000..36d8f87
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/RoleConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 294e05f9ab2cba3469382ebaafa20459
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/SceneConfig.cs b/Assets/GameMain/Scripts/Base/Gen/SceneConfig.cs
new file mode 100644
index 0000000..26d626d
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/SceneConfig.cs
@@ -0,0 +1,62 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+public sealed partial class SceneConfig : Luban.BeanBase
+{
+ public SceneConfig(ByteBuf _buf)
+ {
+ Id = (SceneType)_buf.ReadInt();
+ AssetName = _buf.ReadString();
+ BackgroundMusicId = _buf.ReadInt();
+ }
+
+ public static SceneConfig DeserializeSceneConfig(ByteBuf _buf)
+ {
+ return new SceneConfig(_buf);
+ }
+
+ ///
+ /// 场景编号
+ ///
+ public readonly SceneType Id;
+ ///
+ /// 资源名称
+ ///
+ public readonly string AssetName;
+ ///
+ /// 背景音乐编号
+ ///
+ public readonly int BackgroundMusicId;
+
+ public const int __ID__ = 935827150;
+ public override int GetTypeId() => __ID__;
+
+ public void ResolveRef(Tables tables)
+ {
+
+
+
+ }
+
+ public override string ToString()
+ {
+ return "{ "
+ + "id:" + Id + ","
+ + "assetName:" + AssetName + ","
+ + "backgroundMusicId:" + BackgroundMusicId + ","
+ + "}";
+ }
+}
+
+}
diff --git a/Assets/GameMain/Scripts/Base/Gen/SceneConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/SceneConfig.cs.meta
new file mode 100644
index 0000000..834e6a7
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/SceneConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 15645a2641a37ac49b27e551899dc4e1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/SceneType.cs b/Assets/GameMain/Scripts/Base/Gen/SceneType.cs
new file mode 100644
index 0000000..76c3796
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/SceneType.cs
@@ -0,0 +1,42 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+
+
+namespace SepCore.Definition
+{
+ ///
+ /// 场景类型
+ ///
+ public enum SceneType : byte
+ {
+ ///
+ /// 启动场景
+ ///
+ Launch = 0,
+ ///
+ /// 菜单场景
+ ///
+ Menu = 1,
+ ///
+ /// 主场景
+ ///
+ Main = 2,
+ ///
+ /// 压力测试
+ ///
+ StressTest = 3,
+ ///
+ /// 主游戏
+ ///
+ Game = 4,
+ }
+
+}
+
diff --git a/Assets/GameMain/Scripts/Base/Gen/SceneType.cs.meta b/Assets/GameMain/Scripts/Base/Gen/SceneType.cs.meta
new file mode 100644
index 0000000..8c7ed42
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/SceneType.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c5f8926205ae9d24d996ca8d0adad0f2
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/SoundConfig.cs b/Assets/GameMain/Scripts/Base/Gen/SoundConfig.cs
new file mode 100644
index 0000000..5cb0fb8
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/SoundConfig.cs
@@ -0,0 +1,97 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+public sealed partial class SoundConfig : Luban.BeanBase
+{
+ public SoundConfig(ByteBuf _buf)
+ {
+ Id = _buf.ReadInt();
+ Name = _buf.ReadString();
+ AssetName = _buf.ReadString();
+ Priority = _buf.ReadInt();
+ Loop = _buf.ReadBool();
+ Volume = _buf.ReadFloat();
+ SpatialBlend = _buf.ReadFloat();
+ MaxDistance = _buf.ReadFloat();
+ }
+
+ public static SoundConfig DeserializeSoundConfig(ByteBuf _buf)
+ {
+ return new SoundConfig(_buf);
+ }
+
+ ///
+ /// 声音编号
+ ///
+ public readonly int Id;
+ ///
+ /// 名字
+ ///
+ public readonly string Name;
+ ///
+ /// 资源名称
+ ///
+ public readonly string AssetName;
+ ///
+ /// 优先级(默认0,128最高,-128最低)
+ ///
+ public readonly int Priority;
+ ///
+ /// 是否循环
+ ///
+ public readonly bool Loop;
+ ///
+ /// 音量(0~1)
+ ///
+ public readonly float Volume;
+ ///
+ /// 声音空间混合量(0为2D,1为3D)
+ ///
+ public readonly float SpatialBlend;
+ ///
+ /// 声音最大距离
+ ///
+ public readonly float MaxDistance;
+
+ public const int __ID__ = -1164338927;
+ public override int GetTypeId() => __ID__;
+
+ public void ResolveRef(Tables tables)
+ {
+
+
+
+
+
+
+
+
+ }
+
+ public override string ToString()
+ {
+ return "{ "
+ + "id:" + Id + ","
+ + "name:" + Name + ","
+ + "assetName:" + AssetName + ","
+ + "priority:" + Priority + ","
+ + "loop:" + Loop + ","
+ + "volume:" + Volume + ","
+ + "spatialBlend:" + SpatialBlend + ","
+ + "maxDistance:" + MaxDistance + ","
+ + "}";
+ }
+}
+
+}
diff --git a/Assets/GameMain/Scripts/Base/Gen/SoundConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/SoundConfig.cs.meta
new file mode 100644
index 0000000..d8a8d4d
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/SoundConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: cf12b4b814d979845aee6edef8c12a7f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/SpriteConfig.cs b/Assets/GameMain/Scripts/Base/Gen/SpriteConfig.cs
new file mode 100644
index 0000000..98f607f
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/SpriteConfig.cs
@@ -0,0 +1,62 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+public sealed partial class SpriteConfig : Luban.BeanBase
+{
+ public SpriteConfig(ByteBuf _buf)
+ {
+ Key = _buf.ReadString();
+ AtlasPath = _buf.ReadString();
+ SpriteIndex = _buf.ReadInt();
+ }
+
+ public static SpriteConfig DeserializeSpriteConfig(ByteBuf _buf)
+ {
+ return new SpriteConfig(_buf);
+ }
+
+ ///
+ /// 资源键
+ ///
+ public readonly string Key;
+ ///
+ /// 图集路径(相对于 Assets/GameMain/Textures)
+ ///
+ public readonly string AtlasPath;
+ ///
+ /// Sprite 索引(-1 表示整张图)
+ ///
+ public readonly int SpriteIndex;
+
+ public const int __ID__ = -1527849337;
+ public override int GetTypeId() => __ID__;
+
+ public void ResolveRef(Tables tables)
+ {
+
+
+
+ }
+
+ public override string ToString()
+ {
+ return "{ "
+ + "key:" + Key + ","
+ + "atlasPath:" + AtlasPath + ","
+ + "spriteIndex:" + SpriteIndex + ","
+ + "}";
+ }
+}
+
+}
diff --git a/Assets/GameMain/Scripts/Base/Gen/SpriteConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/SpriteConfig.cs.meta
new file mode 100644
index 0000000..4ff6ac8
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/SpriteConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 254617e67991a934ba1bfaccf2985fd7
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/StatType.cs b/Assets/GameMain/Scripts/Base/Gen/StatType.cs
new file mode 100644
index 0000000..e4ad1ca
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/StatType.cs
@@ -0,0 +1,62 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+
+
+namespace SepCore.Definition
+{
+ ///
+ /// 属性类型
+ ///
+ public enum StatType : int
+ {
+ ///
+ /// 无
+ ///
+ None = 0,
+ ///
+ /// 最大生命
+ ///
+ MaxHealth = 1,
+ ///
+ /// 移动速度
+ ///
+ MovementSpeed = 2,
+ ///
+ /// 攻击力
+ ///
+ Attack = 3,
+ ///
+ /// 防御力
+ ///
+ Defense = 4,
+ ///
+ /// 攻击速度
+ ///
+ AttackSpeed = 5,
+ ///
+ /// 暴击率
+ ///
+ Critical = 6,
+ ///
+ /// 暴击伤害
+ ///
+ CriticalDamage = 7,
+ ///
+ /// 闪避率
+ ///
+ Dodge = 8,
+ ///
+ /// 自动吸收范围
+ ///
+ AbsorbRange = 9,
+ }
+
+}
+
diff --git a/Assets/GameMain/Scripts/Base/Gen/StatType.cs.meta b/Assets/GameMain/Scripts/Base/Gen/StatType.cs.meta
new file mode 100644
index 0000000..8e276b7
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/StatType.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 60d624990e872894c971fac46c38ce5b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/Tables.cs b/Assets/GameMain/Scripts/Base/Gen/Tables.cs
new file mode 100644
index 0000000..94e78e4
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/Tables.cs
@@ -0,0 +1,108 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+namespace SepCore.Definition
+{
+public partial class Tables
+{
+ ///
+ /// 敌人属性与行为
+ ///
+ public TbEnemyConfig TbEnemyConfig {get; }
+ ///
+ /// 实体配置
+ ///
+ public TbEntityConfig TbEntityConfig {get; }
+ ///
+ /// 全局零散配置(单例)
+ ///
+ public TbGlobalConfig TbGlobalConfig {get; }
+ public TbGoodsConfig TbGoodsConfig {get; }
+ public TbLevelConfig TbLevelConfig {get; }
+ public TbLevelDropConfig TbLevelDropConfig {get; }
+ public TbLevelExperienceConfig TbLevelExperienceConfig {get; }
+ public TbLevelUpRewardConfig TbLevelUpRewardConfig {get; }
+ ///
+ /// 音乐配置
+ ///
+ public TbMusicConfig TbMusicConfig {get; }
+ public TbPropConfig TbPropConfig {get; }
+ public TbRoleConfig TbRoleConfig {get; }
+ ///
+ /// 场景配置
+ ///
+ public TbSceneConfig TbSceneConfig {get; }
+ ///
+ /// 声音配置
+ ///
+ public TbSoundConfig TbSoundConfig {get; }
+ ///
+ /// 图片资源配置
+ ///
+ public TbSpriteConfig TbSpriteConfig {get; }
+ ///
+ /// 界面配置
+ ///
+ public TbUIFormConfig TbUIFormConfig {get; }
+ ///
+ /// 界面音效配置
+ ///
+ public TbUISoundConfig TbUISoundConfig {get; }
+ ///
+ /// 界面配置
+ ///
+ public TbWeaponConfig TbWeaponConfig {get; }
+
+ public Tables(System.Func loader)
+ {
+ TbEnemyConfig = new TbEnemyConfig(loader("tbenemyconfig"));
+ TbEntityConfig = new TbEntityConfig(loader("tbentityconfig"));
+ TbGlobalConfig = new TbGlobalConfig(loader("tbglobalconfig"));
+ TbGoodsConfig = new TbGoodsConfig(loader("tbgoodsconfig"));
+ TbLevelConfig = new TbLevelConfig(loader("tblevelconfig"));
+ TbLevelDropConfig = new TbLevelDropConfig(loader("tbleveldropconfig"));
+ TbLevelExperienceConfig = new TbLevelExperienceConfig(loader("tblevelexperienceconfig"));
+ TbLevelUpRewardConfig = new TbLevelUpRewardConfig(loader("tbleveluprewardconfig"));
+ TbMusicConfig = new TbMusicConfig(loader("tbmusicconfig"));
+ TbPropConfig = new TbPropConfig(loader("tbpropconfig"));
+ TbRoleConfig = new TbRoleConfig(loader("tbroleconfig"));
+ TbSceneConfig = new TbSceneConfig(loader("tbsceneconfig"));
+ TbSoundConfig = new TbSoundConfig(loader("tbsoundconfig"));
+ TbSpriteConfig = new TbSpriteConfig(loader("tbspriteconfig"));
+ TbUIFormConfig = new TbUIFormConfig(loader("tbuiformconfig"));
+ TbUISoundConfig = new TbUISoundConfig(loader("tbuisoundconfig"));
+ TbWeaponConfig = new TbWeaponConfig(loader("tbweaponconfig"));
+ ResolveRef();
+ }
+
+ private void ResolveRef()
+ {
+ TbEnemyConfig.ResolveRef(this);
+ TbEntityConfig.ResolveRef(this);
+ TbGlobalConfig.ResolveRef(this);
+ TbGoodsConfig.ResolveRef(this);
+ TbLevelConfig.ResolveRef(this);
+ TbLevelDropConfig.ResolveRef(this);
+ TbLevelExperienceConfig.ResolveRef(this);
+ TbLevelUpRewardConfig.ResolveRef(this);
+ TbMusicConfig.ResolveRef(this);
+ TbPropConfig.ResolveRef(this);
+ TbRoleConfig.ResolveRef(this);
+ TbSceneConfig.ResolveRef(this);
+ TbSoundConfig.ResolveRef(this);
+ TbSpriteConfig.ResolveRef(this);
+ TbUIFormConfig.ResolveRef(this);
+ TbUISoundConfig.ResolveRef(this);
+ TbWeaponConfig.ResolveRef(this);
+ }
+}
+
+}
diff --git a/Assets/GameMain/Scripts/Base/Gen/Tables.cs.meta b/Assets/GameMain/Scripts/Base/Gen/Tables.cs.meta
new file mode 100644
index 0000000..8f148f1
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/Tables.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9c3f9f566e955a548b29d0be95e3072b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbEnemyConfig.cs b/Assets/GameMain/Scripts/Base/Gen/TbEnemyConfig.cs
new file mode 100644
index 0000000..0397389
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbEnemyConfig.cs
@@ -0,0 +1,55 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+///
+/// 敌人属性与行为
+///
+public partial class TbEnemyConfig
+{
+ private readonly System.Collections.Generic.Dictionary _dataMap;
+ private readonly System.Collections.Generic.List _dataList;
+
+ public TbEnemyConfig(ByteBuf _buf)
+ {
+ _dataMap = new System.Collections.Generic.Dictionary();
+ _dataList = new System.Collections.Generic.List();
+
+ for(int n = _buf.ReadSize() ; n > 0 ; --n)
+ {
+ EnemyConfig _v;
+ _v = EnemyConfig.DeserializeEnemyConfig(_buf);
+ _dataList.Add(_v);
+ _dataMap.Add(_v.Name, _v);
+ }
+ }
+
+ public System.Collections.Generic.Dictionary DataMap => _dataMap;
+ public System.Collections.Generic.List DataList => _dataList;
+
+ public EnemyConfig GetOrDefault(string key) => _dataMap.TryGetValue(key, out var v) ? v : null;
+ public EnemyConfig Get(string key) => _dataMap[key];
+ public EnemyConfig this[string key] => _dataMap[key];
+
+ public void ResolveRef(Tables tables)
+ {
+ foreach(var _v in _dataList)
+ {
+ _v.ResolveRef(tables);
+ }
+ }
+
+}
+
+}
+
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbEnemyConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/TbEnemyConfig.cs.meta
new file mode 100644
index 0000000..ab38e99
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbEnemyConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 620071d2781f2204b8ffcd524807589b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbEntityConfig.cs b/Assets/GameMain/Scripts/Base/Gen/TbEntityConfig.cs
new file mode 100644
index 0000000..a76008a
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbEntityConfig.cs
@@ -0,0 +1,55 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+///
+/// 实体配置
+///
+public partial class TbEntityConfig
+{
+ private readonly System.Collections.Generic.Dictionary _dataMap;
+ private readonly System.Collections.Generic.List _dataList;
+
+ public TbEntityConfig(ByteBuf _buf)
+ {
+ _dataMap = new System.Collections.Generic.Dictionary();
+ _dataList = new System.Collections.Generic.List();
+
+ for(int n = _buf.ReadSize() ; n > 0 ; --n)
+ {
+ EntityConfig _v;
+ _v = EntityConfig.DeserializeEntityConfig(_buf);
+ _dataList.Add(_v);
+ _dataMap.Add(_v.AssetName, _v);
+ }
+ }
+
+ public System.Collections.Generic.Dictionary DataMap => _dataMap;
+ public System.Collections.Generic.List DataList => _dataList;
+
+ public EntityConfig GetOrDefault(string key) => _dataMap.TryGetValue(key, out var v) ? v : null;
+ public EntityConfig Get(string key) => _dataMap[key];
+ public EntityConfig this[string key] => _dataMap[key];
+
+ public void ResolveRef(Tables tables)
+ {
+ foreach(var _v in _dataList)
+ {
+ _v.ResolveRef(tables);
+ }
+ }
+
+}
+
+}
+
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbEntityConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/TbEntityConfig.cs.meta
new file mode 100644
index 0000000..c8356b5
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbEntityConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 546e5762047211a4fa6e7e1c75add3ad
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbGlobalConfig.cs b/Assets/GameMain/Scripts/Base/Gen/TbGlobalConfig.cs
new file mode 100644
index 0000000..8676d90
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbGlobalConfig.cs
@@ -0,0 +1,42 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+///
+/// 全局零散配置(单例)
+///
+public partial class TbGlobalConfig
+{
+
+ private readonly GlobalConfig _data;
+
+ public GlobalConfig Data => _data;
+
+ public TbGlobalConfig(ByteBuf _buf)
+ {
+ int n = _buf.ReadSize();
+ if (n != 1) throw new SerializationException("table mode=one, but size != 1");
+ _data = GlobalConfig.DeserializeGlobalConfig(_buf);
+ }
+
+
+ public int ElapsedTime => _data.ElapsedTime;
+
+ public void ResolveRef(Tables tables)
+ {
+ _data.ResolveRef(tables);
+ }
+}
+
+}
+
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbGlobalConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/TbGlobalConfig.cs.meta
new file mode 100644
index 0000000..8a15e45
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbGlobalConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a3f240ad9f5760d46b0f3ade1f1745c2
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbGoodsConfig.cs b/Assets/GameMain/Scripts/Base/Gen/TbGoodsConfig.cs
new file mode 100644
index 0000000..a6f1dd9
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbGoodsConfig.cs
@@ -0,0 +1,52 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+public partial class TbGoodsConfig
+{
+ private readonly System.Collections.Generic.Dictionary _dataMap;
+ private readonly System.Collections.Generic.List _dataList;
+
+ public TbGoodsConfig(ByteBuf _buf)
+ {
+ _dataMap = new System.Collections.Generic.Dictionary();
+ _dataList = new System.Collections.Generic.List();
+
+ for(int n = _buf.ReadSize() ; n > 0 ; --n)
+ {
+ GoodsConfig _v;
+ _v = GoodsConfig.DeserializeGoodsConfig(_buf);
+ _dataList.Add(_v);
+ _dataMap.Add(_v.Id, _v);
+ }
+ }
+
+ public System.Collections.Generic.Dictionary DataMap => _dataMap;
+ public System.Collections.Generic.List DataList => _dataList;
+
+ public GoodsConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
+ public GoodsConfig Get(int key) => _dataMap[key];
+ public GoodsConfig this[int key] => _dataMap[key];
+
+ public void ResolveRef(Tables tables)
+ {
+ foreach(var _v in _dataList)
+ {
+ _v.ResolveRef(tables);
+ }
+ }
+
+}
+
+}
+
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbGoodsConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/TbGoodsConfig.cs.meta
new file mode 100644
index 0000000..215966c
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbGoodsConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: adb15bc24b835dc47b1e46c698be3693
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbLevelConfig.cs b/Assets/GameMain/Scripts/Base/Gen/TbLevelConfig.cs
new file mode 100644
index 0000000..7bfe13f
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbLevelConfig.cs
@@ -0,0 +1,52 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+public partial class TbLevelConfig
+{
+ private readonly System.Collections.Generic.Dictionary _dataMap;
+ private readonly System.Collections.Generic.List _dataList;
+
+ public TbLevelConfig(ByteBuf _buf)
+ {
+ _dataMap = new System.Collections.Generic.Dictionary();
+ _dataList = new System.Collections.Generic.List();
+
+ for(int n = _buf.ReadSize() ; n > 0 ; --n)
+ {
+ LevelConfig _v;
+ _v = LevelConfig.DeserializeLevelConfig(_buf);
+ _dataList.Add(_v);
+ _dataMap.Add(_v.Id, _v);
+ }
+ }
+
+ public System.Collections.Generic.Dictionary DataMap => _dataMap;
+ public System.Collections.Generic.List DataList => _dataList;
+
+ public LevelConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
+ public LevelConfig Get(int key) => _dataMap[key];
+ public LevelConfig this[int key] => _dataMap[key];
+
+ public void ResolveRef(Tables tables)
+ {
+ foreach(var _v in _dataList)
+ {
+ _v.ResolveRef(tables);
+ }
+ }
+
+}
+
+}
+
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbLevelConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/TbLevelConfig.cs.meta
new file mode 100644
index 0000000..1171197
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbLevelConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 829706c35bd851b4899108195ac8ce09
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbLevelDropConfig.cs b/Assets/GameMain/Scripts/Base/Gen/TbLevelDropConfig.cs
new file mode 100644
index 0000000..d895eca
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbLevelDropConfig.cs
@@ -0,0 +1,52 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+public partial class TbLevelDropConfig
+{
+ private readonly System.Collections.Generic.Dictionary _dataMap;
+ private readonly System.Collections.Generic.List _dataList;
+
+ public TbLevelDropConfig(ByteBuf _buf)
+ {
+ _dataMap = new System.Collections.Generic.Dictionary();
+ _dataList = new System.Collections.Generic.List();
+
+ for(int n = _buf.ReadSize() ; n > 0 ; --n)
+ {
+ LevelDropConfig _v;
+ _v = LevelDropConfig.DeserializeLevelDropConfig(_buf);
+ _dataList.Add(_v);
+ _dataMap.Add(_v.Id, _v);
+ }
+ }
+
+ public System.Collections.Generic.Dictionary DataMap => _dataMap;
+ public System.Collections.Generic.List DataList => _dataList;
+
+ public LevelDropConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
+ public LevelDropConfig Get(int key) => _dataMap[key];
+ public LevelDropConfig this[int key] => _dataMap[key];
+
+ public void ResolveRef(Tables tables)
+ {
+ foreach(var _v in _dataList)
+ {
+ _v.ResolveRef(tables);
+ }
+ }
+
+}
+
+}
+
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbLevelDropConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/TbLevelDropConfig.cs.meta
new file mode 100644
index 0000000..1002f3f
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbLevelDropConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 39007f3f873557a47994c67b6287d5b9
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbLevelExperienceConfig.cs b/Assets/GameMain/Scripts/Base/Gen/TbLevelExperienceConfig.cs
new file mode 100644
index 0000000..a551790
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbLevelExperienceConfig.cs
@@ -0,0 +1,52 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+public partial class TbLevelExperienceConfig
+{
+ private readonly System.Collections.Generic.Dictionary _dataMap;
+ private readonly System.Collections.Generic.List _dataList;
+
+ public TbLevelExperienceConfig(ByteBuf _buf)
+ {
+ _dataMap = new System.Collections.Generic.Dictionary();
+ _dataList = new System.Collections.Generic.List();
+
+ for(int n = _buf.ReadSize() ; n > 0 ; --n)
+ {
+ LevelExperienceConfig _v;
+ _v = LevelExperienceConfig.DeserializeLevelExperienceConfig(_buf);
+ _dataList.Add(_v);
+ _dataMap.Add(_v.Key, _v);
+ }
+ }
+
+ public System.Collections.Generic.Dictionary DataMap => _dataMap;
+ public System.Collections.Generic.List DataList => _dataList;
+
+ public LevelExperienceConfig GetOrDefault(string key) => _dataMap.TryGetValue(key, out var v) ? v : null;
+ public LevelExperienceConfig Get(string key) => _dataMap[key];
+ public LevelExperienceConfig this[string key] => _dataMap[key];
+
+ public void ResolveRef(Tables tables)
+ {
+ foreach(var _v in _dataList)
+ {
+ _v.ResolveRef(tables);
+ }
+ }
+
+}
+
+}
+
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbLevelExperienceConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/TbLevelExperienceConfig.cs.meta
new file mode 100644
index 0000000..f4b5912
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbLevelExperienceConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ee45b2bf4f586714bb603688b2f6be7e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbLevelUpRewardConfig.cs b/Assets/GameMain/Scripts/Base/Gen/TbLevelUpRewardConfig.cs
new file mode 100644
index 0000000..9ecb459
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbLevelUpRewardConfig.cs
@@ -0,0 +1,52 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+public partial class TbLevelUpRewardConfig
+{
+ private readonly System.Collections.Generic.Dictionary _dataMap;
+ private readonly System.Collections.Generic.List _dataList;
+
+ public TbLevelUpRewardConfig(ByteBuf _buf)
+ {
+ _dataMap = new System.Collections.Generic.Dictionary();
+ _dataList = new System.Collections.Generic.List();
+
+ for(int n = _buf.ReadSize() ; n > 0 ; --n)
+ {
+ LevelUpRewardConfig _v;
+ _v = LevelUpRewardConfig.DeserializeLevelUpRewardConfig(_buf);
+ _dataList.Add(_v);
+ _dataMap.Add(_v.Id, _v);
+ }
+ }
+
+ public System.Collections.Generic.Dictionary DataMap => _dataMap;
+ public System.Collections.Generic.List DataList => _dataList;
+
+ public LevelUpRewardConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
+ public LevelUpRewardConfig Get(int key) => _dataMap[key];
+ public LevelUpRewardConfig this[int key] => _dataMap[key];
+
+ public void ResolveRef(Tables tables)
+ {
+ foreach(var _v in _dataList)
+ {
+ _v.ResolveRef(tables);
+ }
+ }
+
+}
+
+}
+
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbLevelUpRewardConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/TbLevelUpRewardConfig.cs.meta
new file mode 100644
index 0000000..f196a08
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbLevelUpRewardConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 24893d1ce918b4147abe878d54d80c0d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbMusicConfig.cs b/Assets/GameMain/Scripts/Base/Gen/TbMusicConfig.cs
new file mode 100644
index 0000000..9b1219b
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbMusicConfig.cs
@@ -0,0 +1,55 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+///
+/// 音乐配置
+///
+public partial class TbMusicConfig
+{
+ private readonly System.Collections.Generic.Dictionary _dataMap;
+ private readonly System.Collections.Generic.List _dataList;
+
+ public TbMusicConfig(ByteBuf _buf)
+ {
+ _dataMap = new System.Collections.Generic.Dictionary();
+ _dataList = new System.Collections.Generic.List();
+
+ for(int n = _buf.ReadSize() ; n > 0 ; --n)
+ {
+ MusicConfig _v;
+ _v = MusicConfig.DeserializeMusicConfig(_buf);
+ _dataList.Add(_v);
+ _dataMap.Add(_v.Id, _v);
+ }
+ }
+
+ public System.Collections.Generic.Dictionary DataMap => _dataMap;
+ public System.Collections.Generic.List DataList => _dataList;
+
+ public MusicConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
+ public MusicConfig Get(int key) => _dataMap[key];
+ public MusicConfig this[int key] => _dataMap[key];
+
+ public void ResolveRef(Tables tables)
+ {
+ foreach(var _v in _dataList)
+ {
+ _v.ResolveRef(tables);
+ }
+ }
+
+}
+
+}
+
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbMusicConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/TbMusicConfig.cs.meta
new file mode 100644
index 0000000..0541d97
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbMusicConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 97e38b7b870a6844297530dbbc6ecac5
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbPropConfig.cs b/Assets/GameMain/Scripts/Base/Gen/TbPropConfig.cs
new file mode 100644
index 0000000..fc7b682
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbPropConfig.cs
@@ -0,0 +1,52 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+public partial class TbPropConfig
+{
+ private readonly System.Collections.Generic.Dictionary _dataMap;
+ private readonly System.Collections.Generic.List _dataList;
+
+ public TbPropConfig(ByteBuf _buf)
+ {
+ _dataMap = new System.Collections.Generic.Dictionary();
+ _dataList = new System.Collections.Generic.List();
+
+ for(int n = _buf.ReadSize() ; n > 0 ; --n)
+ {
+ PropConfig _v;
+ _v = PropConfig.DeserializePropConfig(_buf);
+ _dataList.Add(_v);
+ _dataMap.Add(_v.Id, _v);
+ }
+ }
+
+ public System.Collections.Generic.Dictionary DataMap => _dataMap;
+ public System.Collections.Generic.List DataList => _dataList;
+
+ public PropConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
+ public PropConfig Get(int key) => _dataMap[key];
+ public PropConfig this[int key] => _dataMap[key];
+
+ public void ResolveRef(Tables tables)
+ {
+ foreach(var _v in _dataList)
+ {
+ _v.ResolveRef(tables);
+ }
+ }
+
+}
+
+}
+
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbPropConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/TbPropConfig.cs.meta
new file mode 100644
index 0000000..68f3aa1
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbPropConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 448872b0adca0524a8dec6f4b34622c9
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbRoleConfig.cs b/Assets/GameMain/Scripts/Base/Gen/TbRoleConfig.cs
new file mode 100644
index 0000000..aeef02c
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbRoleConfig.cs
@@ -0,0 +1,52 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+public partial class TbRoleConfig
+{
+ private readonly System.Collections.Generic.Dictionary _dataMap;
+ private readonly System.Collections.Generic.List _dataList;
+
+ public TbRoleConfig(ByteBuf _buf)
+ {
+ _dataMap = new System.Collections.Generic.Dictionary();
+ _dataList = new System.Collections.Generic.List();
+
+ for(int n = _buf.ReadSize() ; n > 0 ; --n)
+ {
+ RoleConfig _v;
+ _v = RoleConfig.DeserializeRoleConfig(_buf);
+ _dataList.Add(_v);
+ _dataMap.Add(_v.Name, _v);
+ }
+ }
+
+ public System.Collections.Generic.Dictionary DataMap => _dataMap;
+ public System.Collections.Generic.List DataList => _dataList;
+
+ public RoleConfig GetOrDefault(string key) => _dataMap.TryGetValue(key, out var v) ? v : null;
+ public RoleConfig Get(string key) => _dataMap[key];
+ public RoleConfig this[string key] => _dataMap[key];
+
+ public void ResolveRef(Tables tables)
+ {
+ foreach(var _v in _dataList)
+ {
+ _v.ResolveRef(tables);
+ }
+ }
+
+}
+
+}
+
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbRoleConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/TbRoleConfig.cs.meta
new file mode 100644
index 0000000..908b95a
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbRoleConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7a5ed286f1d68654ebca7c475b351d51
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbSceneConfig.cs b/Assets/GameMain/Scripts/Base/Gen/TbSceneConfig.cs
new file mode 100644
index 0000000..0d91dea
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbSceneConfig.cs
@@ -0,0 +1,55 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+///
+/// 场景配置
+///
+public partial class TbSceneConfig
+{
+ private readonly System.Collections.Generic.Dictionary _dataMap;
+ private readonly System.Collections.Generic.List _dataList;
+
+ public TbSceneConfig(ByteBuf _buf)
+ {
+ _dataMap = new System.Collections.Generic.Dictionary();
+ _dataList = new System.Collections.Generic.List();
+
+ for(int n = _buf.ReadSize() ; n > 0 ; --n)
+ {
+ SceneConfig _v;
+ _v = SceneConfig.DeserializeSceneConfig(_buf);
+ _dataList.Add(_v);
+ _dataMap.Add(_v.Id, _v);
+ }
+ }
+
+ public System.Collections.Generic.Dictionary DataMap => _dataMap;
+ public System.Collections.Generic.List DataList => _dataList;
+
+ public SceneConfig GetOrDefault(SceneType key) => _dataMap.TryGetValue(key, out var v) ? v : null;
+ public SceneConfig Get(SceneType key) => _dataMap[key];
+ public SceneConfig this[SceneType key] => _dataMap[key];
+
+ public void ResolveRef(Tables tables)
+ {
+ foreach(var _v in _dataList)
+ {
+ _v.ResolveRef(tables);
+ }
+ }
+
+}
+
+}
+
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbSceneConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/TbSceneConfig.cs.meta
new file mode 100644
index 0000000..9bfd628
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbSceneConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e51582e744e36db46a49a1ba330f789a
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbSoundConfig.cs b/Assets/GameMain/Scripts/Base/Gen/TbSoundConfig.cs
new file mode 100644
index 0000000..72a8ed0
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbSoundConfig.cs
@@ -0,0 +1,55 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+///
+/// 声音配置
+///
+public partial class TbSoundConfig
+{
+ private readonly System.Collections.Generic.Dictionary _dataMap;
+ private readonly System.Collections.Generic.List _dataList;
+
+ public TbSoundConfig(ByteBuf _buf)
+ {
+ _dataMap = new System.Collections.Generic.Dictionary();
+ _dataList = new System.Collections.Generic.List();
+
+ for(int n = _buf.ReadSize() ; n > 0 ; --n)
+ {
+ SoundConfig _v;
+ _v = SoundConfig.DeserializeSoundConfig(_buf);
+ _dataList.Add(_v);
+ _dataMap.Add(_v.Id, _v);
+ }
+ }
+
+ public System.Collections.Generic.Dictionary DataMap => _dataMap;
+ public System.Collections.Generic.List DataList => _dataList;
+
+ public SoundConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
+ public SoundConfig Get(int key) => _dataMap[key];
+ public SoundConfig this[int key] => _dataMap[key];
+
+ public void ResolveRef(Tables tables)
+ {
+ foreach(var _v in _dataList)
+ {
+ _v.ResolveRef(tables);
+ }
+ }
+
+}
+
+}
+
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbSoundConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/TbSoundConfig.cs.meta
new file mode 100644
index 0000000..59c7b29
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbSoundConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a8ec7abc7ff7e264a898f51d64882ad9
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbSpriteConfig.cs b/Assets/GameMain/Scripts/Base/Gen/TbSpriteConfig.cs
new file mode 100644
index 0000000..0c85e0e
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbSpriteConfig.cs
@@ -0,0 +1,55 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+///
+/// 图片资源配置
+///
+public partial class TbSpriteConfig
+{
+ private readonly System.Collections.Generic.Dictionary _dataMap;
+ private readonly System.Collections.Generic.List _dataList;
+
+ public TbSpriteConfig(ByteBuf _buf)
+ {
+ _dataMap = new System.Collections.Generic.Dictionary();
+ _dataList = new System.Collections.Generic.List();
+
+ for(int n = _buf.ReadSize() ; n > 0 ; --n)
+ {
+ SpriteConfig _v;
+ _v = SpriteConfig.DeserializeSpriteConfig(_buf);
+ _dataList.Add(_v);
+ _dataMap.Add(_v.Key, _v);
+ }
+ }
+
+ public System.Collections.Generic.Dictionary DataMap => _dataMap;
+ public System.Collections.Generic.List DataList => _dataList;
+
+ public SpriteConfig GetOrDefault(string key) => _dataMap.TryGetValue(key, out var v) ? v : null;
+ public SpriteConfig Get(string key) => _dataMap[key];
+ public SpriteConfig this[string key] => _dataMap[key];
+
+ public void ResolveRef(Tables tables)
+ {
+ foreach(var _v in _dataList)
+ {
+ _v.ResolveRef(tables);
+ }
+ }
+
+}
+
+}
+
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbSpriteConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/TbSpriteConfig.cs.meta
new file mode 100644
index 0000000..0184e37
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbSpriteConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e155b2f600a62f64db105359e73bca3b
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbUIFormConfig.cs b/Assets/GameMain/Scripts/Base/Gen/TbUIFormConfig.cs
new file mode 100644
index 0000000..801838f
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbUIFormConfig.cs
@@ -0,0 +1,55 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+///
+/// 界面配置
+///
+public partial class TbUIFormConfig
+{
+ private readonly System.Collections.Generic.Dictionary _dataMap;
+ private readonly System.Collections.Generic.List _dataList;
+
+ public TbUIFormConfig(ByteBuf _buf)
+ {
+ _dataMap = new System.Collections.Generic.Dictionary();
+ _dataList = new System.Collections.Generic.List();
+
+ for(int n = _buf.ReadSize() ; n > 0 ; --n)
+ {
+ UIFormConfig _v;
+ _v = UIFormConfig.DeserializeUIFormConfig(_buf);
+ _dataList.Add(_v);
+ _dataMap.Add(_v.Id, _v);
+ }
+ }
+
+ public System.Collections.Generic.Dictionary DataMap => _dataMap;
+ public System.Collections.Generic.List DataList => _dataList;
+
+ public UIFormConfig GetOrDefault(UIFormType key) => _dataMap.TryGetValue(key, out var v) ? v : null;
+ public UIFormConfig Get(UIFormType key) => _dataMap[key];
+ public UIFormConfig this[UIFormType key] => _dataMap[key];
+
+ public void ResolveRef(Tables tables)
+ {
+ foreach(var _v in _dataList)
+ {
+ _v.ResolveRef(tables);
+ }
+ }
+
+}
+
+}
+
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbUIFormConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/TbUIFormConfig.cs.meta
new file mode 100644
index 0000000..0d8b8ac
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbUIFormConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: bada51902477aba40a446ba2655ffa22
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbUISoundConfig.cs b/Assets/GameMain/Scripts/Base/Gen/TbUISoundConfig.cs
new file mode 100644
index 0000000..6c2f63a
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbUISoundConfig.cs
@@ -0,0 +1,55 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+///
+/// 界面音效配置
+///
+public partial class TbUISoundConfig
+{
+ private readonly System.Collections.Generic.Dictionary _dataMap;
+ private readonly System.Collections.Generic.List _dataList;
+
+ public TbUISoundConfig(ByteBuf _buf)
+ {
+ _dataMap = new System.Collections.Generic.Dictionary();
+ _dataList = new System.Collections.Generic.List();
+
+ for(int n = _buf.ReadSize() ; n > 0 ; --n)
+ {
+ UISoundConfig _v;
+ _v = UISoundConfig.DeserializeUISoundConfig(_buf);
+ _dataList.Add(_v);
+ _dataMap.Add(_v.Id, _v);
+ }
+ }
+
+ public System.Collections.Generic.Dictionary DataMap => _dataMap;
+ public System.Collections.Generic.List DataList => _dataList;
+
+ public UISoundConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
+ public UISoundConfig Get(int key) => _dataMap[key];
+ public UISoundConfig this[int key] => _dataMap[key];
+
+ public void ResolveRef(Tables tables)
+ {
+ foreach(var _v in _dataList)
+ {
+ _v.ResolveRef(tables);
+ }
+ }
+
+}
+
+}
+
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbUISoundConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/TbUISoundConfig.cs.meta
new file mode 100644
index 0000000..6e5f16a
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbUISoundConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b0452b54c190f1a4584930c8a0ae0413
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbWeaponConfig.cs b/Assets/GameMain/Scripts/Base/Gen/TbWeaponConfig.cs
new file mode 100644
index 0000000..1aa05be
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbWeaponConfig.cs
@@ -0,0 +1,55 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+///
+/// 界面配置
+///
+public partial class TbWeaponConfig
+{
+ private readonly System.Collections.Generic.Dictionary _dataMap;
+ private readonly System.Collections.Generic.List _dataList;
+
+ public TbWeaponConfig(ByteBuf _buf)
+ {
+ _dataMap = new System.Collections.Generic.Dictionary();
+ _dataList = new System.Collections.Generic.List();
+
+ for(int n = _buf.ReadSize() ; n > 0 ; --n)
+ {
+ WeaponConfig _v;
+ _v = WeaponConfig.DeserializeWeaponConfig(_buf);
+ _dataList.Add(_v);
+ _dataMap.Add(_v.Id, _v);
+ }
+ }
+
+ public System.Collections.Generic.Dictionary DataMap => _dataMap;
+ public System.Collections.Generic.List DataList => _dataList;
+
+ public WeaponConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
+ public WeaponConfig Get(int key) => _dataMap[key];
+ public WeaponConfig this[int key] => _dataMap[key];
+
+ public void ResolveRef(Tables tables)
+ {
+ foreach(var _v in _dataList)
+ {
+ _v.ResolveRef(tables);
+ }
+ }
+
+}
+
+}
+
diff --git a/Assets/GameMain/Scripts/Base/Gen/TbWeaponConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/TbWeaponConfig.cs.meta
new file mode 100644
index 0000000..df7b2d7
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/TbWeaponConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b4e8c01c17743604d849ce911da7948d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/UIFormConfig.cs b/Assets/GameMain/Scripts/Base/Gen/UIFormConfig.cs
new file mode 100644
index 0000000..aeb2e59
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/UIFormConfig.cs
@@ -0,0 +1,76 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+public sealed partial class UIFormConfig : Luban.BeanBase
+{
+ public UIFormConfig(ByteBuf _buf)
+ {
+ Id = (UIFormType)_buf.ReadInt();
+ AssetName = _buf.ReadString();
+ UIGroupName = _buf.ReadString();
+ AllowMultiInstance = _buf.ReadBool();
+ PauseCoveredUIForm = _buf.ReadBool();
+ }
+
+ public static UIFormConfig DeserializeUIFormConfig(ByteBuf _buf)
+ {
+ return new UIFormConfig(_buf);
+ }
+
+ ///
+ /// 界面编号
+ ///
+ public readonly UIFormType Id;
+ ///
+ /// 资源名称
+ ///
+ public readonly string AssetName;
+ ///
+ /// 界面组名称
+ ///
+ public readonly string UIGroupName;
+ ///
+ /// 是否允许多个界面实例
+ ///
+ public readonly bool AllowMultiInstance;
+ ///
+ /// 是否暂停被其覆盖的界面
+ ///
+ public readonly bool PauseCoveredUIForm;
+
+ public const int __ID__ = 1508218586;
+ public override int GetTypeId() => __ID__;
+
+ public void ResolveRef(Tables tables)
+ {
+
+
+
+
+
+ }
+
+ public override string ToString()
+ {
+ return "{ "
+ + "id:" + Id + ","
+ + "assetName:" + AssetName + ","
+ + "UIGroupName:" + UIGroupName + ","
+ + "allowMultiInstance:" + AllowMultiInstance + ","
+ + "pauseCoveredUIForm:" + PauseCoveredUIForm + ","
+ + "}";
+ }
+}
+
+}
diff --git a/Assets/GameMain/Scripts/Base/Gen/UIFormConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/UIFormConfig.cs.meta
new file mode 100644
index 0000000..aa44114
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/UIFormConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f1611dcba2dd49442ac8e143537240f8
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/UIFormType.cs b/Assets/GameMain/Scripts/Base/Gen/UIFormType.cs
new file mode 100644
index 0000000..b55b5e2
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/UIFormType.cs
@@ -0,0 +1,70 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+
+
+namespace SepCore.Definition
+{
+ ///
+ /// 界面类型
+ ///
+ public enum UIFormType : byte
+ {
+ ///
+ /// 未定义
+ ///
+ Undefined = 0,
+ ///
+ /// 弹出框
+ ///
+ DialogForm = 1,
+ ///
+ /// 主菜单界面
+ ///
+ MenuForm = 100,
+ ///
+ /// 设置界面
+ ///
+ SettingForm = 101,
+ ///
+ /// 关于界面
+ ///
+ AboutForm = 102,
+ ///
+ /// 开始菜单界面
+ ///
+ StartMenuForm = 103,
+ ///
+ /// 选择角色界面
+ ///
+ SelectRoleForm = 104,
+ ///
+ /// 商店界面
+ ///
+ ShopForm = 105,
+ ///
+ /// 局内HUD界面
+ ///
+ HudForm = 106,
+ ///
+ /// 升级奖励界面
+ ///
+ LevelUpForm = 107,
+ ///
+ /// 道具详情界面
+ ///
+ ItemTooltipForm = 108,
+ ///
+ /// 摇杆界面
+ ///
+ JoystickForm = 109,
+ }
+
+}
+
diff --git a/Assets/GameMain/Scripts/Base/Gen/UIFormType.cs.meta b/Assets/GameMain/Scripts/Base/Gen/UIFormType.cs.meta
new file mode 100644
index 0000000..c5f890a
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/UIFormType.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ffdb580b29ebf014a9da6175d98bbb13
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/UISoundConfig.cs b/Assets/GameMain/Scripts/Base/Gen/UISoundConfig.cs
new file mode 100644
index 0000000..6cb9d9f
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/UISoundConfig.cs
@@ -0,0 +1,69 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+public sealed partial class UISoundConfig : Luban.BeanBase
+{
+ public UISoundConfig(ByteBuf _buf)
+ {
+ Id = _buf.ReadInt();
+ AssetName = _buf.ReadString();
+ Priority = _buf.ReadInt();
+ Volume = _buf.ReadFloat();
+ }
+
+ public static UISoundConfig DeserializeUISoundConfig(ByteBuf _buf)
+ {
+ return new UISoundConfig(_buf);
+ }
+
+ ///
+ /// 声音编号
+ ///
+ public readonly int Id;
+ ///
+ /// 资源名称
+ ///
+ public readonly string AssetName;
+ ///
+ /// 优先级(默认0,128最高,-128最低)
+ ///
+ public readonly int Priority;
+ ///
+ /// 音量(0~1)
+ ///
+ public readonly float Volume;
+
+ public const int __ID__ = 499313149;
+ public override int GetTypeId() => __ID__;
+
+ public void ResolveRef(Tables tables)
+ {
+
+
+
+
+ }
+
+ public override string ToString()
+ {
+ return "{ "
+ + "id:" + Id + ","
+ + "assetName:" + AssetName + ","
+ + "priority:" + Priority + ","
+ + "volume:" + Volume + ","
+ + "}";
+ }
+}
+
+}
diff --git a/Assets/GameMain/Scripts/Base/Gen/UISoundConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/UISoundConfig.cs.meta
new file mode 100644
index 0000000..da54731
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/UISoundConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 97871103c14ed3446abbcd458bfd0108
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/WeaponConfig.cs b/Assets/GameMain/Scripts/Base/Gen/WeaponConfig.cs
new file mode 100644
index 0000000..af178fc
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/WeaponConfig.cs
@@ -0,0 +1,117 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+public sealed partial class WeaponConfig : Luban.BeanBase
+{
+ public WeaponConfig(ByteBuf _buf)
+ {
+ Id = _buf.ReadInt();
+ Name = _buf.ReadString();
+ Rarity = (Rarity)_buf.ReadInt();
+ Price = _buf.ReadInt();
+ Attack = _buf.ReadInt();
+ Cooldown = _buf.ReadInt();
+ AttackRange = _buf.ReadInt();
+ AttackSoundId = _buf.ReadInt();
+ {int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Parameters = new System.Collections.Generic.Dictionary(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);Modifiers = new System.Collections.Generic.List(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { modifier _e0; _e0 = modifier.Deserializemodifier(_buf); Modifiers.Add(_e0);}}
+ Prefab = _buf.ReadString();
+ Prefab_Ref = null;
+ }
+
+ public static WeaponConfig DeserializeWeaponConfig(ByteBuf _buf)
+ {
+ return new WeaponConfig(_buf);
+ }
+
+ ///
+ /// 武器id
+ ///
+ public readonly int Id;
+ ///
+ /// 武器名
+ ///
+ public readonly string Name;
+ ///
+ /// 道具品质
+ ///
+ public readonly Rarity Rarity;
+ ///
+ /// 武器价格
+ ///
+ public readonly int Price;
+ ///
+ /// 伤害
+ ///
+ public readonly int Attack;
+ ///
+ /// 冷却
+ ///
+ public readonly int Cooldown;
+ ///
+ /// 范围
+ ///
+ public readonly int AttackRange;
+ ///
+ /// 攻击音效编号
+ ///
+ public readonly int AttackSoundId;
+ ///
+ /// 参数类型
+ ///
+ public readonly System.Collections.Generic.Dictionary Parameters;
+ public readonly System.Collections.Generic.List Modifiers;
+ ///
+ /// 预制体
+ ///
+ public readonly string Prefab;
+ public EntityConfig Prefab_Ref;
+
+ public const int __ID__ = 127041694;
+ public override int GetTypeId() => __ID__;
+
+ public void ResolveRef(Tables tables)
+ {
+
+
+
+
+
+
+
+
+
+ foreach (var _e in Modifiers) { _e?.ResolveRef(tables); }
+ Prefab_Ref = tables.TbEntityConfig.GetOrDefault(Prefab);
+ }
+
+ public override string ToString()
+ {
+ return "{ "
+ + "id:" + Id + ","
+ + "name:" + Name + ","
+ + "rarity:" + Rarity + ","
+ + "price:" + Price + ","
+ + "attack:" + Attack + ","
+ + "cooldown:" + Cooldown + ","
+ + "attackRange:" + AttackRange + ","
+ + "attackSoundId:" + AttackSoundId + ","
+ + "parameters:" + Luban.StringUtil.CollectionToString(Parameters) + ","
+ + "modifiers:" + Luban.StringUtil.CollectionToString(Modifiers) + ","
+ + "prefab:" + Prefab + ","
+ + "}";
+ }
+}
+
+}
diff --git a/Assets/GameMain/Scripts/Base/Gen/WeaponConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/WeaponConfig.cs.meta
new file mode 100644
index 0000000..4c4264c
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/WeaponConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 04d50a9d8ffeaa74c95e42a3469fcfda
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/enemySpawnConfig.cs b/Assets/GameMain/Scripts/Base/Gen/enemySpawnConfig.cs
new file mode 100644
index 0000000..c1bc09d
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/enemySpawnConfig.cs
@@ -0,0 +1,67 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+///
+/// 出怪配置
+///
+public sealed partial class enemySpawnConfig : Luban.BeanBase
+{
+ public enemySpawnConfig(ByteBuf _buf)
+ {
+ EnemyName = _buf.ReadString();
+ EnemyName_Ref = null;
+ EnemyCount = _buf.ReadInt();
+ Interval = _buf.ReadInt();
+ }
+
+ public static enemySpawnConfig DeserializeenemySpawnConfig(ByteBuf _buf)
+ {
+ return new enemySpawnConfig(_buf);
+ }
+
+ ///
+ /// 要出的怪名
+ ///
+ public readonly string EnemyName;
+ public EnemyConfig EnemyName_Ref;
+ ///
+ /// 一次出的数量
+ ///
+ public readonly int EnemyCount;
+ ///
+ /// 每次出怪的间隔
+ ///
+ public readonly int Interval;
+
+ public const int __ID__ = -1182208523;
+ public override int GetTypeId() => __ID__;
+
+ public void ResolveRef(Tables tables)
+ {
+ EnemyName_Ref = tables.TbEnemyConfig.GetOrDefault(EnemyName);
+
+
+ }
+
+ public override string ToString()
+ {
+ return "{ "
+ + "enemyName:" + EnemyName + ","
+ + "enemyCount:" + EnemyCount + ","
+ + "interval:" + Interval + ","
+ + "}";
+ }
+}
+
+}
diff --git a/Assets/GameMain/Scripts/Base/Gen/enemySpawnConfig.cs.meta b/Assets/GameMain/Scripts/Base/Gen/enemySpawnConfig.cs.meta
new file mode 100644
index 0000000..a4dd086
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/enemySpawnConfig.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 38062314e7ee6f54aa545b69238b0831
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Gen/modifier.cs b/Assets/GameMain/Scripts/Base/Gen/modifier.cs
new file mode 100644
index 0000000..e935b0c
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/modifier.cs
@@ -0,0 +1,65 @@
+
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using Luban;
+
+
+namespace SepCore.Definition
+{
+///
+/// 修饰器
+///
+public sealed partial class modifier : Luban.BeanBase
+{
+ public modifier(ByteBuf _buf)
+ {
+ Key = (StatType)_buf.ReadInt();
+ Value = _buf.ReadInt();
+ IsPercent = _buf.ReadBool();
+ }
+
+ public static modifier Deserializemodifier(ByteBuf _buf)
+ {
+ return new modifier(_buf);
+ }
+
+ ///
+ /// 属性类型
+ ///
+ public readonly StatType Key;
+ ///
+ /// 值
+ ///
+ public readonly int Value;
+ ///
+ /// 是否为百分比
+ ///
+ public readonly bool IsPercent;
+
+ public const int __ID__ = -615513385;
+ public override int GetTypeId() => __ID__;
+
+ public void ResolveRef(Tables tables)
+ {
+
+
+
+ }
+
+ public override string ToString()
+ {
+ return "{ "
+ + "key:" + Key + ","
+ + "value:" + Value + ","
+ + "isPercent:" + IsPercent + ","
+ + "}";
+ }
+}
+
+}
diff --git a/Assets/GameMain/Scripts/Base/Gen/modifier.cs.meta b/Assets/GameMain/Scripts/Base/Gen/modifier.cs.meta
new file mode 100644
index 0000000..ec50011
--- /dev/null
+++ b/Assets/GameMain/Scripts/Base/Gen/modifier.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ada21588e4a8b724ba4a76c76d36b615
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/SepCore.Base.asmdef b/Assets/GameMain/Scripts/Base/SepCore.Base.asmdef
index aac8980..452120f 100644
--- a/Assets/GameMain/Scripts/Base/SepCore.Base.asmdef
+++ b/Assets/GameMain/Scripts/Base/SepCore.Base.asmdef
@@ -2,7 +2,8 @@
"name": "SepCore.Base",
"rootNamespace": "SepCore.Base",
"references": [
- "GUID:363c5eb08ff8e6a439b85e37b8c20d96"
+ "GUID:363c5eb08ff8e6a439b85e37b8c20d96",
+ "GUID:3bb549212964b4192b427888ac9382e7"
],
"includePlatforms": [],
"excludePlatforms": [],
diff --git a/Assets/GameMain/Scripts/Base/Utility/AssetUtility.cs b/Assets/GameMain/Scripts/Base/Utility/AssetUtility.cs
index 923bbf8..2611862 100644
--- a/Assets/GameMain/Scripts/Base/Utility/AssetUtility.cs
+++ b/Assets/GameMain/Scripts/Base/Utility/AssetUtility.cs
@@ -1,4 +1,5 @@
-using GameFramework;
+using System;
+using GameFramework;
namespace SepCore.CustomUtility
{
@@ -39,9 +40,19 @@ namespace SepCore.CustomUtility
return Utility.Text.Format("Assets/GameMain/Sounds/{0}.wav", assetName);
}
- public static string GetEntityAsset(string assetName)
+ public static string GetEntityAsset(string assetPath)
{
- return Utility.Text.Format("Assets/GameMain/Entities/{0}.prefab", assetName);
+ if (string.IsNullOrEmpty(assetPath))
+ {
+ return string.Empty;
+ }
+
+ if (assetPath.EndsWith(".prefab", StringComparison.OrdinalIgnoreCase))
+ {
+ return Utility.Text.Format("Assets/GameMain/Entities/{0}", assetPath);
+ }
+
+ return Utility.Text.Format("Assets/GameMain/Entities/{0}.prefab", assetPath);
}
public static string GetUIFormAsset(string assetName)
diff --git a/Assets/GameMain/Scripts/Base/Utility/EnumUtility.cs b/Assets/GameMain/Scripts/Base/Utility/EnumUtility.cs
deleted file mode 100644
index 4753e88..0000000
--- a/Assets/GameMain/Scripts/Base/Utility/EnumUtility.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System.Collections.Generic;
-using UnityGameFramework.Runtime;
-
-namespace SepCore.CustomUtility
-{
- public static class EnumUtility where T : struct, System.Enum
- {
- private static readonly Dictionary _enumCache = new();
-
- public static T Get(string value)
- {
- if (!_enumCache.TryGetValue(value, out T result))
- {
- if (System.Enum.TryParse(value, true, out result))
- {
- _enumCache[value] = result;
- }
- else
- {
- Log.Error($"Enum 解析失败:类型:{typeof(T).Name} 不包含值 {value}");
- }
- }
-
- return result;
- }
- }
-}
diff --git a/Assets/GameMain/Scripts/Base/Utility/EnumUtility.cs.meta b/Assets/GameMain/Scripts/Base/Utility/EnumUtility.cs.meta
deleted file mode 100644
index 0988cd9..0000000
--- a/Assets/GameMain/Scripts/Base/Utility/EnumUtility.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 8a39ac998e79e504fa643b459880ee9e
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Utility/JsonNetUtility.cs b/Assets/GameMain/Scripts/Base/Utility/JsonNetUtility.cs
deleted file mode 100644
index 189e9c0..0000000
--- a/Assets/GameMain/Scripts/Base/Utility/JsonNetUtility.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using System;
-using Newtonsoft.Json;
-
-namespace SepCore.CustomUtility
-{
- ///
- /// Newtonsoft.Json 函数集辅助器。
- ///
- public class JsonNetUtility : GameFramework.Utility.Json.IJsonHelper
- {
- public string ToJson(object obj)
- {
- return JsonConvert.SerializeObject(obj);
- }
-
- public T ToObject(string json)
- {
- return JsonConvert.DeserializeObject(json);
- }
-
- public object ToObject(Type objectType, string json)
- {
- return JsonConvert.DeserializeObject(json, objectType);
- }
- }
-}
\ No newline at end of file
diff --git a/Assets/GameMain/Scripts/Base/Utility/JsonNetUtility.cs.meta b/Assets/GameMain/Scripts/Base/Utility/JsonNetUtility.cs.meta
deleted file mode 100644
index 7034640..0000000
--- a/Assets/GameMain/Scripts/Base/Utility/JsonNetUtility.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: a2eb0a4b148e1c24ebc91cb3a2ef3180
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Base/Utility/RarityUtility.cs b/Assets/GameMain/Scripts/Base/Utility/RarityUtility.cs
deleted file mode 100644
index 936c26a..0000000
--- a/Assets/GameMain/Scripts/Base/Utility/RarityUtility.cs
+++ /dev/null
@@ -1,89 +0,0 @@
-using SepCore.DataTable;
-using SepCore.Definition;
-using GameFramework.DataTable;
-using UnityEngine;
-
-namespace SepCore.CustomUtility
-{
- public static class RarityUtility
- {
- public static ItemRarity SelectRarityForLevel(IDataTable table, int level)
- {
- DRLevelRarity row = GetLevelRarityRow(table, level);
- if (row == null)
- {
- return ItemRarity.White;
- }
-
- int white = Mathf.Max(0, row.WhiteWeight);
- int green = Mathf.Max(0, row.GreenWeight);
- int blue = Mathf.Max(0, row.BlueWeight);
- int purple = Mathf.Max(0, row.PurpleWeight);
- int red = Mathf.Max(0, row.RedWeight);
-
- int total = white + green + blue + purple + red;
- if (total <= 0)
- {
- return ItemRarity.White;
- }
-
- int roll = Random.Range(1, total + 1);
- if (roll <= white) return ItemRarity.White;
- roll -= white;
- if (roll <= green) return ItemRarity.Green;
- roll -= green;
- if (roll <= blue) return ItemRarity.Blue;
- roll -= blue;
- if (roll <= purple) return ItemRarity.Purple;
- return ItemRarity.Red;
- }
-
- private static DRLevelRarity GetLevelRarityRow(IDataTable table, int level)
- {
- if (table == null)
- {
- return null;
- }
-
- DRLevelRarity[] rows = table.GetAllDataRows();
- if (rows == null || rows.Length == 0)
- {
- return null;
- }
-
- int safeLevel = Mathf.Max(1, level);
- DRLevelRarity below = null;
- DRLevelRarity above = null;
-
- foreach (DRLevelRarity row in rows)
- {
- if (row == null)
- {
- continue;
- }
-
- if (safeLevel >= row.LevelMin && safeLevel <= row.LevelMax)
- {
- return row;
- }
-
- if (safeLevel < row.LevelMin)
- {
- if (above == null || row.LevelMin < above.LevelMin)
- {
- above = row;
- }
- }
- else if (safeLevel > row.LevelMax)
- {
- if (below == null || row.LevelMax > below.LevelMax)
- {
- below = row;
- }
- }
- }
-
- return above ?? below;
- }
- }
-}
diff --git a/Assets/GameMain/Scripts/Editor/PlayerBuffConsoleWindow.cs b/Assets/GameMain/Scripts/Editor/PlayerBuffConsoleWindow.cs
index e95785a..0476079 100644
--- a/Assets/GameMain/Scripts/Editor/PlayerBuffConsoleWindow.cs
+++ b/Assets/GameMain/Scripts/Editor/PlayerBuffConsoleWindow.cs
@@ -1,6 +1,5 @@
using System;
using System.Linq;
-using SepCore.DataTable;
using SepCore.Definition;
using SepCore.Entity;
using SepCore.Procedure;
@@ -19,8 +18,8 @@ namespace SepCore.Editor
private int _selectedIndex;
private int _addCount = 1;
private Vector2 _scroll;
- private DRProp[] _allProps = Array.Empty();
- private DRProp[] _filteredProps = Array.Empty();
+ private PropConfig[] _allProps = Array.Empty();
+ private PropConfig[] _filteredProps = Array.Empty();
private string[] _displayNames = Array.Empty();
private float _spawnRateScaleInput = 1f;
@@ -185,7 +184,7 @@ namespace SepCore.Editor
private void DrawSelectedBuffPreview()
{
- DRProp selectedProp = GetSelectedProp();
+ PropConfig selectedProp = GetSelectedProp();
if (selectedProp == null) return;
_scroll = EditorGUILayout.BeginScrollView(_scroll, GUILayout.Height(120f));
@@ -198,7 +197,7 @@ namespace SepCore.Editor
private void DrawBuffActions()
{
- DRProp selectedProp = GetSelectedProp();
+ PropConfig selectedProp = GetSelectedProp();
if (selectedProp == null) return;
_addCount = Mathf.Clamp(EditorGUILayout.IntField("Add Count", _addCount), 1, 99);
@@ -213,8 +212,7 @@ namespace SepCore.Editor
for (int i = 0; i < _addCount; i++)
{
- player.AddProp(new PropItem(selectedProp.Modifiers, selectedProp.Rarity, selectedProp.Title,
- selectedProp.IconAssetName));
+ player.AddProp(new PropItem(selectedProp));
}
ShowNotification(new GUIContent($"Added Buff: {selectedProp.Title} x{_addCount}"));
@@ -222,16 +220,16 @@ namespace SepCore.Editor
private void RefreshPropList()
{
- if (!EditorApplication.isPlaying || GameEntry.DataTable == null)
+ if (!EditorApplication.isPlaying || GameEntry.Luban == null)
{
- _allProps = Array.Empty();
- _filteredProps = Array.Empty();
+ _allProps = Array.Empty();
+ _filteredProps = Array.Empty();
_displayNames = Array.Empty();
return;
}
- var table = GameEntry.DataTable.GetDataTable();
- _allProps = table != null ? table.ToArray() : Array.Empty();
+ var table = GameEntry.Luban.GetTable();
+ _allProps = table != null ? table.ToArray() : Array.Empty();
_selectedIndex = 0;
ApplyFilter(_searchText);
}
@@ -240,7 +238,7 @@ namespace SepCore.Editor
{
if (_allProps == null || _allProps.Length == 0)
{
- _filteredProps = Array.Empty();
+ _filteredProps = Array.Empty();
_displayNames = Array.Empty();
return;
}
@@ -268,7 +266,7 @@ namespace SepCore.Editor
_selectedIndex = Mathf.Clamp(_selectedIndex, 0, _displayNames.Length - 1);
}
- private DRProp GetSelectedProp()
+ private PropConfig GetSelectedProp()
{
if (_filteredProps == null || _filteredProps.Length == 0) return null;
_selectedIndex = Mathf.Clamp(_selectedIndex, 0, _filteredProps.Length - 1);
diff --git a/Assets/GameMain/Scripts/Editor/SepCore.Editor.asmdef b/Assets/GameMain/Scripts/Editor/SepCore.Editor.asmdef
index 30bbbca..6b9ea5c 100644
--- a/Assets/GameMain/Scripts/Editor/SepCore.Editor.asmdef
+++ b/Assets/GameMain/Scripts/Editor/SepCore.Editor.asmdef
@@ -7,7 +7,8 @@
"GUID:47a82ffa13c291447ab895cd0bc251cd",
"GUID:436e23dbdc31e7d4fb5c3f804548b2df",
"GUID:0e1d182005e0ae647ab3fa40f5492dbb",
- "GUID:6f6ea874d7669044095abb01ec4c2f8d"
+ "GUID:6f6ea874d7669044095abb01ec4c2f8d",
+ "GUID:3bb549212964b4192b427888ac9382e7"
],
"includePlatforms": [
"Editor"
diff --git a/Assets/GameMain/Scripts/Presentation/Common/View/IconArea.cs b/Assets/GameMain/Scripts/Presentation/Common/View/IconArea.cs
index 229a133..e9fa4de 100644
--- a/Assets/GameMain/Scripts/Presentation/Common/View/IconArea.cs
+++ b/Assets/GameMain/Scripts/Presentation/Common/View/IconArea.cs
@@ -10,7 +10,7 @@ namespace SepCore.UI
[SerializeField] private Image _icon;
- public void OnInit(Sprite sprite, ItemRarity rarity)
+ public void OnInit(Sprite sprite, Rarity rarity)
{
SetIcon(sprite);
SetRarity(rarity);
@@ -21,15 +21,15 @@ namespace SepCore.UI
_icon.sprite = sprite;
}
- public void SetRarity(ItemRarity rarity)
+ public void SetRarity(Rarity rarity)
{
_board.color = rarity switch
{
- ItemRarity.White => Color.white,
- ItemRarity.Green => Color.green,
- ItemRarity.Blue => Color.blue,
- ItemRarity.Purple => Color.magenta,
- ItemRarity.Red => Color.red,
+ Rarity.White => Color.white,
+ Rarity.Green => Color.green,
+ Rarity.Blue => Color.blue,
+ Rarity.Purple => Color.magenta,
+ Rarity.Red => Color.red,
_ => Color.clear,
};
}
@@ -37,7 +37,7 @@ namespace SepCore.UI
public void OnReset()
{
SetIcon(null);
- SetRarity(ItemRarity.None);
+ SetRarity(Rarity.None);
}
}
-}
\ No newline at end of file
+}
diff --git a/Assets/GameMain/Scripts/Presentation/Main/ItemTooltip/ItemTooltipContext.cs b/Assets/GameMain/Scripts/Presentation/Main/ItemTooltip/ItemTooltipContext.cs
index d704189..51161b8 100644
--- a/Assets/GameMain/Scripts/Presentation/Main/ItemTooltip/ItemTooltipContext.cs
+++ b/Assets/GameMain/Scripts/Presentation/Main/ItemTooltip/ItemTooltipContext.cs
@@ -10,7 +10,7 @@ namespace SepCore.UI
public string IconAssetName;
public string Title;
public ItemType ItemType;
- public ItemRarity Rarity;
+ public Rarity Rarity;
public string Description;
public int Price;
public Vector3 TargetPos;
@@ -22,7 +22,7 @@ namespace SepCore.UI
IconAssetName = string.Empty;
Title = string.Empty;
ItemType = ItemType.None;
- Rarity = ItemRarity.White;
+ Rarity = Rarity.White;
Description = string.Empty;
Price = 0;
TargetPos = Vector3.zero;
diff --git a/Assets/GameMain/Scripts/Presentation/Main/LevelUp/LevelUpController.cs b/Assets/GameMain/Scripts/Presentation/Main/LevelUp/LevelUpController.cs
index 1bb2b24..05897b3 100644
--- a/Assets/GameMain/Scripts/Presentation/Main/LevelUp/LevelUpController.cs
+++ b/Assets/GameMain/Scripts/Presentation/Main/LevelUp/LevelUpController.cs
@@ -57,7 +57,7 @@ namespace SepCore.UI
{
Title = reward.Title,
Icon = null,
- ItemRarity = reward.Rarity,
+ Rarity = reward.Rarity,
Description = ItemDescUtility.CreatePropDescription(reward.Modifiers),
IconAssetName = reward.IconAssetName
});
diff --git a/Assets/GameMain/Scripts/Presentation/Main/LevelUp/LevelUpRewardItem.cs b/Assets/GameMain/Scripts/Presentation/Main/LevelUp/LevelUpRewardItem.cs
index 7735b7e..352d2d9 100644
--- a/Assets/GameMain/Scripts/Presentation/Main/LevelUp/LevelUpRewardItem.cs
+++ b/Assets/GameMain/Scripts/Presentation/Main/LevelUp/LevelUpRewardItem.cs
@@ -31,7 +31,7 @@ namespace SepCore.UI
if (_titleText != null) _titleText.text = context.Title;
if (_descriptionText != null) _descriptionText.text = context.Description;
- if (_iconArea != null) _iconArea.OnInit(context.Icon, context.ItemRarity);
+ if (_iconArea != null) _iconArea.OnInit(context.Icon, context.Rarity);
LoadIcon(_context.IconAssetName).Forget();
}
diff --git a/Assets/GameMain/Scripts/Presentation/Main/LevelUp/LevelUpRewardItemContext.cs b/Assets/GameMain/Scripts/Presentation/Main/LevelUp/LevelUpRewardItemContext.cs
index ec6f202..b734ff5 100644
--- a/Assets/GameMain/Scripts/Presentation/Main/LevelUp/LevelUpRewardItemContext.cs
+++ b/Assets/GameMain/Scripts/Presentation/Main/LevelUp/LevelUpRewardItemContext.cs
@@ -7,7 +7,7 @@ namespace SepCore.UI
{
public string Title;
public Sprite Icon;
- public ItemRarity ItemRarity;
+ public Rarity Rarity;
public string Description;
public string IconAssetName;
}
diff --git a/Assets/GameMain/Scripts/Presentation/Main/Shop/DisplayItemContext.cs b/Assets/GameMain/Scripts/Presentation/Main/Shop/DisplayItemContext.cs
index 652c240..b11a8ca 100644
--- a/Assets/GameMain/Scripts/Presentation/Main/Shop/DisplayItemContext.cs
+++ b/Assets/GameMain/Scripts/Presentation/Main/Shop/DisplayItemContext.cs
@@ -5,13 +5,13 @@ namespace SepCore.UI
public class DisplayItemContext : UIContext
{
public string IconAssetName;
- public ItemRarity Rarity;
+ public Rarity Rarity;
public bool IsWeapon;
public DisplayItemContext()
{
IconAssetName = string.Empty;
- Rarity = ItemRarity.None;
+ Rarity = Rarity.None;
IsWeapon = false;
}
diff --git a/Assets/GameMain/Scripts/Presentation/Main/Shop/GoodsItemContext.cs b/Assets/GameMain/Scripts/Presentation/Main/Shop/GoodsItemContext.cs
index 4101912..1eacdfa 100644
--- a/Assets/GameMain/Scripts/Presentation/Main/Shop/GoodsItemContext.cs
+++ b/Assets/GameMain/Scripts/Presentation/Main/Shop/GoodsItemContext.cs
@@ -1,7 +1,7 @@
using Cysharp.Threading.Tasks;
using SepCore.CustomUtility;
-using SepCore.DataTable;
using SepCore.Definition;
+using SepCore.Entity;
using UnityEngine;
namespace SepCore.UI
@@ -9,7 +9,7 @@ namespace SepCore.UI
public class GoodsItemContext : UIContext
{
public string Title;
- public ItemRarity Rarity;
+ public Rarity Rarity;
public Sprite Icon;
public ItemType ItemType;
public string Description;
@@ -19,35 +19,50 @@ namespace SepCore.UI
{
Title = string.Empty;
Description = string.Empty;
- Rarity = ItemRarity.White;
+ Rarity = Rarity.White;
Price = 0;
Icon = null;
- ItemType = ItemType.None;
+ ItemType = ItemType.Weapon;
}
- public GoodsItemContext(GoodsItemRawData rawData)
+ public GoodsItemContext(GoodsItemRawData rawData)
{
+ if (rawData == null)
+ {
+ Title = string.Empty;
+ Description = string.Empty;
+ Rarity = Rarity.White;
+ Price = 0;
+ Icon = null;
+ ItemType = ItemType.Weapon;
+ return;
+ }
Price = rawData.Price;
Rarity = rawData.Rarity;
ItemType = rawData.ItemType;
-
- if (ItemType == ItemType.None)
+ if (rawData.DataRow == null)
{
- Description = string.Empty;
Icon = null;
Title = string.Empty;
}
else if (ItemType == ItemType.Weapon)
{
- var weapon = (DRWeapon)rawData.DataRow;
- Title = weapon.Title;
- Description = ItemDescUtility.CreateWeaponDescription(weapon);
+ if (rawData.DataRow is WeaponConfig weaponConfig)
+ {
+ Title = weaponConfig.Name;
+ Description = ItemDescUtility.CreateWeaponDescription(weaponConfig);
+ }
+ else if (rawData.DataRow is WeaponData weaponData)
+ {
+ Title = weaponData.Title;
+ Description = ItemDescUtility.CreateWeaponDescription(weaponData);
+ }
}
else
{
- var prop = (DRProp)rawData.DataRow;
+ var prop = (PropConfig)rawData.DataRow;
Title = prop.Title;
Description = ItemDescUtility.CreatePropDescription(prop.Modifiers);
}
diff --git a/Assets/GameMain/Scripts/Presentation/Main/Shop/ShopController.BuildContext.cs b/Assets/GameMain/Scripts/Presentation/Main/Shop/ShopController.BuildContext.cs
index d6e9b99..2f87971 100644
--- a/Assets/GameMain/Scripts/Presentation/Main/Shop/ShopController.BuildContext.cs
+++ b/Assets/GameMain/Scripts/Presentation/Main/Shop/ShopController.BuildContext.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using Cysharp.Threading.Tasks;
-using SepCore.DataTable;
using SepCore.Definition;
+using SepCore.Entity;
using SepCore.Entity.Weapon;
using UnityGameFramework.Runtime;
@@ -109,7 +109,7 @@ namespace SepCore.UI
private static DisplayItemContext BuildPropItem(PropItem propItem)
{
string iconAssetName = null;
- ItemRarity rarity = ItemRarity.None;
+ Rarity rarity = Rarity.None;
if (propItem != null)
{
@@ -128,7 +128,7 @@ namespace SepCore.UI
private static DisplayItemContext BuildWeaponItem(WeaponBase weaponBase)
{
string iconAssetName = null;
- ItemRarity rarity = ItemRarity.None;
+ Rarity rarity = Rarity.None;
if (weaponBase != null && weaponBase.WeaponData != null)
{
@@ -164,8 +164,13 @@ namespace SepCore.UI
var context = new GoodsItemContext(rawData);
context.Icon = context.ItemType switch
{
- ItemType.Weapon => await GameEntry.SpriteCache.GetSprite(((DRWeapon)rawData.DataRow).IconAssetName),
- ItemType.Prop => await GameEntry.SpriteCache.GetSprite(((DRProp)rawData.DataRow).IconAssetName),
+ ItemType.Weapon => await GameEntry.SpriteCache.GetSprite(rawData.DataRow switch
+ {
+ WeaponConfig weaponConfig => weaponConfig.IconAssetName,
+ WeaponData weaponData => weaponData.IconAssetName,
+ _ => string.Empty
+ }),
+ ItemType.Prop => await GameEntry.SpriteCache.GetSprite(((PropConfig)rawData.DataRow).IconAssetName),
_ => null
};
return context;
diff --git a/Assets/GameMain/Scripts/Presentation/SepCore.Presentation.asmdef b/Assets/GameMain/Scripts/Presentation/SepCore.Presentation.asmdef
index 5487671..0da01f6 100644
--- a/Assets/GameMain/Scripts/Presentation/SepCore.Presentation.asmdef
+++ b/Assets/GameMain/Scripts/Presentation/SepCore.Presentation.asmdef
@@ -7,7 +7,8 @@
"GUID:363c5eb08ff8e6a439b85e37b8c20d96",
"GUID:47a82ffa13c291447ab895cd0bc251cd",
"GUID:436e23dbdc31e7d4fb5c3f804548b2df",
- "GUID:d54b9488b03814a44ab937f0aeb738b1"
+ "GUID:d54b9488b03814a44ab937f0aeb738b1",
+ "GUID:3bb549212964b4192b427888ac9382e7"
],
"includePlatforms": [],
"excludePlatforms": [],
diff --git a/Assets/GameMain/Scripts/Presentation/Utility/ItemDescUtility.cs b/Assets/GameMain/Scripts/Presentation/Utility/ItemDescUtility.cs
index 743fa92..fe8683c 100644
--- a/Assets/GameMain/Scripts/Presentation/Utility/ItemDescUtility.cs
+++ b/Assets/GameMain/Scripts/Presentation/Utility/ItemDescUtility.cs
@@ -1,29 +1,22 @@
+using System;
using System.Collections.Generic;
using System.Text;
-using SepCore.DataTable;
using SepCore.Definition;
using SepCore.Entity;
using SepCore.Entity.Weapon;
-using System;
using UnityGameFramework.Runtime;
namespace SepCore.CustomUtility
{
public static class ItemDescUtility
{
- private static readonly Dictionary _paramsDict = new(StringComparer.OrdinalIgnoreCase)
+ private static readonly Dictionary _paramTypeNames = new()
{
- {"hitHalfWidth", "横向半宽"},
- {"hitRadius", "攻击半宽"},
- {"hitHeight", "判定高度"},
- {"hitCenterYOffset", "判定高度偏移"},
- {"sectorAngle", "攻击角度"},
- {"pierceLength", "前戳距离"},
- {"thrustDistance", "前戳距离(旧)"},
- {"forwardOffset", "前置偏移"},
- {"rotateSpeed", "转向速度"},
- {"attackDuration", "突刺时长"},
- {"returnDuration", "收枪时长"}
+ { ParamType.HitRadius, "攻击半宽" },
+ { ParamType.SectorAngle, "攻击角度" },
+ { ParamType.HitHalfWidth, "横向半宽" },
+ { ParamType.PierceLength, "前戳距离" },
+ { ParamType.HitHeight, "判定高度" },
};
private static readonly string[] _statTypeNames =
@@ -39,30 +32,43 @@ namespace SepCore.CustomUtility
"闪避",
"金币/经验吸收范围"
};
-
- public static string Describe(StatModifier modifier)
+
+ public static string Describe(modifier modifier)
{
if (modifier == null)
{
return string.Empty;
}
- string name = _statTypeNames[(int)modifier.StatType];
+ string name = _statTypeNames[(int)modifier.Key];
string colorTag = modifier.Value > 0 ? "green" : "red";
string suffix = modifier.IsPercent ? "%" : string.Empty;
- float displayValue = modifier.IsPercent ? modifier.Value * 100 : modifier.Value;
- return $"{name}: +{displayValue}{suffix}";
- }
+ float displayValue;
+ if (modifier.IsPercent)
+ {
+ displayValue = modifier.Value / 10f;
+ }
+ else if (modifier.Key == StatType.MovementSpeed)
+ {
+ displayValue = modifier.Value / 1000f;
+ }
+ else
+ {
+ displayValue = modifier.Value;
+ }
- public static string CreatePropDescription(StatModifier[] modifiers)
+ return $"{name}: +{displayValue:0.##}{suffix}";
+ }
+
+ public static string CreatePropDescription(IEnumerable modifiers)
{
- if (modifiers == null || modifiers.Length == 0)
+ if (modifiers == null)
{
return null;
}
StringBuilder sb = new StringBuilder();
- foreach (StatModifier modifier in modifiers)
+ foreach (modifier modifier in modifiers)
{
sb.Append(Describe(modifier));
sb.Append('\n');
@@ -71,15 +77,15 @@ namespace SepCore.CustomUtility
return sb.ToString();
}
- public static string CreateWeaponDescription(DRWeapon drWeapon)
+ public static string CreateWeaponDescription(WeaponConfig weaponConfig)
{
- if (drWeapon == null)
+ if (weaponConfig == null)
{
return null;
}
- return CreateWeaponDescription(drWeapon.Attack, drWeapon.Cooldown, drWeapon.AttackRange, drWeapon.Modifiers,
- drWeapon.Pramas);
+ return CreateWeaponDescription(weaponConfig.Attack, weaponConfig.Cooldown / 1000f,
+ weaponConfig.AttackRange / 1000f, weaponConfig.Modifiers, weaponConfig.Parameters);
}
public static string CreateWeaponDescription(WeaponBase weapon)
@@ -100,7 +106,7 @@ namespace SepCore.CustomUtility
}
return CreateWeaponDescription(weaponData.Attack, weaponData.Cooldown,
- weaponData.AttackRange, weaponData.Modifiers, weaponData.Params);
+ weaponData.AttackRange, weaponData.Modifiers, weaponData.Parameters);
}
public static string CreatePropDescription(PropItem prop)
@@ -114,7 +120,7 @@ namespace SepCore.CustomUtility
}
private static string CreateWeaponDescription(int attack, float cooldown, float attackRange,
- StatModifier[] modifiers, Dictionary @params)
+ IEnumerable modifiers, IReadOnlyDictionary parameters)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine($"攻击: {attack}");
@@ -127,19 +133,23 @@ namespace SepCore.CustomUtility
sb.Append(modifiersDesc);
}
- if (@params == null || @params.Count == 0)
+ if (parameters == null || parameters.Count == 0)
{
return sb.ToString();
}
- foreach (var kvp in @params)
+ foreach (var kvp in parameters)
{
- if (!_paramsDict.TryGetValue(kvp.Key, out string value))
+ if (!_paramTypeNames.TryGetValue(kvp.Key, out string paramName))
{
- value = kvp.Key;
- Log.Warning($"{kvp.Key} is not defined.");
+ paramName = kvp.Key.ToString();
}
- sb.AppendLine($"{value}: {kvp.Value}");
+
+ string valStr = kvp.Key == ParamType.SectorAngle
+ ? kvp.Value.ToString()
+ : (kvp.Value / 1000f).ToString("0.##");
+
+ sb.AppendLine($"{paramName}: {valStr}");
}
return sb.ToString();
diff --git a/Assets/GameMain/Scripts/Procedure/Base/ProcedureChangeScene.cs b/Assets/GameMain/Scripts/Procedure/Base/ProcedureChangeScene.cs
index 66ec5d5..92116f9 100644
--- a/Assets/GameMain/Scripts/Procedure/Base/ProcedureChangeScene.cs
+++ b/Assets/GameMain/Scripts/Procedure/Base/ProcedureChangeScene.cs
@@ -1,13 +1,11 @@
-//------------------------------------------------------------
+//------------------------------------------------------------
// Game Framework
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
// Homepage: https://gameframework.cn/
// Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------
-using SepCore.DataTable;
using SepCore.Definition;
-using GameFramework.DataTable;
using GameFramework.Event;
using SepCore.Sound;
using UnityGameFramework.Runtime;
@@ -18,7 +16,7 @@ namespace SepCore.Procedure
{
public class ProcedureChangeScene : ProcedureBase
{
- private int _nextSceneId = 0;
+ private int _nextSceneType = 0;
private bool _isChangeSceneComplete = false;
private int _backgroundMusicId = 0;
@@ -53,18 +51,10 @@ namespace SepCore.Procedure
// 还原游戏速度
GameEntry.Base.ResetNormalGameSpeed();
- _nextSceneId = procedureOwner.GetData("NextSceneId");
-
- IDataTable dtScene = GameEntry.DataTable.GetDataTable();
- DRScene drScene = dtScene.GetDataRow(_nextSceneId);
- if (drScene == null)
- {
- Log.Warning("Can not load scene '{0}' from data table.", _nextSceneId.ToString());
- return;
- }
-
- GameEntry.Scene.LoadScene(AssetUtility.GetSceneAsset(drScene.AssetName), Constant.AssetPriority.SceneAsset, this);
- _backgroundMusicId = drScene.BackgroundMusicId;
+ _nextSceneType = procedureOwner.GetData("NextSceneType");
+ SceneConfig sceneConfig = GameEntry.Luban.Get(_nextSceneType);
+ GameEntry.Scene.LoadScene(AssetUtility.GetSceneAsset(sceneConfig.AssetName), Constant.AssetPriority.SceneAsset, this);
+ _backgroundMusicId = sceneConfig.BackgroundMusicId;
}
protected override void OnLeave(ProcedureOwner procedureOwner, bool isShutdown)
@@ -86,20 +76,20 @@ namespace SepCore.Procedure
return;
}
- SceneId sceneId = (SceneId)_nextSceneId;
- switch (sceneId)
+ SceneType sceneType = (SceneType)_nextSceneType;
+ switch (sceneType)
{
- case SceneId.Menu:
+ case SceneType.Menu:
ChangeState(procedureOwner);
break;
- case SceneId.StressTest:
+ case SceneType.StressTest:
ChangeState(procedureOwner);
break;
- case SceneId.Game:
+ case SceneType.Game:
ChangeState(procedureOwner);
break;
default:
- Log.Debug($"Scene {sceneId.ToString()} don't configure a procedure");
+ Log.Debug($"Scene {sceneType.ToString()} don't configure a procedure");
break;
}
}
diff --git a/Assets/GameMain/Scripts/Procedure/Base/ProcedurePreload.cs b/Assets/GameMain/Scripts/Procedure/Base/ProcedurePreload.cs
index da5319c..b4bd212 100644
--- a/Assets/GameMain/Scripts/Procedure/Base/ProcedurePreload.cs
+++ b/Assets/GameMain/Scripts/Procedure/Base/ProcedurePreload.cs
@@ -1,8 +1,7 @@
-using GameFramework;
+using GameFramework;
using GameFramework.Event;
using GameFramework.Resource;
using System.Collections.Generic;
-using SepCore.DataTable;
using SepCore.Definition;
using SepCore.CustomUtility;
using TMPro;
@@ -15,23 +14,7 @@ namespace SepCore.Procedure
{
public class ProcedurePreload : ProcedureBase
{
- public static readonly string[] DataTableNames = new string[]
- {
- "Entity",
- "Enemy",
- "Weapon",
- "Music",
- "Scene",
- "Sound",
- "UIForm",
- "UISound",
- "Goods",
- "Prop",
- "Role",
- "Level",
- "LevelUpReward",
- "LevelRarity",
- };
+ private const string LubanTablesFlag = "LubanTables";
private Dictionary _loadedFlag = new Dictionary();
@@ -43,8 +26,6 @@ namespace SepCore.Procedure
GameEntry.Event.Subscribe(LoadConfigSuccessEventArgs.EventId, OnLoadConfigSuccess);
GameEntry.Event.Subscribe(LoadConfigFailureEventArgs.EventId, OnLoadConfigFailure);
- GameEntry.Event.Subscribe(LoadDataTableSuccessEventArgs.EventId, OnLoadDataTableSuccess);
- GameEntry.Event.Subscribe(LoadDataTableFailureEventArgs.EventId, OnLoadDataTableFailure);
GameEntry.Event.Subscribe(LoadDictionarySuccessEventArgs.EventId, OnLoadDictionarySuccess);
GameEntry.Event.Subscribe(LoadDictionaryFailureEventArgs.EventId, OnLoadDictionaryFailure);
@@ -59,8 +40,6 @@ namespace SepCore.Procedure
{
GameEntry.Event.Unsubscribe(LoadConfigSuccessEventArgs.EventId, OnLoadConfigSuccess);
GameEntry.Event.Unsubscribe(LoadConfigFailureEventArgs.EventId, OnLoadConfigFailure);
- GameEntry.Event.Unsubscribe(LoadDataTableSuccessEventArgs.EventId, OnLoadDataTableSuccess);
- GameEntry.Event.Unsubscribe(LoadDataTableFailureEventArgs.EventId, OnLoadDataTableFailure);
GameEntry.Event.Unsubscribe(LoadDictionarySuccessEventArgs.EventId, OnLoadDictionarySuccess);
GameEntry.Event.Unsubscribe(LoadDictionaryFailureEventArgs.EventId, OnLoadDictionaryFailure);
@@ -79,7 +58,7 @@ namespace SepCore.Procedure
}
}
- procedureOwner.SetData("NextSceneId", (int)SceneId.Menu);
+ procedureOwner.SetData("NextSceneType", (int)SceneType.Menu);
ChangeState(procedureOwner);
}
@@ -88,11 +67,18 @@ namespace SepCore.Procedure
// Preload configs
LoadConfig("DefaultConfig");
- // Preload data tables
- foreach (string dataTableName in DataTableNames)
- {
- LoadDataTable(dataTableName);
- }
+ // Preload Luban data tables
+ _loadedFlag.Add(LubanTablesFlag, false);
+ GameEntry.Luban.LoadTables(
+ () =>
+ {
+ _loadedFlag[LubanTablesFlag] = true;
+ Log.Info("Load Luban data tables OK.");
+ },
+ errorMessage =>
+ {
+ Log.Error("Load Luban data tables failure with error message '{0}'.", errorMessage);
+ });
// Preload fonts
LoadFont("MainFont");
@@ -106,13 +92,6 @@ namespace SepCore.Procedure
GameEntry.Config.ReadData(configAssetName, this);
}
- private void LoadDataTable(string dataTableName)
- {
- string dataTableAssetName = AssetUtility.GetDataTableAsset(dataTableName, false);
- _loadedFlag.Add(dataTableAssetName, false);
- GameEntry.DataTable.LoadDataTable(dataTableName, dataTableAssetName, this);
- }
-
private void LoadFont(string fontName)
{
_loadedFlag.Add(Utility.Text.Format("Font.{0}", fontName), false);
@@ -173,29 +152,7 @@ namespace SepCore.Procedure
ne.ConfigAssetName, ne.ErrorMessage);
}
- private void OnLoadDataTableSuccess(object sender, GameEventArgs e)
- {
- LoadDataTableSuccessEventArgs ne = (LoadDataTableSuccessEventArgs)e;
- if (ne.UserData != this)
- {
- return;
- }
- _loadedFlag[ne.DataTableAssetName] = true;
- Log.Info("Load data table '{0}' OK.", ne.DataTableAssetName);
- }
-
- private void OnLoadDataTableFailure(object sender, GameEventArgs e)
- {
- LoadDataTableFailureEventArgs ne = (LoadDataTableFailureEventArgs)e;
- if (ne.UserData != this)
- {
- return;
- }
-
- Log.Error("Can not load data table '{0}' from '{1}' with error message '{2}'.", ne.DataTableAssetName,
- ne.DataTableAssetName, ne.ErrorMessage);
- }
private void OnLoadDictionarySuccess(object sender, GameEventArgs e)
{
diff --git a/Assets/GameMain/Scripts/Procedure/Game/GameStateBattle.cs b/Assets/GameMain/Scripts/Procedure/Game/GameStateBattle.cs
index 27e2070..82e020c 100644
--- a/Assets/GameMain/Scripts/Procedure/Game/GameStateBattle.cs
+++ b/Assets/GameMain/Scripts/Procedure/Game/GameStateBattle.cs
@@ -1,11 +1,7 @@
-using System;
using Cysharp.Threading.Tasks;
using SepCore.Event;
-using SepCore.DataTable;
using SepCore.Entity;
using SepCore.Definition;
-using GameFramework.Fsm;
-using GameFramework.Procedure;
using SepCore.EnemyManager;
using SepCore.Simulation;
using SepCore.Timer;
@@ -49,15 +45,9 @@ namespace SepCore.Procedure
{
_currentLevel = _procedureGame.CurrentLevel;
- var drLevel = GameEntry.DataTable.GetDataTableRow(_currentLevel);
-
- if (drLevel == null)
- {
- throw new Exception($"GameStateBattle.OnEnter: {_currentLevel} is not found.");
- }
-
- _levelTimerHandle = GameEntry.Timer.ScheduleOnce(drLevel.Duration, OnLevelTimeUp, this);
- _enemyManager.OnInit(drLevel, Player);
+ var levelConfig = GameEntry.Luban.Get(_currentLevel);
+ _levelTimerHandle = GameEntry.Timer.ScheduleOnce(levelConfig.Duration, OnLevelTimeUp, this);
+ _enemyManager.OnInit(levelConfig, Player);
if (Player != null) Player.Enable = true;
diff --git a/Assets/GameMain/Scripts/Procedure/Game/ProcedureGame.cs b/Assets/GameMain/Scripts/Procedure/Game/ProcedureGame.cs
index 5eb3d24..51bae1d 100644
--- a/Assets/GameMain/Scripts/Procedure/Game/ProcedureGame.cs
+++ b/Assets/GameMain/Scripts/Procedure/Game/ProcedureGame.cs
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
+using System.Linq;
using Cysharp.Threading.Tasks;
-using SepCore.DataTable;
using SepCore.Definition;
using SepCore.Entity;
using GameFramework.Fsm;
@@ -131,14 +131,12 @@ namespace SepCore.Procedure
await GameEntry.UIRouter.OpenUIAsync(UIFormType.HudForm);
int selectedRoleId = procedureOwner.GetData("SelectedRoleId").Value;
- var role = GameEntry.DataTable.GetDataTableRow(selectedRoleId);
- if (role == null)
- {
- Log.Error("ProcedureGame.EnterAsync() can not load role '{0}'.", selectedRoleId.ToString());
- return;
- }
+ var roles = GameEntry.Luban.GetTable();
+ var role = roles.FirstOrDefault(r => r.Id == selectedRoleId)
+ ?? (selectedRoleId >= 0 && selectedRoleId < roles.Count ? roles[selectedRoleId] : roles[0]);
+ var expConfig = GameEntry.Luban.Get(role.Name);
- Player.InitRole(role);
+ Player.InitRole(role, expConfig);
InitGameState();
}
catch (Exception exception)
diff --git a/Assets/GameMain/Scripts/Procedure/ProcedureMenu.cs b/Assets/GameMain/Scripts/Procedure/ProcedureMenu.cs
index 580be7a..40753e4 100644
--- a/Assets/GameMain/Scripts/Procedure/ProcedureMenu.cs
+++ b/Assets/GameMain/Scripts/Procedure/ProcedureMenu.cs
@@ -49,7 +49,7 @@ namespace SepCore.Procedure
if (_startGame)
{
- procedureOwner.SetData("NextSceneId", (int)SceneId.Game);
+ procedureOwner.SetData("NextSceneType", (int)SceneType.Game);
procedureOwner.SetData("SelectedRoleId", _selectedRoleId);
ChangeState(procedureOwner);
}
diff --git a/Assets/GameMain/Scripts/Procedure/SepCore.Procedure.asmdef b/Assets/GameMain/Scripts/Procedure/SepCore.Procedure.asmdef
index 20884e3..41bdb46 100644
--- a/Assets/GameMain/Scripts/Procedure/SepCore.Procedure.asmdef
+++ b/Assets/GameMain/Scripts/Procedure/SepCore.Procedure.asmdef
@@ -7,7 +7,8 @@
"GUID:363c5eb08ff8e6a439b85e37b8c20d96",
"GUID:47a82ffa13c291447ab895cd0bc251cd",
"GUID:436e23dbdc31e7d4fb5c3f804548b2df",
- "GUID:0e1d182005e0ae647ab3fa40f5492dbb"
+ "GUID:0e1d182005e0ae647ab3fa40f5492dbb",
+ "GUID:3bb549212964b4192b427888ac9382e7"
],
"includePlatforms": [],
"excludePlatforms": [],
diff --git a/Assets/GameMain/Scripts/Runtime/Base/GameEntry.Custom.cs b/Assets/GameMain/Scripts/Runtime/Base/GameEntry.Custom.cs
index 6f556c1..ce19d6a 100644
--- a/Assets/GameMain/Scripts/Runtime/Base/GameEntry.Custom.cs
+++ b/Assets/GameMain/Scripts/Runtime/Base/GameEntry.Custom.cs
@@ -1,4 +1,5 @@
-using SepCore.BuiltinData;
+using SepCore.BuiltinData;
+using SepCore.CustomComponent;
using SepCore.DamageText;
using SepCore.EnemyManager;
using SepCore.HPBar;
@@ -16,6 +17,8 @@ public partial class GameEntry
{
public static BuiltinDataComponent BuiltinData { get; private set; }
+ public static LubanComponent Luban { get; private set; }
+
public static HPBarComponent HPBar { get; private set; }
public static DamageTextComponent DamageText { get; private set; }
@@ -37,6 +40,7 @@ public partial class GameEntry
private static void InitCustomComponents()
{
BuiltinData = UnityGameFramework.Runtime.GameEntry.GetComponent();
+ Luban = UnityGameFramework.Runtime.GameEntry.GetComponent();
HPBar = UnityGameFramework.Runtime.GameEntry.GetComponent();
DamageText = UnityGameFramework.Runtime.GameEntry.GetComponent();
EnemyManager = UnityGameFramework.Runtime.GameEntry.GetComponent();
diff --git a/Assets/GameMain/Scripts/Runtime/BuiltinComponent/AsyncTask/DataTableAsyncExtension.cs b/Assets/GameMain/Scripts/Runtime/BuiltinComponent/AsyncTask/DataTableAsyncExtension.cs
deleted file mode 100644
index fa6ddb2..0000000
--- a/Assets/GameMain/Scripts/Runtime/BuiltinComponent/AsyncTask/DataTableAsyncExtension.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-using System;
-using Cysharp.Threading.Tasks;
-using GameFramework;
-using GameFramework.DataTable;
-using SepCore.DataTable;
-using UnityGameFramework.Runtime;
-
-namespace SepCore.AsyncTask
-{
- ///
- /// DataTable 异步扩展方法
- ///
- public static class DataTableAsyncExtension
- {
- ///
- /// 异步加载数据表
- ///
- /// 数据表组件
- /// 数据表资源名称
- /// 用户自定义数据
- /// 超时时间(秒),0表示不超时
- /// 加载成功事件
- public static UniTask LoadDataTableAsync(this DataTableComponent dataTableComponent,
- string dataTableAssetName,
- object userData = null,
- float timeout = 30f)
- {
- UniTask waitTask = AsyncTaskHelper.WaitSuccessOrFailureAsync(
- LoadDataTableSuccessEventArgs.EventId,
- LoadDataTableFailureEventArgs.EventId,
- successArgs => successArgs.DataTableAssetName == dataTableAssetName && ReferenceEquals(successArgs.UserData, userData),
- failureArgs => failureArgs.DataTableAssetName == dataTableAssetName && ReferenceEquals(failureArgs.UserData, userData),
- timeout
- );
-
- string dataTableName = System.IO.Path.GetFileNameWithoutExtension(dataTableAssetName);
- dataTableComponent.LoadDataTable(dataTableName, dataTableAssetName, userData);
- return waitTask;
- }
-
- ///
- /// 异步加载数据表(泛型版本)
- ///
- /// 数据行类型
- /// 数据表组件
- /// 数据表资源名称
- /// 用户自定义数据
- /// 超时时间(秒),0表示不超时
- /// 加载的数据表
- public static UniTask> LoadDataTableAsync(this DataTableComponent dataTableComponent,
- string dataTableAssetName,
- object userData = null,
- float timeout = 30f) where T : IDataRow
- {
- return LoadDataTableAsync(dataTableComponent, dataTableAssetName, userData, timeout)
- .ContinueWith(successArgs =>
- {
- // 获取数据表名称(去掉路径和扩展名)
- string dataTableName = System.IO.Path.GetFileNameWithoutExtension(dataTableAssetName);
- return dataTableComponent.GetDataTable(dataTableName);
- });
- }
- }
-}
diff --git a/Assets/GameMain/Scripts/Runtime/BuiltinComponent/AsyncTask/DataTableAsyncExtension.cs.meta b/Assets/GameMain/Scripts/Runtime/BuiltinComponent/AsyncTask/DataTableAsyncExtension.cs.meta
deleted file mode 100644
index fa6762d..0000000
--- a/Assets/GameMain/Scripts/Runtime/BuiltinComponent/AsyncTask/DataTableAsyncExtension.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: fd425f3318ddacb44a9c9468dcd434bf
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/GameMain/Scripts/Runtime/BuiltinComponent/AsyncTask/EntityAsyncExtension.cs b/Assets/GameMain/Scripts/Runtime/BuiltinComponent/AsyncTask/EntityAsyncExtension.cs
index 9f1a182..9311044 100644
--- a/Assets/GameMain/Scripts/Runtime/BuiltinComponent/AsyncTask/EntityAsyncExtension.cs
+++ b/Assets/GameMain/Scripts/Runtime/BuiltinComponent/AsyncTask/EntityAsyncExtension.cs
@@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Threading;
using Cysharp.Threading.Tasks;
using SepCore.CustomUtility;
-using SepCore.DataTable;
using SepCore.Definition;
using SepCore.Entity;
using SepCore.Entity.Weapon;
@@ -22,7 +21,6 @@ namespace SepCore.AsyncTask
private const string EntityNamespace = "SepCore.Entity.";
private static readonly Dictionary _typeDict = new();
- private static readonly Dictionary _assetNameDict = new();
///
/// 异步显示实体
@@ -171,15 +169,16 @@ namespace SepCore.AsyncTask
}
Type enemyType = TryGetType(data.EnemyType.ToString());
- string assetName = TryGetAssetName(data.EntityTypeId);
- if (enemyType == null || string.IsNullOrEmpty(assetName))
+ EntityConfig entityConfig = GameEntry.Luban.Get(data.AssetName);
+ if (enemyType == null || entityConfig == null)
{
+ Log.Warning("Can not load enemy logic type or entity config for assetName '{0}'.", data.AssetName);
return UniTask.FromResult(null);
}
return entityComponent
- .ShowEntityAsync(data.Id, enemyType, AssetUtility.GetEntityAsset(assetName), "Enemy",
- Constant.AssetPriority.BulletAsset, data, timeout, cancellationToken)
+ .ShowEntityAsync(data.Id, enemyType, AssetUtility.GetEntityAsset(entityConfig.PrefabPath), "Enemy",
+ Constant.AssetPriority.EnemyAsset, data, timeout, cancellationToken)
.ContinueWith(entity => entity?.Logic as EnemyBase);
}
@@ -198,15 +197,16 @@ namespace SepCore.AsyncTask
}
Type weaponType = TryGetType("Weapon." + data.WeaponType);
- string assetName = TryGetAssetName(data.EntityTypeId);
- if (weaponType == null || string.IsNullOrEmpty(assetName))
+ EntityConfig entityConfig = GameEntry.Luban.Get(data.AssetName);
+ if (weaponType == null || entityConfig == null)
{
+ Log.Warning("Can not load weapon logic type or entity config for assetName '{0}'.", data.AssetName);
return UniTask.FromResult(null);
}
return entityComponent
- .ShowEntityAsync(data.Id, weaponType, AssetUtility.GetEntityAsset(assetName), "Weapon",
- Constant.AssetPriority.BulletAsset, data, timeout, cancellationToken)
+ .ShowEntityAsync(data.Id, weaponType, AssetUtility.GetEntityAsset(entityConfig.PrefabPath), "Weapon",
+ Constant.AssetPriority.WeaponAsset, data, timeout, cancellationToken)
.ContinueWith(entity => entity?.Logic as WeaponBase);
}
@@ -304,14 +304,14 @@ namespace SepCore.AsyncTask
return UniTask.FromResult(null);
}
- DREntity drEntity = GameEntry.DataTable.GetDataTableRow(data.TypeId);
- if (drEntity == null)
+ EntityConfig entityConfig = GameEntry.Luban.Get(data.AssetName);
+ if (entityConfig == null)
{
- Log.Warning("Can not load entity id '{0}' from data table.", data.TypeId.ToString());
+ Log.Warning("Can not load entity assetName '{0}' from data table.", data.AssetName);
return UniTask.FromResult(null);
}
- return entityComponent.ShowEntityAsync(data.Id, AssetUtility.GetEntityAsset(drEntity.AssetName),
+ return entityComponent.ShowEntityAsync(data.Id, AssetUtility.GetEntityAsset(entityConfig.PrefabPath),
entityGroupName, priority, data, timeout, cancellationToken);
}
@@ -332,23 +332,5 @@ namespace SepCore.AsyncTask
return type;
}
-
- private static string TryGetAssetName(int entityId)
- {
- if (!_assetNameDict.TryGetValue(entityId, out string assetName))
- {
- DREntity drEntity = GameEntry.DataTable.GetDataTableRow(entityId);
- if (drEntity == null)
- {
- Log.Warning("Can not load entity id '{0}' from data table.", entityId.ToString());
- return null;
- }
-
- assetName = drEntity.AssetName;
- _assetNameDict.Add(entityId, assetName);
- }
-
- return assetName;
- }
}
}
diff --git a/Assets/GameMain/Scripts/Runtime/BuiltinComponent/EntityExtension.cs b/Assets/GameMain/Scripts/Runtime/BuiltinComponent/EntityExtension.cs
index 467a2dd..d47aaf2 100644
--- a/Assets/GameMain/Scripts/Runtime/BuiltinComponent/EntityExtension.cs
+++ b/Assets/GameMain/Scripts/Runtime/BuiltinComponent/EntityExtension.cs
@@ -1,9 +1,7 @@
-using System;
+using System;
using System.Collections.Generic;
using SepCore.Definition;
-using SepCore.Entity;
using UnityGameFramework.Runtime;
-using SepCore.DataTable;
using SepCore.CustomUtility;
namespace SepCore.Entity
@@ -11,15 +9,14 @@ namespace SepCore.Entity
public static class EntityExtension
{
private static int s_SerialId = -10;
+ private static int _serialId = 0;
private const string EntityNamespace = "SepCore.Entity.";
private static readonly Dictionary _typeDict;
- private static readonly Dictionary _assetNameDict;
static EntityExtension()
{
_typeDict = new Dictionary();
- _assetNameDict = new Dictionary();
}
public static EntityBase GetGameEntity(this EntityComponent entityComponent, int entityId)
@@ -44,6 +41,26 @@ namespace SepCore.Entity
entityComponent.AttachEntity(entityBase.Entity, ownerId, parentTransformPath, userData);
}
+ public static void ShowEntity(this EntityComponent entityComponent, EntityDataBase data, string group,
+ int priority) where T : EntityBase
+ {
+ if (data == null)
+ {
+ Log.Warning("Data is invalid.");
+ return;
+ }
+
+ EntityConfig entityConfig = GameEntry.Luban.Get(data.AssetName);
+ if (entityConfig == null)
+ {
+ Log.Warning("Can not load entity assetName '{0}' from data table.", data.AssetName);
+ return;
+ }
+
+ entityComponent.ShowEntity(data.Id, typeof(T), AssetUtility.GetEntityAsset(entityConfig.PrefabPath), group,
+ priority, data);
+ }
+
public static void ShowPlayer(this EntityComponent entityComponent, PlayerData data)
{
entityComponent.ShowEntity(typeof(Player), "Player", Constant.AssetPriority.PlayerAsset, data);
@@ -58,15 +75,7 @@ namespace SepCore.Entity
}
var enemyType = TryGetType(data.EnemyType.ToString());
- var assetName = TryGetAssetName(data.EntityTypeId);
-
- entityComponent.ShowEntity(
- entityId: data.Id,
- entityLogicType: enemyType,
- entityAssetName: AssetUtility.GetEntityAsset(assetName),
- entityGroupName: "Enemy",
- priority: Constant.AssetPriority.BulletAsset,
- userData: data);
+ entityComponent.ShowEntity(enemyType, "Enemy", Constant.AssetPriority.EnemyAsset, data);
}
public static void ShowWeapon(this EntityComponent entityComponent, WeaponData data)
@@ -78,37 +87,9 @@ namespace SepCore.Entity
}
var weaponType = TryGetType("Weapon." + data.WeaponType);
- var assetName = TryGetAssetName(data.EntityTypeId);
-
- entityComponent.ShowEntity(
- entityId: data.Id,
- entityLogicType: weaponType,
- entityAssetName: AssetUtility.GetEntityAsset(assetName),
- entityGroupName: "Weapon",
- priority: Constant.AssetPriority.BulletAsset,
- userData: data);
+ entityComponent.ShowEntity(weaponType, "Weapon", Constant.AssetPriority.WeaponAsset, data);
}
- // public static void ShowBullet(this EntityComponent entityComponent, BulletData data)
- // {
- // if (data == null)
- // {
- // Log.Warning("Bullet data is invalid.");
- // return;
- // }
- //
- // var bulletType = TryGetType(data.BulletType.ToString());
- // string assetName = TryGetAssetName(data.EntityTypeId);
- //
- // entityComponent.ShowEntity(
- // entityId: data.Id,
- // entityLogicType: bulletType,
- // entityAssetName: AssetUtility.GetEntityAsset(assetName),
- // entityGroupName: "Bullet",
- // priority: Constant.AssetPriority.BulletAsset,
- // userData: data);
- // }
-
public static void ShowEffect(this EntityComponent entityComponent, EffectData data)
{
entityComponent.ShowEntity(typeof(Effect), "Effect", Constant.AssetPriority.EffectAsset, data);
@@ -133,14 +114,14 @@ namespace SepCore.Entity
return;
}
- DREntity drEntity = GameEntry.DataTable.GetDataTableRow(data.TypeId);
- if (drEntity == null)
+ EntityConfig entityConfig = GameEntry.Luban.Get