Compare commits

...

327 Commits

Author SHA1 Message Date
ALEXTANG
ff613e4130 更新修复导入图集初始化信息不全的bug
更新修复导入图集初始化信息不全的bug
2023-11-20 17:49:08 +08:00
ALEXTANG
fea1ae2278 Merge pull request #59 from AlanWeekend/main
优化分包资源下载逻辑,统一WebGL平台与其他平台的远程热更资源引用方式
2023-11-20 11:56:04 +08:00
Weekend
866c440479 add:初始化Package流程中增加webgl平台更新update配置 2023-11-19 02:01:15 +08:00
Weekend
48ff839d64 Merge branch 'main' of https://github.com/AlanWeekend/TEngine 2023-11-19 01:43:59 +08:00
Weekend
69be3cfa23 update:统一WebGL平台与其他平台的远程热更资源引用方式 2023-11-19 01:41:47 +08:00
Weekend
5f2c27ecf0 Merge branch 'ALEXTANGXIAO:main' into main 2023-11-18 21:46:00 +08:00
Weekend
ef17cd851b add:优化分包下载 2023-11-18 21:44:24 +08:00
ALEXTANG
f186d6b058 Merge pull request #58 from AlanWeekend/main
增加初始化指定资源包操作,单独下载指定地址的资源文件
2023-11-16 10:52:14 +08:00
Weekend
4385123976 add:设置图片资源支持从指定资源包中加载 2023-11-15 15:39:04 +08:00
Weekend
1334dc30f9 Merge branch 'main' of https://github.com/AlanWeekend/TEngine 2023-11-15 15:15:11 +08:00
Weekend
af822add2c add:下载资源包中指定地址的资源文件 2023-11-15 15:14:47 +08:00
Weekend
ffb1f214ad Merge branch 'ALEXTANGXIAO:main' into main 2023-11-15 14:41:45 +08:00
Weekend
213aaed426 add:初始化指定资源包 2023-11-15 14:40:35 +08:00
ALEXTANG
623d301e41 修正异步创建子Widget时SetParent的问题
修正异步创建子Widget时SetParent的问题
2023-11-15 14:06:49 +08:00
ALEXTANG
2870383afe Resource模块支持操作指定资源包的资源
Resource模块支持操作指定资源包的资源
2023-11-15 10:48:28 +08:00
ALEXTANG
1ad435958a Merge pull request #57 from AlanWeekend/main
add:Resource模块支持操作指定资源包的资源
2023-11-15 10:08:53 +08:00
Weekend
386787c6ec add:Resource模块支持操作指定资源包的资源 2023-11-15 00:14:07 +08:00
ALEXTANG
cd65dde4c3 ReleasePreLoadAssets修正在webgl模式下Shutdown的问题
ReleasePreLoadAssets修正在webgl模式下Shutdown的问题
2023-11-14 16:00:09 +08:00
ALEXTANG
8321e77421 Merge pull request #56 from AlanWeekend/main
fixed:looplistitem重复赋值问题
2023-11-13 13:09:25 +08:00
Weekend
1b6f80952e fixed:looplistitem重复赋值问题
fixed:looplistitem重复赋值问题
2023-11-12 19:49:02 +08:00
ALEXTANG
b52e655c30 更正错误注释
更正错误注释
2023-11-07 11:04:59 +08:00
ALEXTANG
8c0df95626 修正CancellationTokenSource重复Dispose问题
修正CancellationTokenSource重复Dispose问题
2023-11-03 16:58:42 +08:00
ALEXTANG
0d1e308f1c Update ResourceModule.cs 2023-11-03 10:07:25 +08:00
ALEXTANG
f8797538fd Update UIBase.cs 2023-11-03 09:55:36 +08:00
ALEXTANG
fe4e168041 Update ProcedurePreload.cs 2023-11-02 15:35:01 +08:00
ALEXTANG
8e9047d3a3 基于资源框架实现对标签WEBGL_PRELOAD、PRELOAD的预加载。 接口GameModule.Resource.GetPreLoadAsset<T>(location)
基于资源框架实现对标签WEBGL_PRELOAD、PRELOAD的预加载。 接口GameModule.Resource.GetPreLoadAsset<T>(location)
2023-11-02 13:16:05 +08:00
ALEXTANG
04bfaeccc8 示例CLI工作流
示例CLI工作流
2023-11-02 12:55:27 +08:00
ALEXTANG
d66c823c15 更新优化启用UpdateData时UILoadUpdate时序的问题
更新优化启用UpdateData时UILoadUpdate时序的问题
2023-11-02 11:48:47 +08:00
ALEXTANG
0ec1424f0a 升级HybridCLR 4.0.11=>4.0.12
升级HybridCLR 4.0.11=>4.0.12
2023-11-02 11:12:56 +08:00
ALEXTANG
01f8eb9d57 升级HybridCLR 4.0.10=>4.0.11 强烈建议升级,修复了若干bug
升级HybridCLR 4.0.10=>4.0.11 强烈建议升级,修复了若干bug
2023-11-02 10:01:30 +08:00
ALEXTANG
f5021a9688 修正Utility生命周期注入OnDestroy和OnDrawGizmos无效的问题
修正Utility生命周期注入OnDestroy和OnDrawGizmos无效的问题
2023-10-31 12:45:40 +08:00
ALEXTANG
a632f7a5ad Merge pull request #55 from AlanWeekend/main
修复demo流程的下载网速显示错误问题
2023-10-30 23:48:17 +08:00
Weekend
5f968f4154 优化网速计算
优化网速计算
2023-10-30 23:47:07 +08:00
Weekend
c9fe83c2bd Merge branch 'main' of https://github.com/AlanWeekend/TEngine 2023-10-30 23:04:05 +08:00
Weekend
2c00d103cb Update ProcedureDownloadFile.cs
fixed:demo流程的下载网速错误显示问题
2023-10-30 23:04:01 +08:00
ALEXTANG
1d56437d9f Update Utility.Http.cs 2023-10-30 11:15:52 +08:00
ALEXTANG
69db1ff977 修正音频模块音频代理类赋值问题
#54 修正音频模块音频代理类赋值问题
2023-10-30 10:40:22 +08:00
ALEXTANG
48887b1aee 框架支持Shudown不关闭游戏重启
框架支持Shudown不关闭游戏重启
2023-10-27 13:18:12 +08:00
ALEXTANG
381ea8bb8d 增加支持ComponentAutoBindTool自动绑定UI元素组件。
增加支持ComponentAutoBindTool自动绑定UI元素组件。
2023-10-27 10:48:21 +08:00
ALEXTANG
7401edac15 移除UIElement代码绑定工具,为后续AutoBind代码绑定工具做准备
移除UIElement代码绑定工具,为后续AutoBind代码绑定工具做准备
2023-10-27 00:13:04 +08:00
ALEXTANG
b1c7f30be9 ErrorLogger屏幕显示开启与DebugModule关联。
ErrorLogger屏幕显示开启与DebugModule关联。
2023-10-26 23:45:26 +08:00
ALEXTANG
cfaf82a623 释放资源判断资源是否有效
释放资源判断资源是否有效
2023-10-26 14:07:38 +08:00
ALEXTANG
6992d12c6c 修复循环列表主动GetItemByIndex和GetItemList的问题
修复循环列表主动GetItemByIndex和GetItemList的问题
2023-10-26 13:12:35 +08:00
ALEXTANG
119d9683ad Merge pull request #53 from AlanWeekend/main
修复UIListBase和UILoopListWidget赋值问题
2023-10-26 12:49:00 +08:00
ALEXTANG
9478868513 修正HttpDispose
修正HttpDispose
2023-10-26 12:28:06 +08:00
ALEXTANG
6ed32082e1 修正HttpDispose
修正HttpDispose
2023-10-26 11:43:32 +08:00
ALEXTANG
6ee515e8c5 增加局部单位事件分发器的封装。
增加局部单位事件分发器的封装。
2023-10-26 10:28:05 +08:00
ALEXTANG
b839afa76a 释放资源判断资源是否有效、支持YooAssets日志重定向
释放资源判断资源是否有效、支持YooAssets日志重定向
2023-10-26 00:22:02 +08:00
Weekend
d9605b348a 修复UILoopListWidget赋值问题 2023-10-25 22:34:02 +08:00
Weekend
dfef83919c 修复UIListBase和UIUILoopListWidget赋值问题 2023-10-25 22:18:57 +08:00
ALEXTANG
f5f983f220 移除资源模块加载场景,加载场景统一走场景管理模块。增加场景加载进度回调。
移除资源模块加载场景,加载场景统一走场景管理模块。增加场景加载进度回调。
2023-10-23 17:01:06 +08:00
ALEXTANG
d61b1206ee 通过CommandLineReader可以不前台开启Unity实现静默打包,详见CommandLineReader.cs example1
通过CommandLineReader可以不前台开启Unity实现静默打包,详见CommandLineReader.cs example1
2023-10-23 15:22:34 +08:00
ALEXTANG
3650ba1a8b 更新转表bat自动拷贝ConfigSystem
更新转表bat自动拷贝ConfigSystem
2023-10-23 13:00:40 +08:00
ALEXTANG
8f14a4d2cb 日志重定向相关的实用函数。
日志重定向相关的实用函数。
2023-10-23 11:41:44 +08:00
ALEXTANG
dc22e595c9 拓展支持AssetInspector,支持更多文件类型在Inspector显示
拓展支持AssetInspector,支持更多文件类型在Inspector显示
2023-10-23 11:41:33 +08:00
ALEXTANG
0e70f7d446 日志重定向相关的实用函数。
日志重定向相关的实用函数。
2023-10-23 11:27:06 +08:00
ALEXTANG
039569b2d4 提交配置表加载模板
提交配置表加载模板
2023-10-23 10:15:11 +08:00
ALEXTANG
ea38004ba2 luban-next支持懒加载 感谢半仙儿提供支持
luban-next支持懒加载 感谢半仙儿提供支持
2023-10-20 16:24:00 +08:00
ALEXTANG
cc97c0583a 升级luban-next
升级luban-next
2023-10-20 11:53:29 +08:00
ALEXTANG
887094a4b1 升级luban-next
升级luban-next
2023-10-20 11:38:51 +08:00
ALEXTANG
0d09a7e73b 增加场景管理模块。
增加场景管理模块。
2023-10-18 16:42:44 +08:00
ALEXTANG
d8f8514f9d WebGL下不对YooAssets.Destroy();
WebGL下不对YooAssets.Destroy();
2023-10-18 11:23:20 +08:00
ALEXTANG
f2f6b2422f 资源模块优化、UI模块优化,增加接口参数是否使用缓存资源操作句柄。
资源模块优化、UI模块优化,增加接口参数是否使用缓存资源操作句柄、如果需要则不会淘汰缓存队列中的资源清单。
2023-10-18 10:30:12 +08:00
ALEXTANG
3a9cad9397 Update ResourceManager.cs 2023-10-16 16:38:13 +08:00
ALEXTANG
5e70e7972e 更新资源模块接口
更新资源模块接口
2023-10-16 13:03:41 +08:00
ALEXTANG
8d2b4200d6 升级HybridCLR 4.0.8=>4.0.10
升级HybridCLR 4.0.8=>4.0.10
2023-10-13 16:09:34 +08:00
ALEXTANG
b983e85416 资源模块优化-使用资源缓存表以及资源淘汰算法,缓存常用资源,利于获取、淘汰不常用资源。
资源模块优化-使用资源缓存表以及资源淘汰算法,缓存常用资源,利于获取、淘汰不常用资源。
2023-10-13 15:53:16 +08:00
ALEXTANG
99d2afdbd7 事件模块通用命名。
事件模块通用命名。
2023-10-10 21:00:21 +08:00
ALEXTANG
57ce836b3c 升级HybridCLR 4.0.7=>4.0.8
升级HybridCLR 4.0.7=>4.0.8
2023-10-10 20:21:33 +08:00
ALEXTANG
8dce78d6fb 事件模块拓展参数支持。
事件模块拓展参数支持。
2023-10-10 18:13:51 +08:00
ALEXTANG
6d41adffd9 音频模块初始化可自定义音频混响器.
音频模块初始化可自定义音频混响器.
2023-10-10 18:09:35 +08:00
ALEXTANG
cb9129261b 增加通过Tag加载资源对象集合的接口。
增加通过Tag加载资源对象集合的接口。
2023-10-09 19:37:00 +08:00
ALEXTANG
89dd6214d4 修复首次图集导入bug
修复首次图集导入bug
2023-10-09 19:37:00 +08:00
ALEXTANG
1aec76d64c 更新packages
1.升级HybridCLR 4.0.6=>4.0.7
2.使用Unity新版MemoryProfiler
2023-10-09 19:37:00 +08:00
ALEXTANG
859f654f6d 关闭垂直同步,避免设置帧率失效
关闭垂直同步,避免设置帧率失效
2023-10-09 19:37:00 +08:00
ALEXTANG
391d690f9d Merge pull request #49 from ALEXTANGXIAO/TEngine_v4.0.0
TEngine v4.0.0
2023-10-08 16:02:59 +08:00
ALEXTANG
bb0b4104f9 Create about.txt 2023-10-08 15:49:30 +08:00
ALEXTANG
20d0ecd8da Init TEngine4.0.0
Init TEngine4.0.0
2023-10-08 15:47:33 +08:00
ALEXTANG
8c3d6308b9 Init TEngine4.0.0
Init TEngine4.0.0
2023-10-08 15:21:33 +08:00
ALEXTANGXIAO
4c8c37ffd8 异步加载原生文件接口问题修正。
异步加载原生文件接口问题修正。
2023-10-04 18:58:45 +08:00
ALEXTANG
5f694c2bed WebGL毛玻璃效果使用默认
WebGL毛玻璃效果使用默认
2023-09-18 16:41:08 +08:00
ALEXTANG
7ff74bb747 Update GameTime.cs 2023-09-18 16:40:51 +08:00
ALEXTANG
a5de63397a Update 3-4-对象池模块.md 2023-09-18 12:00:36 +08:00
ALEXTANG
13cc62f3f1 增加打印输出协议
增加打印输出协议
2023-09-15 14:07:26 +08:00
ALEXTANGXIAO
95dfac5294 支持普通协议对象数据结构不加入opcode
支持普通协议对象数据结构不加入opcode
2023-09-06 00:13:14 +08:00
ALEXTANGXIAO
14e95107c9 服务器ByteBuf消除警告
服务器ByteBuf消除警告
2023-09-05 23:57:12 +08:00
ALEXTANGXIAO
caf5b2b54e 导出网络协议增加了缓存文件保证一致性
导出网络协议增加了缓存文件保证一致性
2023-09-05 23:56:50 +08:00
ALEXTANG
285483034e Update Exporter.cs 2023-09-05 21:08:54 +08:00
ALEXTANG
1cdd8b63b4 同步服务器导出SceneType
同步服务器导出SceneType
2023-09-05 21:07:33 +08:00
ALEXTANG
4c748df7ac Update ProcedureInitPackage.cs 2023-09-05 20:53:56 +08:00
ALEXTANG
e1229b5a4b 移除无用Extension
移除无用Extension
2023-09-05 20:28:37 +08:00
ALEXTANG
b937fb1a37 [-] 移除Luban无用转表bat
[-] 移除Luban无用转表bat
2023-09-05 19:08:02 +08:00
ALEXTANG
87ab99b363 修复了KCPClientNetwork断开网络连接会发生异常的问题
修复了KCPClientNetwork断开网络连接会发生异常的问题
2023-09-05 14:39:53 +08:00
ALEXTANG
e3a47393f4 [+] 新增游戏物体缓存池ResourcePool
[+] 新增游戏物体缓存池ResourcePool
2023-09-05 14:35:19 +08:00
ALEXTANG
75725314ad FIxed 网络模块对象池复使用问题
FIxed 网络模块对象池复使用问题
2023-09-04 10:06:20 +08:00
ALEXTANG
d3ed2b21b9 Update AudioModule.cs 2023-08-28 20:53:40 +08:00
ALEXTANG
ec34dfbb16 Delete protobuf-net.csproj.meta 2023-08-28 20:41:10 +08:00
ALEXTANG
bd76e3a651 移除示例配置资源.
移除示例配置资源.
2023-08-28 20:35:30 +08:00
ALEXTANG
278c8f23be Update DefaultSettingSerializer.cs 2023-08-28 20:24:31 +08:00
ALEXTANG
42568db2ab Add System.Runtime.CompilerServices.Unsafe.dll
Add System.Runtime.CompilerServices.Unsafe.dll
2023-08-28 20:13:06 +08:00
ALEXTANG
b033c59b00 Aot程序集不查找热更域的Type
Aot程序集不查找热更域的Type
2023-08-28 15:08:18 +08:00
ALEXTANG
04a43a3f11 1.增加重启流程Procedure接口。2.增加进入热更域后的流程Procedure。
1.增加重启流程Procedure接口。2.增加进入热更域后的流程Procedure。
2023-08-26 11:08:46 +08:00
ALEXTANG
54214cdd0b 程序集AssemblyDefine增加对UniTask textmeshpro和dotween的拓展
程序集AssemblyDefine增加对UniTask textmeshpro和dotween的拓展
2023-08-25 14:50:20 +08:00
ALEXTANG
fa870b6228 DotNet支持自定义协议目录
DotNet支持自定义协议目录
2023-08-24 18:38:05 +08:00
ALEXTANG
8a49d3437b Delete proto_csOuterMessage.proto 2023-08-24 17:47:42 +08:00
ALEXTANG
f19b889deb DotNet支持自定义协议目录
DotNet支持自定义协议目录
2023-08-24 17:47:21 +08:00
ALEXTANG
d55f6e29d9 Update RootModule.cs 2023-08-22 11:27:58 +08:00
ALEXTANG
8e4af31f26 修改默认UI资源组的PackRule为PackSeparately
修改默认UI资源组的PackRule为PackSeparately
2023-08-21 20:21:59 +08:00
ALEXTANG
58a4b3e043 YooAsset增加补丁包导入工具和补丁包对比工具
YooAsset增加补丁包导入工具和补丁包对比工具
2023-08-21 20:21:03 +08:00
ALEXTANG
576bf3bb48 增加可选的JsonHelper - NewtonsoftJsonHelper
增加可选的JsonHelper - NewtonsoftJsonHelper
2023-08-21 20:20:28 +08:00
ALEXTANG
d282b81546 增加使用UniTask的常用资源加载接口
增加使用UniTask的常用资源加载接口
2023-08-19 16:23:19 +08:00
ALEXTANG
d6dcd8851c 更新文档
更新文档
2023-08-18 17:49:28 +08:00
ALEXTANG
bbea9c4cee Update UIExtension.cs 2023-08-18 17:10:41 +08:00
ALEXTANG
b1ccb1fd53 Update Utility.Http.cs 2023-08-18 16:54:17 +08:00
ALEXTANG
0f2ad3c71d [+] UI循环列表拓展Grid 用法和List一样
[+] UI循环列表拓展Grid 用法和List一样
2023-08-18 16:32:08 +08:00
ALEXTANG
0e6851e691 Remove unused ogg
Remove unused ogg
2023-08-18 15:24:33 +08:00
ALEXTANG
75b9956261 流程初始音效设置开启 2023-08-18 14:33:49 +08:00
ALEXTANG
401c397fc8 流程初始音效设置开启
流程初始音效设置开启
2023-08-18 14:25:10 +08:00
ALEXTANG
94b314e91f TEngine设置面板增加从Hybrid同步AOT与热更程序集的按钮
TEngine设置面板增加从Hybrid同步AOT与热更程序集的按钮
2023-08-18 13:06:08 +08:00
ALEXTANG
a6573d9336 Update ConfigLoader.cs 2023-08-18 13:05:02 +08:00
ALEXTANG
abf5357f49 给不支持WEBGL的增加宏定义
给不支持WEBGL的增加宏定义
2023-08-18 13:04:53 +08:00
ALEXTANG
aab353cca3 Remove Unused Codes.
Remove Unused Codes.
2023-08-17 23:11:11 +08:00
ALEXTANG
e13071c4db 移除调试luban残留的日志
移除调试luban残留的日志
2023-08-17 23:10:14 +08:00
ALEXTANG
e071c20214 拓展自定义鲁班加载配置,支持懒加载 默认使用懒加载,未使用的配置不会载入内存
拓展自定义鲁班加载配置,支持懒加载 默认使用懒加载,未使用的配置不会载入内存
2023-08-17 23:07:07 +08:00
ALEXTANG
bf73ce333b 拓展自定义鲁班加载配置,支持UniTask异步 默认使用同步加载
拓展自定义鲁班加载配置,支持UniTask异步 默认使用同步加载
2023-08-17 22:00:55 +08:00
ALEXTANG
d7a60002d4 ErrorLog使用异步显示UI
ErrorLog使用异步显示UI
2023-08-17 21:41:30 +08:00
ALEXTANG
61f657322d 增加WebGLUpdateDataUrl
增加WebGLUpdateDataUrl
2023-08-17 21:41:07 +08:00
ALEXTANG
33223dc02e 处理DotNet网络层对WebGL导出的兼容 2023-08-17 21:38:21 +08:00
ALEXTANG
0661c59877 处理DotNet网络层对WebGL导出的兼容
处理DotNet网络层对WebGL导出的兼容
2023-08-17 14:06:09 +08:00
ALEXTANG
7c74e10857 提供单独销毁UIWidget的接口。增加UIWidget异步创建接口。
提供单独销毁UIWidget的接口。增加UIWidget异步创建接口。
2023-08-17 10:59:37 +08:00
ALEXTANG
db935bfb5f DotNet 加入热更域,修正GameProto的依赖
DotNet 加入热更域,修正GameProto的依赖
2023-08-16 15:31:16 +08:00
ALEXTANG
dc6b7bb21e 增加使用UniTask的常用资源加载接口
增加使用UniTask的常用资源加载接口
2023-08-15 17:24:02 +08:00
ALEXTANG
d32f3cb768 增加使用UniTask的常用资源加载接口
增加使用UniTask的常用资源加载接口
2023-08-15 17:22:05 +08:00
ALEXTANG
a32ab30444 修改luban模板配置,支持异步加载配置实例,客户端使用UniTask异步加载配置,避免WebGL不支持原生Task
修改luban模板配置,支持异步加载配置实例,客户端使用UniTask异步加载配置,避免WebGL不支持原生Task
2023-08-15 12:54:15 +08:00
ALEXTANG
aa0d40c758 修改luban模板配置,支持异步加载配置实例
修改luban模板配置,支持异步加载配置实例
2023-08-15 12:07:21 +08:00
ALEXTANGXIAO
5239b89326 DotNet 加入热更域
DotNet 加入热更域
2023-08-12 23:39:21 +08:00
ALEXTANG
53f0ecb6c1 [+] UI循环列表拓展与示例
[+] UI循环列表拓展与示例
2023-08-10 23:25:43 +08:00
ALEXTANG
ea9447d0ea Update ClientGm.cs 2023-08-10 10:10:50 +08:00
ALEXTANG
0c6d59f53e Fixed BehaviourSingleton #45
Fixed BehaviourSingleton #45
2023-08-10 10:09:59 +08:00
ALEXTANG
9986e22d18 [-] Remove Old ProtoGenerate
[-] Remove Old Proto Generate
2023-08-09 14:22:39 +08:00
ALEXTANG
7deb049769 更新Entity接口 泛型获取父级、Define增加unit[]类型
更新Entity接口 泛型获取父级、Define增加unit[]类型
2023-08-09 11:09:38 +08:00
ALEXTANG
fce8bd4d60 Update DebuggerModule.SettingsWindow.cs 2023-08-08 19:54:37 +08:00
ALEXTANG
7ec14c670f Luban配置表拓展分组-分组为c和client的为仅客户端字段s和server为仅服务器字段
Luban配置表拓展分组-分组为c和client的为仅客户端字段s和server为仅服务器字段
2023-08-07 15:14:43 +08:00
ALEXTANGXIAO
efe3d2b25b Update README
Update README
2023-08-06 00:36:29 +08:00
ALEXTANGXIAO
2107282368 Update Readme
Update Readme
2023-08-05 00:54:25 +08:00
ALEXTANG
fb26ea2297 Update AddressableManageComponent.cs 2023-08-04 01:42:26 +08:00
ALEXTANG
9ac150425f Update IntDictionaryConfig.cs 2023-08-04 01:42:00 +08:00
ALEXTANG
36d2c146b0 1、修复了MongoDB在2.18.0以后需要自定义注册ObjectSerializer的问题。 2、Addressable的AddAddressable接口增加isLock参数、用来决定是否需要添加携程锁。 3、修复了APackInfo因为网络多线程的原因导致线程安全的问题。
1、修复了MongoDB在2.18.0以后需要自定义注册ObjectSerializer的问题。
2、Addressable的AddAddressable接口增加isLock参数、用来决定是否需要添加携程锁。
3、修复了APackInfo因为网络多线程的原因导致线程安全的问题。
2023-08-04 01:41:31 +08:00
ALEXTANG
774b73bbbf 注释防裁剪脚本中相机权限的引用
注释防裁剪脚本中相机权限的引用
2023-08-01 16:57:43 +08:00
ALEXTANG
32366eb127 移除防裁剪脚本中相机权限的引用
移除防裁剪脚本中相机权限的引用
2023-08-01 16:54:49 +08:00
ALEXTANG
a843617e5f Update README.md 2023-08-01 10:44:15 +08:00
ALEXTANGXIAO
46b139f7cf 补充IOS运行快照到Books下
补充IOS运行快照到Books下
2023-08-01 00:06:07 +08:00
ALEXTANG
e6ff1dec3f Update BuglyAgent.cs 2023-07-31 20:36:44 +08:00
ALEXTANG
4429732010 Update ConfigLoader.cs 2023-07-31 15:01:11 +08:00
ALEXTANGXIAO
60a5caebae 1、Scene.Create接口增加了一个泛型方法接口。 2、SceneConfig增加了SceneTypeConfig和SceneSubType
1、Scene.Create接口增加了一个泛型方法接口。 2、SceneConfig增加了SceneTypeConfig和SceneSubType
2023-07-29 01:03:35 +08:00
ALEXTANGXIAO
f7c95d8216 服务器启动防呆提示需要转表
服务器启动防呆提示需要转表
2023-07-29 00:12:52 +08:00
ALEXTANGXIAO
98dcb80942 更新编辑器MenuItem导表与导出协议
更新编辑器MenuItem导表与导出协议
2023-07-29 00:03:54 +08:00
ALEXTANG
30192d52cf 调整网络demo场景路径
调整网络demo场景路径
2023-07-27 10:18:02 +08:00
ALEXTANGXIAO
b7b2262d53 合理化服务器命名,使开发者更容易理解。
Scene的routeId更名为locationId
2023-07-27 00:33:39 +08:00
ALEXTANG
d1c93f15d6 Application.OpenURL 调用bat的cmd运行时问题
Application.OpenURL 调用bat的cmd运行时问题
2023-07-26 15:39:20 +08:00
ALEXTANGXIAO
1ac1ff7d56 [+] Update HybridCLR v3.4.0
[+] Update HybridCLR v3.4.0
2023-07-26 00:07:47 +08:00
ALEXTANG
863788f303 Update UIWidget.cs 2023-07-25 23:37:02 +08:00
ALEXTANG
74790c7486 Update UIWindow.cs 2023-07-25 23:34:42 +08:00
ALEXTANG
1c223c8ad0 [+] DOTweenExtension
[+] DOTweenExtension
2023-07-25 17:08:57 +08:00
ALEXTANG
e75b3a4e66 [+] UniTask External YooAsset、Dotween、TextMeshPro 2023-07-25 16:28:09 +08:00
ALEXTANG
91b0995911 [+] UniTask External YooAsset、Dotween、TextMeshPro
[+] UniTask External YooAsset、Dotween、TextMeshPro
2023-07-25 16:22:13 +08:00
ALEXTANG
14c886ea8f [+] UniTask External YooAsset、Dotween、TextMeshPro
[+] UniTask External YooAsset、Dotween、TextMeshPro
2023-07-25 16:20:26 +08:00
ALEXTANG
9babc0ba85 [+] 合理化目录结构 精简非必要插件如确定性物理库以及Recast插件。
[+] 合理化目录结构 精简非必要插件如确定性物理库以及Recast插件。
2023-07-25 14:34:05 +08:00
ALEXTANG
f8056aef32 调整服务器逻辑
1、调整Entity.AddComponent方法添加的组件Id为父组件的Id。
2、增加了ISupportedSingleCollection和ISingleCollectionRoot接口.
3、增加了SingleCollection、用于把子组件保存到单独的数据库表的功能,配合ISupportedSingleCollection和ISingleCollectionRoot。
2023-07-24 16:49:23 +08:00
ALEXTANG
846dc4d4bc Fixed the session dispose
Fixed the session dispose
2023-07-24 13:17:59 +08:00
ALEXTANG
03ab7fb353 Create start_export.bat 2023-07-23 22:18:47 +08:00
ALEXTANG
3c11980e7c Create start_develop.bat 2023-07-23 22:18:45 +08:00
ALEXTANG
c23aa0bd71 Revert "Update Core.csproj"
This reverts commit df76d0b77a.
2023-07-23 21:32:22 +08:00
ALEXTANG
df76d0b77a Update Core.csproj 2023-07-23 21:32:01 +08:00
ALEXTANG
35d2012546 1.替换了KCP为C#版本 2.KCP增加了Memery<T>支持。 3.框架增加了对Memery<T>的支持,服务器网络消息采用Memery<T>,性能得大幅度的提升 4.优化了消息调度执行逻辑
1.替换了KCP为C#版本
2.KCP增加了Memery<T>支持。
3.框架增加了对Memery<T>的支持,服务器网络消息采用Memery<T>,性能得大幅度的提升
4.优化了消息调度执行逻辑
2023-07-23 00:25:47 +08:00
ALEXTANG
c96d20a89a [+] GameFrameworkModuleSystem
[+] GameFrameworkModuleSystem
2023-07-22 17:53:00 +08:00
ALEXTANG
5787d0f9dc [+] GameModuleSystem
[+] GameModuleSystem
2023-07-22 17:51:24 +08:00
ALEXTANG
8b35c8ca07 Update ProjectSettings.asset 2023-07-22 17:50:06 +08:00
ALEXTANG
e5456da482 合理化Address协议逻辑
合理化Address协议逻辑
2023-07-21 17:50:47 +08:00
ALEXTANG
144ba9f222 完善AddressableManageComponent与ClientNetworkComponent
完善AddressableManageComponent与ClientNetworkComponent
2023-07-21 14:32:20 +08:00
ALEXTANG
889fbdc8e1 Update UIGaussianBlurLayer.cs 2023-07-19 17:34:02 +08:00
ALEXTANG
0d177e6868 Update AssetGroup.cs 2023-07-19 17:33:56 +08:00
ALEXTANG
29135228be Update AssetReference.cs 2023-07-19 17:33:52 +08:00
ALEXTANG
c1a1de73cd Update ResourceManager.cs 2023-07-19 17:33:48 +08:00
ALEXTANG
612e9b7eba Update ResourceModule.cs 2023-07-19 17:33:44 +08:00
ALEXTANG
5ed6b8c378 Update UIModule.cs 2023-07-19 17:33:41 +08:00
ALEXTANG
06dad5a68a Update UIWidget.cs 2023-07-19 17:33:28 +08:00
ALEXTANG
9e0462043c Update WindowAttribute.cs 2023-07-19 17:33:25 +08:00
ALEXTANG
c1178e284b Update DUnityUtil.cs 2023-07-19 17:33:21 +08:00
ALEXTANG
8e3dd138a6 Merge pull request #44 from ALEXTANGXIAO/3.0.0-network
TEngine-3.0.0 NetWork And Server
2023-07-19 16:32:03 +08:00
ALEXTANG
405253c507 Update BuildAssetsCommand.cs 2023-07-19 16:03:02 +08:00
ALEXTANG
66ef50a9e0 WebGL适配 2023-07-19 15:51:16 +08:00
ALEXTANG
413f4dcda7 Update GameClient.cs 2023-07-19 15:23:46 +08:00
ALEXTANG
75fdb4d7de Update GameClient.cs 2023-07-19 15:20:05 +08:00
ALEXTANG
1ada1e4e33 Update H_C2G_LoginAddressRequestHandler.cs 2023-07-19 15:20:01 +08:00
ALEXTANG
3848b6aaaa Create AddressableSceneHelper.cs 2023-07-19 15:19:57 +08:00
ALEXTANG
2b33b405c0 Update SceneConfig.cs 2023-07-19 15:19:44 +08:00
ALEXTANG
6766b930d7 更新机器内网配置
更新机器内网配置
2023-07-19 13:08:03 +08:00
ALEXTANG
526baf45fa 完善网络框架,增加服务器断开连接回调 2023-07-18 17:36:48 +08:00
ALEXTANG
a473971cfb Update H_C2G_LoginAddressRequestHandler.cs 2023-07-18 13:06:00 +08:00
ALEXTANG
51effd2c97 Update TCPClientNetwork.cs 2023-07-18 13:05:57 +08:00
ALEXTANG
4205220b64 Network Example2
Network Example2
2023-07-18 13:05:48 +08:00
ALEXTANG
e95c18ca67 Update README.md
Update README.md
2023-07-18 10:08:46 +08:00
ALEXTANG
f5571716a2 Update SkillDisplayData.cs 2023-07-17 20:59:13 +08:00
ALEXTANG
d61a8dfa4b GMPanel
GMPanel
2023-07-17 20:59:04 +08:00
ALEXTANG
068ec709d0 [+] Add GamePlayScene
[+] Add GamePlayScene
2023-07-17 19:00:24 +08:00
ALEXTANG
8b26b790ee GameServerScene
GameServerScene
2023-07-17 18:38:50 +08:00
ALEXTANG
da35b4306b EnumHelper
EnumHelper
2023-07-17 18:29:41 +08:00
ALEXTANG
ee2147e3d9 Update BattleDemo
Update BattleDemo
2023-07-17 18:09:07 +08:00
ALEXTANG
a273e9d5f8 Entitas
Entitas
2023-07-17 15:28:27 +08:00
ALEXTANG
31d4d6c0b8 Update
Update
2023-07-17 01:05:12 +08:00
ALEXTANG
6a6f0591f1 完善Entity状态
完善Entity状态
2023-07-17 01:00:33 +08:00
ALEXTANG
9cd0bac81e 完善登录注册Demo
完善登录注册Demo
2023-07-17 01:00:10 +08:00
ALEXTANG
4abe10eecf IDataBase Last
IDataBase Last
2023-07-16 19:06:45 +08:00
ALEXTANG
bd10297dfa [+] HybridCLR=》v3.3.0
[+] HybridCLR=》v3.3.0
2023-07-16 15:51:44 +08:00
ALEXTANG
7ce72b8aa8 合理化框架
合理化框架
2023-07-16 15:37:38 +08:00
ALEXTANG
c6ecb48944 注册登录Demo
注册登录Demo
2023-07-16 00:57:20 +08:00
ALEXTANG
c178f8bb75 配置目录同步程序集调整
配置目录同步程序集调整
2023-07-15 18:45:38 +08:00
ALEXTANG
d4f160d284 合理化程序集,服务器Logic无需共享的代码存放解决方案目录,无需走Unity目录
合理化程序集,服务器Logic无需共享的代码存放解决方案目录,无需走Unity目录
2023-07-15 18:39:42 +08:00
ALEXTANG
d87653a9fb 调整对于Linux打包的支持
调整对于Linux打包的支持
2023-07-15 00:58:40 +08:00
ALEXTANG
04a5a0e048 Update Demo
Update Demo
2023-07-14 14:23:51 +08:00
ALEXTANG
c825f4d920 Streamline Unity Engineering
Streamline Unity Engineering
2023-07-14 13:38:05 +08:00
ALEXTANG
b3e59b92d6 Update ThirdParty.csproj 2023-07-14 12:47:52 +08:00
ALEXTANG
37af620d71 Update RootNameSpace
Update RootNameSpace
2023-07-14 12:45:06 +08:00
ALEXTANG
493172a925 Update
Update
2023-07-13 23:54:38 +08:00
ALEXTANG
1382db8c61 Update
Update
2023-07-13 21:13:29 +08:00
ALEXTANG
72b7149aa1 Update
Update
2023-07-13 21:02:29 +08:00
ALEXTANG
0c51ae7bdd Update
Update
2023-07-13 19:40:12 +08:00
ALEXTANG
79dc302f14 Update Utility.Http.cs 2023-07-13 19:34:30 +08:00
ALEXTANG
95e4dd93a8 Update
Update
2023-07-13 19:05:40 +08:00
ALEXTANG
2b310c00f2 Update ThirdParty.csproj 2023-07-13 18:22:01 +08:00
ALEXTANG
fbb26ea9ea Update
Update
2023-07-13 18:20:39 +08:00
ALEXTANG
bff8f20af3 Refresh Plugins 2023-07-13 17:41:23 +08:00
ALEXTANG
0c7ce5f28c Refresh Plugins 2023-07-13 17:37:44 +08:00
ALEXTANG
31fc9abdf9 Update OdinModuleConfig.asset 2023-07-13 17:36:37 +08:00
ALEXTANG
a087f40e8a [-] Remove Cysharp.MemoryPack
[-] Remove Cysharp.MemoryPack
2023-07-13 17:31:53 +08:00
ALEXTANG
7b2fc7ce9f Update DotNet sln
Update DotNet sln
2023-07-13 17:27:57 +08:00
ALEXTANG
dc4bb8cc9c Unity低版本语法兼容
Unity低版本语法兼容
2023-07-13 17:24:37 +08:00
ALEXTANG
0c8f3a5f92 [+] TEngineServer
[+] TEngineServer
2023-07-13 17:17:26 +08:00
ALEXTANG
a69f53592e 移除 重构
移除 重构
2023-07-13 12:46:26 +08:00
ALEXTANG
8757e1f550 [+] add et8 csproject
[+] add et8 csproject
2023-07-13 12:26:12 +08:00
ALEXTANG
336d4b2eb9 [+] 接入ET8服务端
[+] 接入ET8服务端
2023-07-13 12:23:48 +08:00
ALEXTANG
e0be062006 Remove old networkmodule 2023-07-12 17:36:29 +08:00
ALEXTANG
5e69129667 Remove old networkmodule
Remove old networkmodule
2023-07-12 17:35:05 +08:00
ALEXTANG
4c39ab79ca [+] Books 2023-07-12 17:28:08 +08:00
ALEXTANG
a710d1cb76 [+] Books 2023-07-10 13:59:56 +08:00
ALEXTANG
8472839394 [+] Books 2023-07-10 13:51:32 +08:00
ALEXTANG
4988c99d31 [+] Books
[+] Books
2023-07-10 12:51:13 +08:00
ALEXTANG
4fa62b2d79 Update README.md 2023-07-10 12:35:48 +08:00
ALEXTANG
f549514d7c Update ResourceManager.cs 2023-07-09 00:07:32 +08:00
ALEXTANG
f588038848 Update UIButtonScale.cs 2023-07-06 19:17:16 +08:00
ALEXTANG
9e0e3ebd50 Fixed the bug of CreateWidgetByPath
Fixed the bug of CreateWidgetByPath
2023-07-06 19:07:45 +08:00
ALEXTANG
b07ef836a9 Update ProcedureLoadAssembly.cs 2023-07-05 15:20:18 +08:00
ALEXTANG
7a1d593195 Update UnityExtension.cs 2023-07-05 15:20:12 +08:00
ALEXTANG
bc113c5c6e [+] Update版本更新时CDN地址也可更新
[+] Update版本更新时CDN地址也可更新
2023-07-04 20:57:26 +08:00
ALEXTANG
753bbdfb82 [+] HybridCLR IOS相机权限问题
大坑 没有任何异常、警告、日志 如果不写这个,就是没有响应
2023-06-29 11:25:33 +08:00
ALEXTANG
6a6d33c536 Update AudioAgent.cs 2023-06-25 17:51:17 +08:00
ALEXTANG
57a014a83a [+] Fixed UIWidget
[+] Fixed UIWidget
2023-06-25 15:26:40 +08:00
ALEXTANG
9d1a8e8c9d Create UIEventItem.cs.meta 2023-06-25 15:26:17 +08:00
ALEXTANG
86c26cd21b Create UIEventItem.cs 2023-06-25 15:26:13 +08:00
ALEXTANG
b60b9fff42 Update UIExtension.cs 2023-06-25 15:26:08 +08:00
ALEXTANG
990e17a6cc [+] HybridCLR 补充元数据设置
[+] HybridCLR 补充元数据设置
2023-06-25 15:21:46 +08:00
ALEXTANG
be531bfad0 Fixed the bug for AssetsGroup
Fixed the bug for AssetsGroup
2023-06-23 00:00:58 +08:00
ALEXTANG
6c46f3e5fd [+] Update HybridCLR v3.2.0
[+] Update HybridCLR v3.2.0
2023-06-19 17:17:13 +08:00
ALEXTANG
e4b48e3c58 Update README.md 2023-06-16 14:27:56 +08:00
ALEXTANG
68e5b1d482 Update README.md 2023-06-09 11:40:59 +08:00
ALEXTANG
abd152b072 [+] SubAssetsOperationHandle LoadSubAssetsSync(string location)
[+] SubAssetsOperationHandle LoadSubAssetsSync(string location)
2023-06-06 19:28:44 +08:00
ALEXTANG
470e62d9c4 Update ResourceModule.cs 2023-06-06 15:19:28 +08:00
ALEXTANG
481b5911ab Update ResourceManager.cs 2023-06-06 15:19:24 +08:00
ALEXTANG
05d3aff05e Update IResourceManager.cs 2023-06-06 15:19:20 +08:00
ALEXTANG
86bb6353dc Update ResourceManager.Services.cs
同步修复IOS平台流解密失败的问题。
2023-06-06 09:55:01 +08:00
ALEXTANG
334698b6e6 Update RootModule.cs 2023-06-05 19:31:32 +08:00
ALEXTANG
2684bd29f5 Update GameClient.cs 2023-06-05 14:49:26 +08:00
ALEXTANG
c568c62404 [+] Update HybridCLR v2.4.2
[+] Update HybridCLR v2.4.2
2023-06-05 12:34:27 +08:00
ALEXTANG
699ccb3b09 [+] Update YooAssets v1.4.14
[+] Update YooAssets v1.4.14
2023-06-05 12:19:24 +08:00
ALEXTANG
f92bf5c602 Update GameClient.cs 2023-05-20 12:23:45 +08:00
ALEXTANG
cd87c71281 Update MsgDispatcher.cs 2023-05-20 12:23:41 +08:00
ALEXTANG
94c137b3c6 Update ILogicSys.cs 2023-05-20 11:27:11 +08:00
ALEXTANG
120a86b396 Create Redux.cs 2023-05-20 11:25:49 +08:00
ALEXTANG
383dc50fe3 Create Redux.cs.meta 2023-05-20 11:25:46 +08:00
ALEXTANG
2369e8723c Update TSingleton.cs 2023-05-20 11:25:44 +08:00
ALEXTANG
344f3293ad Update ILogicSys.cs 2023-05-20 11:25:37 +08:00
ALEXTANG
5d361dd188 Update BehaviourSingleton.cs 2023-05-20 11:25:09 +08:00
ALEXTANG
a2f7fe907a Update BaseLogicSys.cs 2023-05-20 11:25:02 +08:00
ALEXTANG
5b3f64689f Create Attribute.cs.meta 2023-05-20 11:24:58 +08:00
ALEXTANG
2258c13892 Create Attribute.cs 2023-05-20 11:24:55 +08:00
ALEXTANG
a70d2e7d17 Update main.unity 2023-05-20 11:11:14 +08:00
ALEXTANG
b15f51631a Update Network.cs 2023-05-20 11:10:46 +08:00
ALEXTANG
da12bd7cab Update GameClient.cs 2023-05-20 11:10:41 +08:00
ALEXTANG
98bcaef6b7 Update UnitySingleton.cs 2023-05-20 11:10:39 +08:00
ALEXTANG
71d1286144 Update TSingleton.cs 2023-05-20 11:10:34 +08:00
ALEXTANG
9359a81a96 Update ProtobufUtility.cs 2023-05-20 11:01:38 +08:00
ALEXTANG
a9542646c1 Update NetworkChannelHelper.cs 2023-05-20 11:01:33 +08:00
ALEXTANG
0890ca9bdb [+] Network
[+] Network
2023-05-19 19:40:05 +08:00
ALEXTANG
ec409c7e15 Update Network
Update Network
2023-05-19 17:01:04 +08:00
ALEXTANG
4bc63fafc8 Update gen_pb_code.bat 2023-05-19 00:43:28 +08:00
ALEXTANG
fe0f9afd6d Update gen_pb_code.bat 2023-05-19 00:42:38 +08:00
ALEXTANG
4632a0c099 [+] UpdateNetwork Module
[+] UpdateNetwork Module
2023-05-19 00:31:15 +08:00
ALEXTANG
60e57bb80b Update ProtoUtil.cs 2023-05-19 00:08:23 +08:00
ALEXTANG
b7c79d0438 [+] ProtoCs
[+] ProtoCs
2023-05-19 00:08:11 +08:00
ALEXTANG
62b7c9e4d6 [+] Protobuf.dll
[+] Protobuf.dll
2023-05-19 00:07:24 +08:00
ALEXTANG
75a6977afb [+] ProtobufUtility
[+] ProtobufUtility
2023-05-19 00:06:43 +08:00
ALEXTANG
659da836ac Update GameLogic.asmdef 2023-05-19 00:05:52 +08:00
ALEXTANG
07c459051f [+] Proto
[+] Proto
2023-05-19 00:03:18 +08:00
ALEXTANG
4253a81e78 Update
Update
2023-05-19 00:02:43 +08:00
ALEXTANG
e498abacd1 Update ICSharpCode.SharpZipLib.dll.meta 2023-05-19 00:02:17 +08:00
ALEXTANG
f16759483f [+] NetProto
[+] NetProto
2023-05-17 23:07:17 +08:00
ALEXTANG
899472a5db [+] Network
[+] Network
2023-05-17 23:06:29 +08:00
ALEXTANG
e65245371a Update TEngineLogHelper.cs 2023-05-17 23:05:58 +08:00
ALEXTANG
b04fff4ec9 [+] proto 2023-05-17 21:38:44 +08:00
ALEXTANG
d8f8fd01d9 [+] proto 2023-05-17 21:38:24 +08:00
ALEXTANG
9b1c5e6f0a [+] proto
[+] proto
2023-05-17 21:38:14 +08:00
ALEXTANG
b2b5c9274c Update RuleConfig.asset 2023-05-15 14:09:38 +08:00
ALEXTANG
b814d689d8 [-] AnimationHierarchyEditorTool
[-] AnimationHierarchyEditorTool
2023-05-14 10:31:33 +08:00
ALEXTANG
ca6de42d67 Update main.unity 2023-05-13 14:56:47 +08:00
ALEXTANG
c3e9b76fd6 Update main.unity 2023-05-13 14:56:02 +08:00
ALEXTANG
dca7b71457 [+] DisStripCode 防裁剪
[+] DisStripCode 防裁剪
2023-05-13 14:55:55 +08:00
ALEXTANG
7106454dfb Update ProjectSettings.asset 2023-05-13 22:22:01 +08:00
ALEXTANG
b97e24aa6d Create BurstAotSettings_iOS.json 2023-05-13 22:21:49 +08:00
ALEXTANG
bec4cba501 Update .gitignore 2023-05-13 22:13:50 +08:00
ALEXTANG
0568d5f8b2 Update ProcedureLaunch.cs 2023-05-13 21:21:03 +08:00
ALEXTANG
49db48e7fc Update GameModule.cs 2023-05-13 21:20:42 +08:00
ALEXTANG
92fc5e0bcd Update ProcedureLaunch.cs 2023-05-13 21:12:41 +08:00
ALEXTANG
11391e597e Update AudioModule.cs 2023-05-13 21:12:36 +08:00
ALEXTANG
6b64f3b261 Update Constant.cs 2023-05-13 21:12:29 +08:00
ALEXTANG
dff6ba4e6d Update GameApp_RegisterSystem.cs 2023-05-13 20:35:36 +08:00
ALEXTANG
036c89a6d1 Update BehaviourSingleton.cs 2023-05-13 20:35:34 +08:00
2898 changed files with 39506 additions and 77483 deletions

121
.gitignore vendored
View File

@@ -1,118 +1,15 @@
# This .gitignore file should be placed at the root of your Unity project directory
#
# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
#
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
/[Mm]emoryCaptures/
/EditorBuild/
# /[Aa]ssets/TResources/DLL/
/[Aa]ssets/StreamingAssets
/BuildBundleInfo/
[Aa]ssets/AATest/
[Aa]ssets/AATest.meta
# Asset meta data should only be ignored when the corresponding asset is also ignored
!/[Aa]ssets/**/*.meta
# Uncomment this line if you wish to ignore the asset store tools plugin
# /[Aa]ssets/AssetStoreTools*
# Autogenerated Jetbrains Rider plugin
[Aa]ssets/Plugins/Editor/JetBrains*
# Visual Studio cache directory
.vs/
# Gradle cache directory
.gradle/
# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb
*.mdb
*.opendb
*.VC.db
# Unity3D generated meta files
*.pidb.meta
*.pdb.meta
*.mdb.meta
# Unity3D generated file on crash reports
sysinfo.txt
# Builds
*.apk
# Crashlytics generated file
crashlytics-build.properties
# TEnginePersistentDataPath
TEnginePersistentDataPath/
# Hotfix
TEngineHotUpdate/bin
TEngineHotUpdate/obj
#HybirdCLR(HuaTuo)
/HybirdCLRData/
[Hh]ybridCLRData/
#AATemp
[Aa]ssets/AATemp/
[Aa]ssets/AATemp.meta
#Rider
/.idea/
# ABConfig
[Aa]ssets/BuildConfig/
[Aa]ssets/BuildConfig.meta
[Aa]ssets/StreamingAssets/
[Aa]ssets/StreamingAssets.meta
Assets/HybridCLRBuildCache/AssetBundleOutput.meta
Assets/HybridCLRBuildCache/AssetBundleOutput/StandaloneWindows.meta
Assets/HybridCLRBuildCache.meta
Assets/HybridCLRBuildCache/AssetBundleSourceData.meta
Assets/HybridCLRBuildCache/AssetBundleSourceData/StandaloneWindows.meta
#Bundles
Bundles/
#Sandbox
Sandbox/
UnityProject/UserSettings/Layouts/default-2021.dwlt
UnityProject/UserSettings/Search.settings
#Luban
Luban/.cache.meta
Tools/Luban/
Tools/Luban.ClientServer/
Configs/.cache.meta
GenerateDatas/
#HybridCLR
Assets/HybridCLRData.meta
UserSettings/Search.settings
#Unity UserSettings
UserSettings/Search.index
UserSettings/Layouts/default-2021.dwlt
#UnityOnlineServiceData
Assets/UnityOnlineServiceData.meta
Assets/UnityOnlineServiceData
#FileServer
Tools/FileServer/AssetRoot
UnityProject/ProjectSettings/CommonBurstAotSettings.json
UnityProject/ProjectSettings/BurstAotSettings_StandaloneWindows.json

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 1a8431d2a64361c4d821790ed88aeb3d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 4343727234628468602
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 890abd3a957e406ab422fc468ba6c169
timeCreated: 1682353243

View File

@@ -1,6 +0,0 @@
namespace BattleCore.Runtime
{
public static class EntityExtension
{
}
}

View File

@@ -1,27 +0,0 @@
using UnityEngine;
using Unity.Mathematics;
namespace BattleCore.Runtime
{
public static class MathematicsExt
{
public static int2 ToInt2(this Vector2Int vec) => new int2(vec.x, vec.y);
public static int3 ToInt3(this Vector3Int vec) => new int3(vec.x, vec.y, vec.z);
public static float2 ToFloat2(this Vector2 vec) => new float2(vec.x, vec.y);
public static float3 ToFloat3(this Vector3 vec) => new float3(vec.x, vec.y, vec.z);
public static bool IsEquals(this int2 a, int2 b) => math.all(a == b);
public static bool IsEquals(this int3 a, int3 b) => math.all(a == b);
public static Vector2Int ToVec2(this int2 vec) => new Vector2Int(vec.x, vec.y);
public static Vector3Int ToVec3(this int2 vec) => new Vector3Int(vec.x, vec.y, 0);
public static Vector3Int ToVec3(this int3 vec) => new Vector3Int(vec.x, vec.y, vec.z);
public static Vector2 ToVec2(this float2 vec) => new Vector2(vec.x, vec.y);
public static Vector3 ToVec3(this float3 vec) => new Vector3(vec.x, vec.y, vec.z);
public static int ManhattanDist(this int2 vec) => vec.x + vec.y;
public static int ManhattanDist(this int3 vec) => vec.x + vec.y + vec.z;
public static float ManhattanDist(this float2 vec) => vec.x + vec.y;
public static float ManhattanDist(this float3 vec) => vec.x + vec.y + vec.z;
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 2b0e288b918a41698571ec3d36059851
timeCreated: 1682353251

View File

@@ -1,21 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace BattleCore.Runtime
{
public class Empty : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}
}

View File

@@ -1,16 +0,0 @@
namespace GameBase
{
public class BaseClsTemplate<T>
{
protected static T Imp;
/// <summary>
/// Unity工程注册处理函数。
/// </summary>
/// <param name="imp">实现类。</param>
public static void RegisterImp(T imp)
{
Imp = imp;
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: b062b3e32edd4536a4308a3d180842e0
timeCreated: 1681989133

View File

@@ -1,190 +0,0 @@
using UnityEngine;
using System.Collections.Generic;
using System;
using System.Threading;
using System.Linq;
/*******************************************************************************
//开启一个Loom进程
Loom.RunAsync(() =>
{
aucThread = new Thread(ReceiveMsg);
aucThread.Start();
}
//进程调用主线程方法
MainPack pack = (MainPack)MainPack.Descriptor.Parser.ParseFrom(buffer, 0, len);
Loom.QueueOnMainThread((param) =>
{
UdpHandleResponse(pack);
}, null);
*******************************************************************************/
namespace GameBase
{
/// <summary>
/// Loom多线程通信。
/// <remarks></remarks>
/// </summary>
public class Loom : MonoBehaviour
{
public Dictionary<string, CancellationTokenSource> TokenSourcesDictionary = new Dictionary<string, CancellationTokenSource>();
private static readonly int MaxThreads = 8;
private static int _numThreads;
private static Loom _current;
public static Loom Current
{
get
{
Initialize();
return _current;
}
}
public void Awake()
{
_current = this;
_initialized = true;
}
protected void OnDestroy()
{
}
private static bool _initialized;
private static void Initialize()
{
if (!_initialized)
{
if (!Application.isPlaying)
{
return;
}
_initialized = true;
var obj = new GameObject("[Loom]");
_current = obj.AddComponent<Loom>();
DontDestroyOnLoad(obj);
}
}
public struct NoDelayedQueueItem
{
public Action<object> Action;
public object Param;
}
private readonly List<NoDelayedQueueItem> _actions = new List<NoDelayedQueueItem>();
public struct DelayedQueueItem
{
public float Time;
public Action<object> Action;
public object Param;
}
private readonly List<DelayedQueueItem> _delayed = new List<DelayedQueueItem>();
private readonly List<DelayedQueueItem> _currentDelayed = new List<DelayedQueueItem>();
public static void QueueOnMainThread(Action<object> taction, object param, float time = 0f)
{
if (time != 0f)
{
lock (Current._delayed)
{
Current._delayed.Add(new DelayedQueueItem { Time = Time.time + time, Action = taction, Param = param });
}
}
else
{
lock (Current._actions)
{
Current._actions.Add(new NoDelayedQueueItem { Action = taction, Param = param });
}
}
}
public static Thread RunAsync(Action action)
{
Initialize();
while (_numThreads >= MaxThreads)
{
Thread.Sleep(100);
}
Interlocked.Increment(ref _numThreads);
ThreadPool.QueueUserWorkItem(RunAction, action);
return null;
}
private static void RunAction(object action)
{
try
{
((Action)action)();
}
catch
{
// ignored
}
finally
{
Interlocked.Decrement(ref _numThreads);
}
}
void OnDisable()
{
if (_current == this)
{
_current = null;
}
}
private readonly List<NoDelayedQueueItem> _currentActions = new List<NoDelayedQueueItem>();
void Update()
{
if (_actions.Count > 0)
{
lock (_actions)
{
_currentActions.Clear();
_currentActions.AddRange(_actions);
_actions.Clear();
}
for (int i = 0; i < _currentActions.Count; i++)
{
_currentActions[i].Action(_currentActions[i].Param);
}
}
if (_delayed.Count > 0)
{
lock (_delayed)
{
_currentDelayed.Clear();
_currentDelayed.AddRange(_delayed.Where(d => d.Time <= Time.time));
for (int i = 0; i < _currentDelayed.Count; i++)
{
_delayed.Remove(_currentDelayed[i]);
}
}
for (int i = 0; i < _currentDelayed.Count; i++)
{
_currentDelayed[i].Action(_currentDelayed[i].Param);
}
}
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 00565f0d362f4c36836804455e19c3df
timeCreated: 1681990210

View File

@@ -1,214 +0,0 @@
using System.Collections.Generic;
using TEngine;
using UnityEngine;
using UnityEngine.SceneManagement;
namespace GameBase
{
/// <summary>
/// 单例接口。
/// </summary>
public interface ISingleton
{
void Active();
void Release();
}
/// <summary>
/// 单例管理器(统一化持久和释放)。
/// </summary>
public static class SingletonMgr
{
private static List<ISingleton> _singletonList;
private static Dictionary<string, GameObject> _gameObjects;
private static GameObject _root;
public static GameObject Root
{
get
{
if (_root == null)
{
_root = GameObject.Find("[SingletonMgr]");
if (_root == null)
{
_root = new GameObject("[SingletonMgr]")
{
transform =
{
position = Vector3.zero
}
};
}
UnityEngine.Object.DontDestroyOnLoad(_root);
}
return _root;
}
}
public static void Retain(ISingleton go)
{
if (_singletonList == null)
{
_singletonList = new List<ISingleton>();
}
_singletonList.Add(go);
}
public static void Retain(GameObject go)
{
if (_gameObjects == null)
{
_gameObjects = new Dictionary<string, GameObject>();
}
if (!_gameObjects.ContainsKey(go.name))
{
_gameObjects.Add(go.name, go);
if (Application.isPlaying)
{
UnityEngine.Object.DontDestroyOnLoad(go);
}
}
}
public static void Release(GameObject go)
{
if (_gameObjects != null && _gameObjects.ContainsKey(go.name))
{
_gameObjects.Remove(go.name);
UnityEngine.Object.Destroy(go);
}
}
public static void Release(ISingleton go)
{
if (_singletonList != null && _singletonList.Contains(go))
{
_singletonList.Remove(go);
}
}
public static void Release()
{
if (_gameObjects != null)
{
foreach (var item in _gameObjects)
{
UnityEngine.Object.Destroy(item.Value);
}
_gameObjects.Clear();
}
if (_singletonList != null)
{
for (int i = 0; i < _singletonList.Count; ++i)
{
_singletonList[i].Release();
}
_singletonList.Clear();
}
Resources.UnloadUnusedAssets();
}
public static GameObject GetGameObject(string name)
{
GameObject go = null;
if (_gameObjects != null)
{
_gameObjects.TryGetValue(name, out go);
}
return go;
}
internal static bool ContainsKey(string name)
{
if (_gameObjects != null)
{
return _gameObjects.ContainsKey(name);
}
return false;
}
internal static ISingleton GetSingleton(string name)
{
for (int i = 0; i < _singletonList.Count; ++i)
{
if (_singletonList[i].ToString() == name)
{
return _singletonList[i];
}
}
return null;
}
/// <summary>
/// 释放所有单例。
/// </summary>
public static void ReStart()
{
Release();
SceneManager.LoadScene(0);
}
}
/// <summary>
/// 全局单例对象(非线程安全)。
/// </summary>
/// <typeparam name="T">泛型T。</typeparam>
public abstract class TSingleton<T> : ISingleton where T : TSingleton<T>, new()
{
private static T _instance;
public static T Instance
{
get
{
if (null == _instance)
{
_instance = new T();
_instance.Init();
#if UNITY_EDITOR
Log.Info($"TSingleton Instance:{typeof(T).Name}");
#endif
SingletonMgr.Retain(_instance);
}
return _instance;
}
}
public static bool IsValid => _instance != null;
protected TSingleton()
{
}
protected virtual void Init()
{
}
public virtual void Active()
{
}
public virtual void Release()
{
if (_instance != null)
{
SingletonMgr.Release(_instance);
_instance = null;
}
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: aa2cb5bb622045d7a6f2a4c4faea3ca6
timeCreated: 1681989590

View File

@@ -1,111 +0,0 @@
using TEngine;
using UnityEngine;
namespace GameBase
{
/// <summary>
/// 具备Unity完整生命周期的单例。
/// </summary>
/// <typeparam name="T"></typeparam>
public abstract class UnitySingleton<T> : MonoBehaviour where T : MonoBehaviour
{
private static T _instance;
public static T Instance
{
get
{
if (_instance == null)
{
var ins = UnityEngine.Object.FindObjectOfType<T>();
if (ins != null)
{
var obj = ins.gameObject;
obj.name = typeof(T).Name;
_instance = ins;
SingletonMgr.Retain(obj);
return Instance;
}
System.Type thisType = typeof(T);
string instName = thisType.Name;
GameObject go = SingletonMgr.GetGameObject(instName);
if (go == null)
{
go = GameObject.Find($"{instName}");
if (go == null)
{
go = new GameObject(instName);
go.transform.position = Vector3.zero;
}
}
_instance = go.GetComponent<T>();
if (_instance == null)
{
_instance = go.AddComponent<T>();
}
if (_instance == null)
{
Log.Error($"Can't create UnitySingleton<{typeof(T)}>");
}
}
return _instance;
}
}
public static T Active()
{
return Instance;
}
public static bool IsValid => _instance != null;
private bool CheckInstance()
{
if (this == Instance)
{
return true;
}
GameObject.Destroy(gameObject);
return false;
}
protected virtual void OnLoad()
{
}
public virtual void Awake()
{
if (CheckInstance())
{
OnLoad();
}
#if UNITY_EDITOR
Log.Debug($"UnitySingleton Instance:{typeof(T).Name}");
#endif
GameObject tEngine = SingletonMgr.Root;
if (tEngine != null)
{
this.gameObject.transform.SetParent(tEngine.transform);
}
}
protected virtual void OnDestroy()
{
Release();
}
public static void Release()
{
if (_instance != null)
{
SingletonMgr.Release(_instance.gameObject);
_instance = null;
}
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 25c99243aa534df5870e36fdf9d36afd
timeCreated: 1681990223

View File

@@ -1,24 +0,0 @@
using TEngine;
using UnityEngine;
#if ENABLE_URP
using UnityEngine.Rendering.Universal;
#endif
namespace GameLogic
{
public class CameraUtils
{
public static void AddCameraStack(Camera camera,Camera mainCamera)
{
#if ENABLE_URP
if (mainCamera != null)
{
// 通过脚本的方式,只要能找到 camera 不轮是否跨 base 相机的场景,都可以 Add 进 Stack
mainCamera.GetComponent<UniversalAdditionalCameraData>().cameraStack.Add(GameModule.UI.UICamera);
}
#else
Log.Fatal("Could not add camera stack because had no URP-Render-Pip");
#endif
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 6375b5490bbdcc145a24706a6c4e9cb7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 4703541a565f5ec4bb35edd81c28958c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 145b951be40d41dea06e76bd967a5d15
timeCreated: 1682045847

View File

@@ -1,19 +0,0 @@
using System;
using ProtoBuf;
namespace GameLogic
{
[Serializable, ProtoContract(Name = @"HeartBeat")]
public class HeartBeat : PacketBase
{
public HeartBeat()
{
}
public override int Id => 1;
public override void Clear()
{
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: d8b9b60d2abf409ca9dd2ce00506ac79
timeCreated: 1682046644

View File

@@ -1,254 +0,0 @@
using ProtoBuf;
using ProtoBuf.Meta;
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Sockets;
using System.Reflection;
using TEngine;
namespace GameLogic
{
public class NetworkChannelHelper : INetworkChannelHelper, IMemory
{
private readonly Dictionary<int, Type> _serverToClientPacketTypes = new Dictionary<int, Type>();
private readonly MemoryStream _cachedStream = new MemoryStream(1024 * 8);
private INetworkChannel _networkChannel = null;
/// <summary>
/// 获取消息包头长度。
/// <remarks>4。</remarks>
/// </summary>
public int PacketHeaderLength => sizeof(int);
/// <summary>
/// 初始化网络频道辅助器。
/// </summary>
/// <param name="networkChannel">网络频道。</param>
public void Initialize(INetworkChannel networkChannel)
{
_networkChannel = networkChannel;
// 反射注册包和包处理函数。
Type packetBaseType = typeof(ProtoPacket);
Assembly assembly = Assembly.GetExecutingAssembly();
Type[] types = assembly.GetTypes();
for (int i = 0; i < types.Length; i++)
{
if (!types[i].IsClass || types[i].IsAbstract)
{
continue;
}
if (types[i].BaseType == packetBaseType)
{
PacketBase packetBase = (PacketBase)Activator.CreateInstance(types[i]);
Type packetType = GetServerToClientPacketType(packetBase.Id);
if (packetType != null)
{
Log.Warning("Already exist packet type '{0}', check '{1}' or '{2}'?.", packetBase.Id.ToString(), packetType.Name, packetBase.GetType().Name);
continue;
}
_serverToClientPacketTypes.Add(packetBase.Id, types[i]);
}
}
GameEvent.AddEventListener<INetworkChannel, object>(NetworkEvent.NetworkConnectedEvent, OnNetworkConnected);
GameEvent.AddEventListener<INetworkChannel>(NetworkEvent.NetworkClosedEvent, OnNetworkClosed);
GameEvent.AddEventListener<INetworkChannel, int>(NetworkEvent.NetworkMissHeartBeatEvent, OnNetworkMissHeartBeat);
GameEvent.AddEventListener<INetworkChannel, NetworkErrorCode, SocketError, string>(NetworkEvent.NetworkErrorEvent, OnNetworkError);
GameEvent.AddEventListener<INetworkChannel, object>(NetworkEvent.NetworkCustomErrorEvent, OnNetworkCustomError);
}
/// <summary>
/// 关闭并清理网络频道辅助器。
/// </summary>
public void Shutdown()
{
GameEvent.RemoveEventListener<INetworkChannel, object>(NetworkEvent.NetworkConnectedEvent, OnNetworkConnected);
GameEvent.RemoveEventListener<INetworkChannel>(NetworkEvent.NetworkClosedEvent, OnNetworkClosed);
GameEvent.RemoveEventListener<INetworkChannel, int>(NetworkEvent.NetworkMissHeartBeatEvent, OnNetworkMissHeartBeat);
GameEvent.RemoveEventListener<INetworkChannel, NetworkErrorCode, SocketError, string>(NetworkEvent.NetworkErrorEvent, OnNetworkError);
GameEvent.RemoveEventListener<INetworkChannel, object>(NetworkEvent.NetworkCustomErrorEvent, OnNetworkCustomError);
_networkChannel = null;
}
/// <summary>
/// 准备进行连接。
/// </summary>
public void PrepareForConnecting()
{
_networkChannel.Socket.ReceiveBufferSize = 1024 * 64;
_networkChannel.Socket.SendBufferSize = 1024 * 64;
}
/// <summary>
/// 发送心跳消息包。
/// </summary>
/// <returns>是否发送心跳消息包成功。</returns>
public bool SendHeartBeat()
{
_networkChannel.Send(MemoryPool.Acquire<HeartBeat>());
return true;
}
/// <summary>
/// 序列化消息包。
/// </summary>
/// <typeparam name="T">消息包类型。</typeparam>
/// <param name="packet">要序列化的消息包。</param>
/// <param name="destination">要序列化的目标流。</param>
/// <returns>是否序列化成功。</returns>
public bool Serialize<T>(T packet, Stream destination) where T : Packet
{
PacketBase packetImpl = packet as PacketBase;
if (packetImpl == null)
{
Log.Warning("Packet is invalid.");
return false;
}
_cachedStream.SetLength(_cachedStream.Capacity); // 此行防止 Array.Copy 的数据无法写入
_cachedStream.Position = 0L;
PacketHeader packetHeader = MemoryPool.Acquire<PacketHeader>();
Serializer.Serialize(_cachedStream, packetHeader);
MemoryPool.Release(packetHeader);
Serializer.SerializeWithLengthPrefix(_cachedStream, packet, PrefixStyle.Fixed32);
MemoryPool.Release((IMemory)packet);
_cachedStream.WriteTo(destination);
return true;
}
/// <summary>
/// 反序列化消息包头。
/// </summary>
/// <param name="source">要反序列化的来源流。</param>
/// <param name="customErrorData">用户自定义错误数据。</param>
/// <returns>反序列化后的消息包头。</returns>
public IPacketHeader DeserializePacketHeader(Stream source, out object customErrorData)
{
// 注意:此函数并不在主线程调用!
customErrorData = null;
return (IPacketHeader)RuntimeTypeModel.Default.Deserialize(source, MemoryPool.Acquire<PacketHeader>(), typeof(PacketHeader));
}
/// <summary>
/// 反序列化消息包。
/// </summary>
/// <param name="packetHeader">消息包头。</param>
/// <param name="source">要反序列化的来源流。</param>
/// <param name="customErrorData">用户自定义错误数据。</param>
/// <returns>反序列化后的消息包。</returns>
public Packet DeserializePacket(IPacketHeader packetHeader, Stream source, out object customErrorData)
{
// 注意:此函数并不在主线程调用!
customErrorData = null;
PacketHeader scPacketHeader = packetHeader as PacketHeader;
if (scPacketHeader == null)
{
Log.Warning("Packet header is invalid.");
return null;
}
Packet packet = null;
if (scPacketHeader.IsValid)
{
Type packetType = GetServerToClientPacketType(scPacketHeader.Id);
if (packetType != null)
{
packet = (Packet)RuntimeTypeModel.Default.DeserializeWithLengthPrefix(source, MemoryPool.Acquire(packetType), packetType, PrefixStyle.Fixed32, 0);
}
else
{
Log.Warning("Can not deserialize packet for packet id '{0}'.", scPacketHeader.Id.ToString());
}
}
else
{
Log.Warning("Packet header is invalid.");
}
MemoryPool.Release(scPacketHeader);
return packet;
}
private Type GetServerToClientPacketType(int id)
{
if (_serverToClientPacketTypes.TryGetValue(id, out var type))
{
return type;
}
return null;
}
private void OnNetworkConnected(INetworkChannel channel, object userdata)
{
if (channel != _networkChannel)
{
return;
}
Log.Info("Network channel '{0}' connected, local address '{1}', remote address '{2}'.",
channel.Name, channel.Socket.LocalEndPoint.ToString(),
channel.Socket.RemoteEndPoint.ToString());
}
private void OnNetworkClosed(INetworkChannel channel)
{
if (channel != _networkChannel)
{
return;
}
Log.Info("Network channel '{0}' closed.", channel.Name);
}
private void OnNetworkMissHeartBeat(INetworkChannel channel, int missCount)
{
if (channel != _networkChannel)
{
return;
}
Log.Fatal("Network channel '{0}' miss heart beat '{1}' times.", channel.Name, missCount.ToString());
if (missCount < 2)
{
return;
}
channel.Close();
}
private void OnNetworkError(INetworkChannel channel, NetworkErrorCode networkErrorCode, SocketError socketError, string errorMessage)
{
if (channel != _networkChannel)
{
return;
}
Log.Fatal("Network channel '{0}' error, error code is '{1}', error message is '{2}'.", channel.Name, networkErrorCode.ToString(), errorMessage);
channel.Close();
}
private void OnNetworkCustomError(INetworkChannel channel, object userData)
{
if (channel != _networkChannel)
{
return;
}
}
public void Clear()
{
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: bf86ce2ddfb5429abecfb06257c86acd
timeCreated: 1682045961

View File

@@ -1,24 +0,0 @@
using TEngine;
namespace GameLogic
{
/// <summary>
/// 网络消息包基类。
/// </summary>
public abstract class PacketBase : Packet
{
/// <summary>
/// 网络消息包Id。
/// </summary>
public int ProtoId;
/// <summary>
/// 网络消息包包体。
/// </summary>
public byte[] ProtoBody;
public void Close()
{
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: acea4283f57644b6b4452354d23f2803
timeCreated: 1682045887

View File

@@ -1,47 +0,0 @@
using TEngine;
namespace GameLogic
{
/// <summary>
/// 网络消息包头。
/// </summary>
public class PacketHeader : IPacketHeader, IMemory
{
/// <summary>
/// 网络消息包Id。
/// </summary>
public short Id
{
get;
set;
}
/// <summary>
/// 网络消息包长度。
/// </summary>
public int PacketLength
{
get;
set;
}
/// <summary>
/// 网络消息包是否合法。
/// </summary>
public bool IsValid
{
get
{
return PacketLength >= 0;
}
}
/// <summary>
/// 清除网络消息包头。
/// </summary>
public void Clear()
{
PacketLength = 0;
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 30edc133b73141598b5351d4afc2ad93
timeCreated: 1682046771

View File

@@ -1,15 +0,0 @@
namespace GameLogic
{
/// <summary>
/// 网络消息包。
/// </summary>
public partial class ProtoPacket : PacketBase
{
public override int Id => 1;
public override void Clear()
{
Close();
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: da70995486db4799baba570b1767ab86
timeCreated: 1682045865

View File

@@ -1,138 +0,0 @@
// using System;
// using System.ComponentModel;
// using System.IO;
// using ProtoBuf;
// using ProtoBuf.Meta;
//
// /// <summary>
// /// ProtoBuf工具
// /// </summary>
// public class ProtobufUtils
// {
// /// <summary>
// /// 消息压入内存流。
// /// </summary>
// /// <param name="message"></param>
// /// <param name="stream"></param>
// public static void ToStream(object message, MemoryStream stream)
// {
// ((IMessage)message).WriteTo(stream);
// }
//
// /// <summary>
// /// 比特流解析。
// /// </summary>
// /// <param name="type"></param>
// /// <param name="bytes"></param>
// /// <param name="index"></param>
// /// <param name="count"></param>
// /// <returns></returns>
// public static object FromBytes(Type type, byte[] bytes, int index, int count)
// {
// object message = Activator.CreateInstance(type);
// ((IMessage)message).MergeFrom(bytes, index, count);
// ISupportInitialize iSupportInitialize = message as ISupportInitialize;
// if (iSupportInitialize == null)
// {
// return message;
// }
//
// iSupportInitialize.EndInit();
// return message;
// }
//
// /// <summary>
// /// 比特流解析。
// /// </summary>
// /// <param name="instance"></param>
// /// <param name="bytes"></param>
// /// <param name="index"></param>
// /// <param name="count"></param>
// /// <returns></returns>
// public static object FromBytes(object instance, byte[] bytes, int index, int count)
// {
// object message = instance;
// ((IMessage)message).MergeFrom(bytes, index, count);
// ISupportInitialize iSupportInitialize = message as ISupportInitialize;
// if (iSupportInitialize == null)
// {
// return message;
// }
//
// iSupportInitialize.EndInit();
// return message;
// }
//
// /// <summary>
// /// 从内存流取出。
// /// </summary>
// /// <param name="type"></param>
// /// <param name="stream"></param>
// /// <returns></returns>
// public static object FromStream(Type type, MemoryStream stream)
// {
// object message = Activator.CreateInstance(type);
// ((IMessage)message).MergeFrom(stream.GetBuffer(), (int)stream.Position, (int)stream.Length);
// ISupportInitialize iSupportInitialize = message as ISupportInitialize;
// if (iSupportInitialize == null)
// {
// return message;
// }
//
// iSupportInitialize.EndInit();
// return message;
// }
//
// /// <summary>
// /// 从内存流取出。
// /// </summary>
// /// <param name="message"></param>
// /// <param name="stream"></param>
// /// <returns></returns>
// public static object FromStream(object message, MemoryStream stream)
// {
// // TODO 这个message最好从池中获取减少gc
// ((IMessage)message).MergeFrom(stream.GetBuffer(), (int)stream.Position, (int)stream.Length);
// ISupportInitialize iSupportInitialize = message as ISupportInitialize;
// if (iSupportInitialize == null)
// {
// return message;
// }
//
// iSupportInitialize.EndInit();
// return message;
// }
//
// /// <summary>
// /// 序列化protobuf
// /// </summary>
// /// <param name="message"></param>
// /// <returns></returns>
// public static byte[] Serialize(object message)
// {
// return ((IMessage)message).ToByteArray();
// }
//
// /// <summary>
// /// 反序列化protobuf
// /// </summary>
// /// <typeparam name="T"></typeparam>
// /// <param name="dataBytes"></param>
// /// <returns></returns>
// public static T Deserialize<T>(byte[] dataBytes) where T : IMessage, new()
// {
// T msg = new T();
// msg = (T)msg.Descriptor.Parser.ParseFrom(dataBytes);
// return msg;
// }
//
// public static int GetHighOrder(int cmdMerge)
// {
// return cmdMerge >> 16;
// }
//
// public static int GetLowOrder(int cmdMerge)
// {
// return cmdMerge & 65535;
// }
// }

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 972ca4545003463d8710de956f0fde66
timeCreated: 1682047511

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 12517ef95f49a9144b18989aa8097420
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: d376f2d7d7324712998e19cfa2e03039
timeCreated: 1680161323

View File

@@ -1,76 +0,0 @@
using Bright.Serialization;
using System.IO;
using GameBase;
using GameConfig;
using SimpleJSON;
using UnityEngine;
/// <summary>
/// 配置加载器
/// </summary>
public class ConfigLoader:Singleton<ConfigLoader>
{
private bool _init = false;
private Tables _tables;
public Tables Tables
{
get
{
if (!_init)
{
_init = true;
Load();
}
return _tables;
}
}
/// <summary>
/// 加载配置
/// </summary>
public void Load()
{
var tablesCtor = typeof(Tables).GetConstructors()[0];
var loaderReturnType = tablesCtor.GetParameters()[0].ParameterType.GetGenericArguments()[1];
System.Delegate loader = loaderReturnType == typeof(ByteBuf)
? new System.Func<string, ByteBuf>(LoadByteBuf)
: (System.Delegate)new System.Func<string, JSONNode>(LoadJson);
_tables = (Tables)tablesCtor.Invoke(new object[] { loader });
}
/// <summary>
/// 加载Json配置。
/// </summary>
/// <param name="file">FileName</param>
/// <returns>JSONNode</returns>
private JSONNode LoadJson(string file)
{
#if UNITY_EDITOR
var ret = File.ReadAllText($"{Application.dataPath}/../GenerateDatas/json/{file}.json", System.Text.Encoding.UTF8);
#else
var textAssets = GameModule.Resource.LoadAsset<TextAsset>($"{SettingsUtils.FrameworkGlobalSettings.ConfigFolderName}{file}.json");
var ret = textAssets.text;
#endif
return JSON.Parse(ret);
}
/// <summary>
/// 加载二进制配置。
/// </summary>
/// <param name="file">FileName</param>
/// <returns>ByteBuf</returns>
private ByteBuf LoadByteBuf(string file)
{
byte[] ret = null;
#if UNITY_EDITOR
ret = File.ReadAllBytes($"{Application.dataPath}/../GenerateDatas/bytes/{file}.bytes");
#else
var textAssets = GameModule.Resource.LoadAsset<TextAsset>($"{SettingsUtils.FrameworkGlobalSettings.ConfigFolderName}{file}.bytes");
ret = textAssets.bytes;
#endif
return new ByteBuf(ret);
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: abc35c855bfb323429a1d72066c8489c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,65 +0,0 @@
using System;
using System.Collections.Generic;
using TEngine;
namespace GameProto
{
/// <summary>
/// 指定Key委托。
/// </summary>
/// <typeparam name="TKey">键。</typeparam>
/// <typeparam name="TValue">值。</typeparam>
public delegate TKey ConvertDictionaryKey<out TKey, in TValue>(TValue val);
/// <summary>
/// 配置表辅助工具。
/// </summary>
public static class ConfigUtility
{
/// <summary>
/// 生成64long的主键。
/// </summary>
/// <param name="key1">键1。</param>
/// <param name="key2">键2。</param>
/// <returns>64long的主键。</returns>
public static UInt64 Make64Key(uint key1, uint key2)
{
return ((UInt64)key1 << 32) | key2;
}
/// <summary>
/// 拷贝配置表字典。
/// </summary>
/// <param name="dict">拷贝地址。</param>
/// <param name="source">拷贝源。</param>
/// <param name="convKey">指定主键。</param>
/// <typeparam name="TKey">键。</typeparam>
/// <typeparam name="TValue">值。</typeparam>
/// <returns>是否拷贝成功。</returns>
public static bool CopyConfigDict<TKey, TValue>(ref Dictionary<TKey, TValue> dict,List<TValue> source, ConvertDictionaryKey<TKey, TValue> convKey)
{
if (source == null)
{
return false;
}
dict.Clear();
bool failed = false;
for (int i = 0; i < source.Count; i++)
{
var data = source[i];
TKey key = convKey(data);
if (dict.ContainsKey(key))
{
Log.Fatal("Copy Config Failed: {0} IndexOf {1} Had Repeated Key: {2} ", typeof(TValue).Name, i + 1, key);
failed = true;
break;
}
dict.Add(key, data);
}
return !failed;
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: e278e636820842f293e2a765962ad4f8
timeCreated: 1683300170

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 31f94e2989871ec49b783b3aeb1b142c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,32 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GameConfig.Battle
{
public enum ActorAttrAddType
{
/// <summary>
/// 无效数据
/// </summary>
NONE = 0,
/// <summary>
/// 加法计算
/// </summary>
ABSOLUTE_VAL = 1,
/// <summary>
/// 多个项结果累加,然后对加法做乘法
/// </summary>
SUM_PERCENT_VAL = 2,
/// <summary>
/// 每一项都是对最终结果做乘法
/// </summary>
MUL_PERCENT_VAL = 3,
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 073f19ae3fef26f43b193ff35a27eb9c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,88 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GameConfig.Battle
{
public enum ActorAttrDataType
{
/// <summary>
/// 无效数据
/// </summary>
None = 0,
/// <summary>
/// 最大血量
/// </summary>
MaxHp = 1,
/// <summary>
/// 攻击力
/// </summary>
Attack = 2,
/// <summary>
/// 物理伤害
/// </summary>
PhyDamage = 3,
/// <summary>
/// 物理防御
/// </summary>
PhyDef = 4,
/// <summary>
/// 法术伤害
/// </summary>
MagicDamage = 5,
/// <summary>
/// 法术防御
/// </summary>
MagicDef = 6,
/// <summary>
/// 移动速度
/// </summary>
MoveSpeed = 7,
/// <summary>
/// 攻击速度
/// </summary>
AttackSpeed = 8,
/// <summary>
/// 命中率
/// </summary>
Hit = 9,
/// <summary>
/// 闪避率
/// </summary>
Dodge = 10,
/// <summary>
/// 暴击率
/// </summary>
CriticalAtkRatio = 11,
/// <summary>
/// San值(疯狂值)
/// </summary>
SanValue = 12,
/// <summary>
/// 最大MP
/// </summary>
MaxMp = 13,
/// <summary>
/// 物理伤害倍率
/// </summary>
PhyDamageRatio = 14,
/// <summary>
/// 魔法伤害倍率
/// </summary>
MagicDamageRatio = 15,
/// <summary>
/// 暴击倍率
/// </summary>
CriticalRatio = 16,
/// <summary>
/// 暴击减免
/// </summary>
CriticalReduce = 17,
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 89dbbbd30b2f8c74f86ede4e27591ba7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,116 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace GameConfig.Battle
{
public sealed partial class BuffAttrConfig : Bright.Config.BeanBase
{
public BuffAttrConfig(JSONNode _json)
{
{ if(!_json["BuffID"].IsNumber) { throw new SerializationException(); } BuffID = _json["BuffID"]; }
{ if(!_json["name"].IsString) { throw new SerializationException(); } Name = _json["name"]; }
{ if(!_json["StackNum"].IsNumber) { throw new SerializationException(); } StackNum = _json["StackNum"]; }
{ if(!_json["DurTime"].IsNumber) { throw new SerializationException(); } DurTime = _json["DurTime"]; }
{ if(!_json["ResultType"].IsNumber) { throw new SerializationException(); } ResultType = (Battle.BuffResultType)_json["ResultType"].AsInt; }
{ if(!_json["RemoveWhenDie"].IsNumber) { throw new SerializationException(); } RemoveWhenDie = _json["RemoveWhenDie"]; }
{ if(!_json["DotDamageData"].IsObject) { throw new SerializationException(); } DotDamageData = Battle.SkillAttrDamageData.DeserializeSkillAttrDamageData(_json["DotDamageData"]); }
{ if(!_json["DotTickConfig"].IsObject) { throw new SerializationException(); } DotTickConfig = Battle.BuffDotTickConfig.DeserializeBuffDotTickConfig(_json["DotTickConfig"]); }
{ var __json0 = _json["AttrData"]; if(!__json0.IsArray) { throw new SerializationException(); } AttrData = new System.Collections.Generic.List<Battle.ResAttrImpactData>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { Battle.ResAttrImpactData __v0; { if(!__e0.IsObject) { throw new SerializationException(); } __v0 = Battle.ResAttrImpactData.DeserializeResAttrImpactData(__e0); } AttrData.Add(__v0); } }
PostInit();
}
public BuffAttrConfig(int BuffID, string name, int StackNum, float DurTime, Battle.BuffResultType ResultType, int RemoveWhenDie, Battle.SkillAttrDamageData DotDamageData, Battle.BuffDotTickConfig DotTickConfig, System.Collections.Generic.List<Battle.ResAttrImpactData> AttrData )
{
this.BuffID = BuffID;
this.Name = name;
this.StackNum = StackNum;
this.DurTime = DurTime;
this.ResultType = ResultType;
this.RemoveWhenDie = RemoveWhenDie;
this.DotDamageData = DotDamageData;
this.DotTickConfig = DotTickConfig;
this.AttrData = AttrData;
PostInit();
}
public static BuffAttrConfig DeserializeBuffAttrConfig(JSONNode _json)
{
return new Battle.BuffAttrConfig(_json);
}
/// <summary>
/// BuffID
/// </summary>
public int BuffID { get; private set; }
/// <summary>
/// 名字
/// </summary>
public string Name { get; private set; }
/// <summary>
/// 叠加次数
/// </summary>
public int StackNum { get; private set; }
/// <summary>
/// 持续时间
/// </summary>
public float DurTime { get; private set; }
/// <summary>
/// 数值效果类型
/// </summary>
public Battle.BuffResultType ResultType { get; private set; }
/// <summary>
/// 死亡消失
/// </summary>
public int RemoveWhenDie { get; private set; }
public Battle.SkillAttrDamageData DotDamageData { get; private set; }
public Battle.BuffDotTickConfig DotTickConfig { get; private set; }
public System.Collections.Generic.List<Battle.ResAttrImpactData> AttrData { get; private set; }
public const int __ID__ = 1652935996;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary<string, object> _tables)
{
DotDamageData?.Resolve(_tables);
DotTickConfig?.Resolve(_tables);
foreach(var _e in AttrData) { _e?.Resolve(_tables); }
PostResolve();
}
public void TranslateText(System.Func<string, string, string> translator)
{
DotDamageData?.TranslateText(translator);
DotTickConfig?.TranslateText(translator);
foreach(var _e in AttrData) { _e?.TranslateText(translator); }
}
public override string ToString()
{
return "{ "
+ "BuffID:" + BuffID + ","
+ "Name:" + Name + ","
+ "StackNum:" + StackNum + ","
+ "DurTime:" + DurTime + ","
+ "ResultType:" + ResultType + ","
+ "RemoveWhenDie:" + RemoveWhenDie + ","
+ "DotDamageData:" + DotDamageData + ","
+ "DotTickConfig:" + DotTickConfig + ","
+ "AttrData:" + Bright.Common.StringUtil.CollectionToString(AttrData) + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 5224da34dfb42c141b22335957c1b784
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,111 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace GameConfig.Battle
{
public sealed partial class BuffConfig : Bright.Config.BeanBase
{
public BuffConfig(JSONNode _json)
{
{ if(!_json["BuffID"].IsNumber) { throw new SerializationException(); } BuffID = _json["BuffID"]; }
{ if(!_json["name"].IsString) { throw new SerializationException(); } Name = _json["name"]; }
{ if(!_json["prefId"].IsNumber) { throw new SerializationException(); } PrefId = _json["prefId"]; }
{ if(!_json["desc"].IsString) { throw new SerializationException(); } Desc = _json["desc"]; }
{ if(!_json["icon"].IsString) { throw new SerializationException(); } Icon = _json["icon"]; }
{ if(!_json["TimeType"].IsNumber) { throw new SerializationException(); } TimeType = (Battle.BuffTimeType)_json["TimeType"].AsInt; }
{ if(!_json["ReplaceType"].IsNumber) { throw new SerializationException(); } ReplaceType = (Battle.BuffReplaceType)_json["ReplaceType"].AsInt; }
{ if(!_json["State"].IsObject) { throw new SerializationException(); } State = Battle.BuffTriggleState.DeserializeBuffTriggleState(_json["State"]); }
PostInit();
}
public BuffConfig(int BuffID, string name, int prefId, string desc, string icon, Battle.BuffTimeType TimeType, Battle.BuffReplaceType ReplaceType, Battle.BuffTriggleState State )
{
this.BuffID = BuffID;
this.Name = name;
this.PrefId = prefId;
this.Desc = desc;
this.Icon = icon;
this.TimeType = TimeType;
this.ReplaceType = ReplaceType;
this.State = State;
PostInit();
}
public static BuffConfig DeserializeBuffConfig(JSONNode _json)
{
return new Battle.BuffConfig(_json);
}
/// <summary>
/// BuffID
/// </summary>
public int BuffID { get; private set; }
/// <summary>
/// 名字
/// </summary>
public string Name { get; private set; }
/// <summary>
/// 表现ID
/// </summary>
public int PrefId { get; private set; }
/// <summary>
/// 描述
/// </summary>
public string Desc { get; private set; }
/// <summary>
/// 图标
/// </summary>
public string Icon { get; private set; }
/// <summary>
/// 持续类型
/// </summary>
public Battle.BuffTimeType TimeType { get; private set; }
/// <summary>
/// 叠加类型
/// </summary>
public Battle.BuffReplaceType ReplaceType { get; private set; }
public Battle.BuffTriggleState State { get; private set; }
public const int __ID__ = 1807662187;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary<string, object> _tables)
{
State?.Resolve(_tables);
PostResolve();
}
public void TranslateText(System.Func<string, string, string> translator)
{
State?.TranslateText(translator);
}
public override string ToString()
{
return "{ "
+ "BuffID:" + BuffID + ","
+ "Name:" + Name + ","
+ "PrefId:" + PrefId + ","
+ "Desc:" + Desc + ","
+ "Icon:" + Icon + ","
+ "TimeType:" + TimeType + ","
+ "ReplaceType:" + ReplaceType + ","
+ "State:" + State + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 6b4f7b8798a4dca4ca075552d618f24d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,64 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace GameConfig.Battle
{
public sealed partial class BuffDotTickConfig : Bright.Config.BeanBase
{
public BuffDotTickConfig(JSONNode _json)
{
{ if(!_json["TickTime"].IsNumber) { throw new SerializationException(); } TickTime = _json["TickTime"]; }
{ if(!_json["TickWhenAdd"].IsNumber) { throw new SerializationException(); } TickWhenAdd = _json["TickWhenAdd"]; }
PostInit();
}
public BuffDotTickConfig(float TickTime, int TickWhenAdd )
{
this.TickTime = TickTime;
this.TickWhenAdd = TickWhenAdd;
PostInit();
}
public static BuffDotTickConfig DeserializeBuffDotTickConfig(JSONNode _json)
{
return new Battle.BuffDotTickConfig(_json);
}
public float TickTime { get; private set; }
public int TickWhenAdd { get; private set; }
public const int __ID__ = 2124630047;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary<string, object> _tables)
{
PostResolve();
}
public void TranslateText(System.Func<string, string, string> translator)
{
}
public override string ToString()
{
return "{ "
+ "TickTime:" + TickTime + ","
+ "TickWhenAdd:" + TickWhenAdd + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 3b87372c0c0ce0547bc2221f8f8cc7dc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,36 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GameConfig.Battle
{
public enum BuffReplaceType
{
/// <summary>
/// 更新时间范围
/// </summary>
BUFF_REPLACE_INSTEAD = 0,
/// <summary>
/// 不允许叠加
/// </summary>
BUFF_REPLACE_FORBIT = 1,
/// <summary>
/// 累加时间范围
/// </summary>
BUFF_REPLACE_ADD_TIME = 2,
/// <summary>
/// 叠加数值
/// </summary>
BUFF_REPLACE_ADD_ATTR = 3,
/// <summary>
/// 叠加种类
/// </summary>
BUFF_REPLACE_TYPE_COUNT = 4,
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 6141f2c1272ed3848baf1f8d3341fc79
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,100 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GameConfig.Battle
{
public enum BuffResultType
{
/// <summary>
/// 无
/// </summary>
BUFF_RESULT_NONE = 0,
/// <summary>
/// 物理攻击提升
/// </summary>
BUFF_RESULT_PHY_ATK_UP = 1,
/// <summary>
/// 物理攻击降低
/// </summary>
BUFF_RESULT_PHY_ATK_DOWN = 2,
/// <summary>
/// 物理防御提升
/// </summary>
BUFF_RESULT_PHY_DEF_UP = 3,
/// <summary>
/// 物理防御降低
/// </summary>
BUFF_RESULT_PHY_DEF_DOWN = 4,
/// <summary>
/// 物理命中提升
/// </summary>
BUFF_RESULT_PHY_HIT_UP = 5,
/// <summary>
/// 物理命中降低
/// </summary>
BUFF_RESULT_PHY_HIT_DOWN = 6,
/// <summary>
/// 物理持续掉血
/// </summary>
BUFF_RESULT_PHY_LOSE_HP = 7,
/// <summary>
/// 法术攻击提升
/// </summary>
BUFF_RESULT_MAG_ATK_UP = 8,
/// <summary>
/// 法术攻击降低
/// </summary>
BUFF_RESULT_MAG_ATK_DOWN = 9,
/// <summary>
/// 法术防御提升
/// </summary>
BUFF_RESULT_MAG_DEF_UP = 10,
/// <summary>
/// 法术防御降低
/// </summary>
BUFF_RESULT_MAG_DEF_DOWN = 11,
/// <summary>
/// 法术命中提升
/// </summary>
BUFF_RESULT_MAG_HIT_UP = 12,
/// <summary>
/// 法术命中降低
/// </summary>
BUFF_RESULT_MAG_HIT_DOWN = 13,
/// <summary>
/// 法术持续掉血
/// </summary>
BUFF_RESULT_MAG_LOSE_HP = 14,
/// <summary>
/// 暴击率提升
/// </summary>
BUFF_RESULT_CIRT_UP = 15,
/// <summary>
/// 暴击率降低
/// </summary>
BUFF_RESULT_CIRT_DOWN = 16,
/// <summary>
/// 暴击倍率提升
/// </summary>
BUFF_RESULT_CIRT_VALUE_UP = 17,
/// <summary>
/// 暴击倍率降低
/// </summary>
BUFF_RESULT_CIRT_VALUE_DOWN = 18,
/// <summary>
/// 移速提升
/// </summary>
BUFF_RESULT_MOVE_SPEED_UP = 19,
/// <summary>
/// 移速降低
/// </summary>
BUFF_RESULT_MOVE_SPEED_DOWN = 20,
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 2e26edcf2629cd142b51031f7b81f679
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,60 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GameConfig.Battle
{
public enum BuffStateID
{
/// <summary>
/// 无状态
/// </summary>
BUFF_STATE_NONE = 0,
/// <summary>
/// 眩晕状态
/// </summary>
BUFF_STATE_STUN = 1,
/// <summary>
/// 无敌状态
/// </summary>
BUFF_STATE_UNDEAD = 2,
/// <summary>
/// 隐身状态
/// </summary>
BUFF_STATE_INVISIBLE = 3,
/// <summary>
/// 体形变大
/// </summary>
BUFF_STATE_BIGGER = 4,
/// <summary>
/// 定身,不能移动
/// </summary>
BUFF_STATE_NO_MOVE = 5,
/// <summary>
/// 沉默,不能放技能
/// </summary>
BUFF_STATE_NO_SKILL = 6,
/// <summary>
/// 昏睡
/// </summary>
BUFF_STATE_SLEEP = 7,
/// <summary>
/// 强制开启阻挡
/// </summary>
BUFF_STATE_FORCE_COLLIDER = 8,
/// <summary>
/// 无视阻挡
/// </summary>
BUFF_STATE_IGNORE_COLLIDER = 9,
/// <summary>
/// 最大状态
/// </summary>
BUFF_STATE_MAX = 10,
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 24a5cdf7ed62f5945aba3814ebf02ae8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,24 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GameConfig.Battle
{
public enum BuffTimeType
{
/// <summary>
/// 指定持续时间
/// </summary>
BUFF_TIME_DURING = 0,
/// <summary>
/// 无尽时间
/// </summary>
BUFF_TIME_INFINIT = 1,
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: dff2bf6f031b38d4c8574d94e75d28d1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,64 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace GameConfig.Battle
{
public sealed partial class BuffTriggleState : Bright.Config.BeanBase
{
public BuffTriggleState(JSONNode _json)
{
{ if(!_json["StateID"].IsNumber) { throw new SerializationException(); } StateID = (Battle.BuffStateID)_json["StateID"].AsInt; }
{ if(!_json["StateParam"].IsNumber) { throw new SerializationException(); } StateParam = _json["StateParam"]; }
PostInit();
}
public BuffTriggleState(Battle.BuffStateID StateID, float StateParam )
{
this.StateID = StateID;
this.StateParam = StateParam;
PostInit();
}
public static BuffTriggleState DeserializeBuffTriggleState(JSONNode _json)
{
return new Battle.BuffTriggleState(_json);
}
public Battle.BuffStateID StateID { get; private set; }
public float StateParam { get; private set; }
public const int __ID__ = 1328146134;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary<string, object> _tables)
{
PostResolve();
}
public void TranslateText(System.Func<string, string, string> translator)
{
}
public override string ToString()
{
return "{ "
+ "StateID:" + StateID + ","
+ "StateParam:" + StateParam + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 03926dd0c4ff9dd479230386fd1e9190
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,68 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace GameConfig.Battle
{
public sealed partial class ResAttrImpactData : Bright.Config.BeanBase
{
public ResAttrImpactData(JSONNode _json)
{
{ if(!_json["DataType"].IsNumber) { throw new SerializationException(); } DataType = (Battle.ActorAttrDataType)_json["DataType"].AsInt; }
{ if(!_json["AddType"].IsNumber) { throw new SerializationException(); } AddType = (Battle.ActorAttrAddType)_json["AddType"].AsInt; }
{ if(!_json["Value"].IsNumber) { throw new SerializationException(); } Value = _json["Value"]; }
PostInit();
}
public ResAttrImpactData(Battle.ActorAttrDataType DataType, Battle.ActorAttrAddType AddType, float Value )
{
this.DataType = DataType;
this.AddType = AddType;
this.Value = Value;
PostInit();
}
public static ResAttrImpactData DeserializeResAttrImpactData(JSONNode _json)
{
return new Battle.ResAttrImpactData(_json);
}
public Battle.ActorAttrDataType DataType { get; private set; }
public Battle.ActorAttrAddType AddType { get; private set; }
public float Value { get; private set; }
public const int __ID__ = 1319292907;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary<string, object> _tables)
{
PostResolve();
}
public void TranslateText(System.Func<string, string, string> translator)
{
}
public override string ToString()
{
return "{ "
+ "DataType:" + DataType + ","
+ "AddType:" + AddType + ","
+ "Value:" + Value + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 9d3720a9d26e66047ad302fd1dc92da5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,80 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace GameConfig.Battle
{
public sealed partial class SkillAttrDamageData : Bright.Config.BeanBase
{
public SkillAttrDamageData(JSONNode _json)
{
{ if(!_json["MagicType"].IsNumber) { throw new SerializationException(); } MagicType = (Battle.SkillMagicType)_json["MagicType"].AsInt; }
{ if(!_json["AttrType"].IsNumber) { throw new SerializationException(); } AttrType = (Battle.SkillAttrDamageType)_json["AttrType"].AsInt; }
{ if(!_json["Param1"].IsNumber) { throw new SerializationException(); } Param1 = _json["Param1"]; }
{ if(!_json["Param2"].IsNumber) { throw new SerializationException(); } Param2 = _json["Param2"]; }
{ if(!_json["Param3"].IsNumber) { throw new SerializationException(); } Param3 = _json["Param3"]; }
{ if(!_json["MaxLimit"].IsNumber) { throw new SerializationException(); } MaxLimit = _json["MaxLimit"]; }
PostInit();
}
public SkillAttrDamageData(Battle.SkillMagicType MagicType, Battle.SkillAttrDamageType AttrType, float Param1, float Param2, float Param3, float MaxLimit )
{
this.MagicType = MagicType;
this.AttrType = AttrType;
this.Param1 = Param1;
this.Param2 = Param2;
this.Param3 = Param3;
this.MaxLimit = MaxLimit;
PostInit();
}
public static SkillAttrDamageData DeserializeSkillAttrDamageData(JSONNode _json)
{
return new Battle.SkillAttrDamageData(_json);
}
public Battle.SkillMagicType MagicType { get; private set; }
public Battle.SkillAttrDamageType AttrType { get; private set; }
public float Param1 { get; private set; }
public float Param2 { get; private set; }
public float Param3 { get; private set; }
public float MaxLimit { get; private set; }
public const int __ID__ = -94519547;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary<string, object> _tables)
{
PostResolve();
}
public void TranslateText(System.Func<string, string, string> translator)
{
}
public override string ToString()
{
return "{ "
+ "MagicType:" + MagicType + ","
+ "AttrType:" + AttrType + ","
+ "Param1:" + Param1 + ","
+ "Param2:" + Param2 + ","
+ "Param3:" + Param3 + ","
+ "MaxLimit:" + MaxLimit + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 485330d35ed83074e98aee4f9afebff7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,40 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GameConfig.Battle
{
public enum SkillAttrDamageType
{
/// <summary>
/// 无数值
/// </summary>
ATTR_TYPE_NONE = 0,
/// <summary>
/// 按释放者的伤害类型*X%+固定值计算,目标有防御计算
/// </summary>
ATTR_TYPE_DMG_WEAPON = 1,
/// <summary>
/// 按释放者的伤害类型*X%+固定值计算(无视目标的防御)
/// </summary>
ATTR_TYPE_DMG_NO_DEFEND = 2,
/// <summary>
/// 按受击者的气血上限*X%+固定值计算(无视目标的防御)
/// </summary>
ATTR_TYPE_DMG_TARGET_HP_NO_DEFEND = 3,
/// <summary>
/// 按释放者的攻击类型*X%+固定值计算,恢复当前生命
/// </summary>
ATTR_TYPE_HP_AS_ATK = 4,
/// <summary>
/// 按受击者的HP上限*X%+固定值计算,恢复当前生命
/// </summary>
ATTR_TYPE_HP_RATIO = 5,
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: a875b3c697d164841b02d808b103a384
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,132 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace GameConfig.Battle
{
public sealed partial class SkillBaseConfig : Bright.Config.BeanBase
{
public SkillBaseConfig(JSONNode _json)
{
{ if(!_json["id"].IsNumber) { throw new SerializationException(); } Id = _json["id"]; }
{ if(!_json["name"].IsString) { throw new SerializationException(); } Name = _json["name"]; }
{ if(!_json["SkillDispID"].IsNumber) { throw new SerializationException(); } SkillDispID = _json["SkillDispID"]; }
{ if(!_json["SkillType"].IsNumber) { throw new SerializationException(); } SkillType = _json["SkillType"]; }
{ if(!_json["desc"].IsString) { throw new SerializationException(); } Desc = _json["desc"]; }
{ if(!_json["CostMP"].IsNumber) { throw new SerializationException(); } CostMP = _json["CostMP"]; }
{ if(!_json["GCDID"].IsNumber) { throw new SerializationException(); } GCDID = _json["GCDID"]; }
{ if(!_json["SkillCD"].IsNumber) { throw new SerializationException(); } SkillCD = _json["SkillCD"]; }
{ if(!_json["IsRepeatTrigger"].IsBoolean) { throw new SerializationException(); } IsRepeatTrigger = _json["IsRepeatTrigger"]; }
{ var __json0 = _json["BuffID"]; if(!__json0.IsArray) { throw new SerializationException(); } BuffID = new System.Collections.Generic.List<int>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } BuffID.Add(__v0); } }
{ var __json0 = _json["AttrDamageData"]; if(!__json0.IsArray) { throw new SerializationException(); } AttrDamageData = new System.Collections.Generic.List<Battle.SkillAttrDamageData>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { Battle.SkillAttrDamageData __v0; { if(!__e0.IsObject) { throw new SerializationException(); } __v0 = Battle.SkillAttrDamageData.DeserializeSkillAttrDamageData(__e0); } AttrDamageData.Add(__v0); } }
PostInit();
}
public SkillBaseConfig(int id, string name, int SkillDispID, int SkillType, string desc, int CostMP, int GCDID, float SkillCD, bool IsRepeatTrigger, System.Collections.Generic.List<int> BuffID, System.Collections.Generic.List<Battle.SkillAttrDamageData> AttrDamageData )
{
this.Id = id;
this.Name = name;
this.SkillDispID = SkillDispID;
this.SkillType = SkillType;
this.Desc = desc;
this.CostMP = CostMP;
this.GCDID = GCDID;
this.SkillCD = SkillCD;
this.IsRepeatTrigger = IsRepeatTrigger;
this.BuffID = BuffID;
this.AttrDamageData = AttrDamageData;
PostInit();
}
public static SkillBaseConfig DeserializeSkillBaseConfig(JSONNode _json)
{
return new Battle.SkillBaseConfig(_json);
}
/// <summary>
/// 技能ID
/// </summary>
public int Id { get; private set; }
/// <summary>
/// 名字
/// </summary>
public string Name { get; private set; }
/// <summary>
/// 表现ID
/// </summary>
public int SkillDispID { get; private set; }
/// <summary>
/// 技能类型SkillType
/// </summary>
public int SkillType { get; private set; }
/// <summary>
/// 描述
/// </summary>
public string Desc { get; private set; }
/// <summary>
/// 消耗MP
/// </summary>
public int CostMP { get; private set; }
/// <summary>
/// 所属公CD组ID
/// </summary>
public int GCDID { get; private set; }
/// <summary>
/// 技能CD
/// </summary>
public float SkillCD { get; private set; }
/// <summary>
/// 是否重复触发
/// </summary>
public bool IsRepeatTrigger { get; private set; }
/// <summary>
/// BuffIDList
/// </summary>
public System.Collections.Generic.List<int> BuffID { get; private set; }
public System.Collections.Generic.List<Battle.SkillAttrDamageData> AttrDamageData { get; private set; }
public const int __ID__ = 2067672430;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary<string, object> _tables)
{
foreach(var _e in AttrDamageData) { _e?.Resolve(_tables); }
PostResolve();
}
public void TranslateText(System.Func<string, string, string> translator)
{
foreach(var _e in AttrDamageData) { _e?.TranslateText(translator); }
}
public override string ToString()
{
return "{ "
+ "Id:" + Id + ","
+ "Name:" + Name + ","
+ "SkillDispID:" + SkillDispID + ","
+ "SkillType:" + SkillType + ","
+ "Desc:" + Desc + ","
+ "CostMP:" + CostMP + ","
+ "GCDID:" + GCDID + ","
+ "SkillCD:" + SkillCD + ","
+ "IsRepeatTrigger:" + IsRepeatTrigger + ","
+ "BuffID:" + Bright.Common.StringUtil.CollectionToString(BuffID) + ","
+ "AttrDamageData:" + Bright.Common.StringUtil.CollectionToString(AttrDamageData) + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: b651cf87b4372cf4a8894a9421a6dcff
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,28 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GameConfig.Battle
{
public enum SkillMagicType
{
/// <summary>
/// 无类型
/// </summary>
SKILL_TYPE_NONE = 0,
/// <summary>
/// 物理伤害属性
/// </summary>
SKILL_TYPE_DMG_PHY = 1,
/// <summary>
/// 魔法伤害属性
/// </summary>
SKILL_TYPE_DMG_MAGIC = 2,
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 050deaa6f717a36428b057b5c1f889b2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,65 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace GameConfig.Battle
{
public sealed partial class TbBuff
{
private readonly Dictionary<int, Battle.BuffConfig> _dataMap;
private readonly List<Battle.BuffConfig> _dataList;
public TbBuff(JSONNode _json)
{
_dataMap = new Dictionary<int, Battle.BuffConfig>();
_dataList = new List<Battle.BuffConfig>();
foreach(JSONNode _row in _json.Children)
{
var _v = Battle.BuffConfig.DeserializeBuffConfig(_row);
_dataList.Add(_v);
_dataMap.Add(_v.BuffID, _v);
}
PostInit();
}
public Dictionary<int, Battle.BuffConfig> DataMap => _dataMap;
public List<Battle.BuffConfig> DataList => _dataList;
public Battle.BuffConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public Battle.BuffConfig Get(int key) => _dataMap[key];
public Battle.BuffConfig this[int key] => _dataMap[key];
public void Resolve(Dictionary<string, object> _tables)
{
foreach(var v in _dataList)
{
v.Resolve(_tables);
}
PostResolve();
}
public void TranslateText(System.Func<string, string, string> translator)
{
foreach(var v in _dataList)
{
v.TranslateText(translator);
}
}
partial void PostInit();
partial void PostResolve();
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 4bae3a42b1e627f44b53f42fa8835064
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,65 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace GameConfig.Battle
{
public sealed partial class TbBuffAttr
{
private readonly Dictionary<int, Battle.BuffAttrConfig> _dataMap;
private readonly List<Battle.BuffAttrConfig> _dataList;
public TbBuffAttr(JSONNode _json)
{
_dataMap = new Dictionary<int, Battle.BuffAttrConfig>();
_dataList = new List<Battle.BuffAttrConfig>();
foreach(JSONNode _row in _json.Children)
{
var _v = Battle.BuffAttrConfig.DeserializeBuffAttrConfig(_row);
_dataList.Add(_v);
_dataMap.Add(_v.BuffID, _v);
}
PostInit();
}
public Dictionary<int, Battle.BuffAttrConfig> DataMap => _dataMap;
public List<Battle.BuffAttrConfig> DataList => _dataList;
public Battle.BuffAttrConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public Battle.BuffAttrConfig Get(int key) => _dataMap[key];
public Battle.BuffAttrConfig this[int key] => _dataMap[key];
public void Resolve(Dictionary<string, object> _tables)
{
foreach(var v in _dataList)
{
v.Resolve(_tables);
}
PostResolve();
}
public void TranslateText(System.Func<string, string, string> translator)
{
foreach(var v in _dataList)
{
v.TranslateText(translator);
}
}
partial void PostInit();
partial void PostResolve();
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 67c85d7e042f25f4b8728ea5d0260af4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,65 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace GameConfig.Battle
{
public sealed partial class TbSkill
{
private readonly Dictionary<int, Battle.SkillBaseConfig> _dataMap;
private readonly List<Battle.SkillBaseConfig> _dataList;
public TbSkill(JSONNode _json)
{
_dataMap = new Dictionary<int, Battle.SkillBaseConfig>();
_dataList = new List<Battle.SkillBaseConfig>();
foreach(JSONNode _row in _json.Children)
{
var _v = Battle.SkillBaseConfig.DeserializeSkillBaseConfig(_row);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public Dictionary<int, Battle.SkillBaseConfig> DataMap => _dataMap;
public List<Battle.SkillBaseConfig> DataList => _dataList;
public Battle.SkillBaseConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public Battle.SkillBaseConfig Get(int key) => _dataMap[key];
public Battle.SkillBaseConfig this[int key] => _dataMap[key];
public void Resolve(Dictionary<string, object> _tables)
{
foreach(var v in _dataList)
{
v.Resolve(_tables);
}
PostResolve();
}
public void TranslateText(System.Func<string, string, string> translator)
{
foreach(var v in _dataList)
{
v.TranslateText(translator);
}
}
partial void PostInit();
partial void PostResolve();
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 4225d28df041ab84e93ed201b8c52f3e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,54 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Bright.Serialization;
using SimpleJSON;
namespace GameConfig
{
public sealed partial class Tables
{
public item.TbItem TbItem {get; }
public Battle.TbSkill TbSkill {get; }
public Battle.TbBuff TbBuff {get; }
public Battle.TbBuffAttr TbBuffAttr {get; }
public Tables(System.Func<string, JSONNode> loader)
{
var tables = new System.Collections.Generic.Dictionary<string, object>();
TbItem = new item.TbItem(loader("item_tbitem"));
tables.Add("item.TbItem", TbItem);
TbSkill = new Battle.TbSkill(loader("battle_tbskill"));
tables.Add("Battle.TbSkill", TbSkill);
TbBuff = new Battle.TbBuff(loader("battle_tbbuff"));
tables.Add("Battle.TbBuff", TbBuff);
TbBuffAttr = new Battle.TbBuffAttr(loader("battle_tbbuffattr"));
tables.Add("Battle.TbBuffAttr", TbBuffAttr);
PostInit();
TbItem.Resolve(tables);
TbSkill.Resolve(tables);
TbBuff.Resolve(tables);
TbBuffAttr.Resolve(tables);
PostResolve();
}
public void TranslateText(System.Func<string, string, string> translator)
{
TbItem.TranslateText(translator);
TbSkill.TranslateText(translator);
TbBuff.TranslateText(translator);
TbBuffAttr.TranslateText(translator);
}
partial void PostInit();
partial void PostResolve();
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 45e65de224e02f04db3ee7af36494bb9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 92dacb95febd2204ca6721a0794739ba
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,32 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GameConfig.item
{
public enum EQuality
{
/// <summary>
/// 最差品质
/// </summary>
WHITE = 1,
/// <summary>
/// 蓝色的
/// </summary>
BLUE = 2,
/// <summary>
/// 紫色的
/// </summary>
PURPLE = 3,
/// <summary>
/// 最高品质
/// </summary>
RED = 4,
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 30c573667ec26fd478ae418601d60abf
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,138 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace GameConfig.item
{
public sealed partial class Item : Bright.Config.BeanBase
{
public Item(JSONNode _json)
{
{ if(!_json["id"].IsNumber) { throw new SerializationException(); } Id = _json["id"]; }
{ if(!_json["name"].IsString) { throw new SerializationException(); } Name = _json["name"]; }
{ if(!_json["desc"].IsString) { throw new SerializationException(); } Desc = _json["desc"]; }
{ if(!_json["price"].IsNumber) { throw new SerializationException(); } Price = _json["price"]; }
{ if(!_json["upgrade_to_item_id"].IsNumber) { throw new SerializationException(); } UpgradeToItemId = _json["upgrade_to_item_id"]; }
{ var _j = _json["expire_time"]; if (_j.Tag != JSONNodeType.None && _j.Tag != JSONNodeType.NullValue) { { if(!_j.IsNumber) { throw new SerializationException(); } ExpireTime = _j; } } else { ExpireTime = null; } }
{ if(!_json["batch_useable"].IsBoolean) { throw new SerializationException(); } BatchUseable = _json["batch_useable"]; }
{ if(!_json["quality"].IsNumber) { throw new SerializationException(); } Quality = (item.EQuality)_json["quality"].AsInt; }
{ if(!_json["exchange_stream"].IsObject) { throw new SerializationException(); } ExchangeStream = item.ItemExchange.DeserializeItemExchange(_json["exchange_stream"]); }
{ var __json0 = _json["exchange_list"]; if(!__json0.IsArray) { throw new SerializationException(); } ExchangeList = new System.Collections.Generic.List<item.ItemExchange>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { item.ItemExchange __v0; { if(!__e0.IsObject) { throw new SerializationException(); } __v0 = item.ItemExchange.DeserializeItemExchange(__e0); } ExchangeList.Add(__v0); } }
{ if(!_json["exchange_column"].IsObject) { throw new SerializationException(); } ExchangeColumn = item.ItemExchange.DeserializeItemExchange(_json["exchange_column"]); }
PostInit();
}
public Item(int id, string name, string desc, int price, int upgrade_to_item_id, int? expire_time, bool batch_useable, item.EQuality quality, item.ItemExchange exchange_stream, System.Collections.Generic.List<item.ItemExchange> exchange_list, item.ItemExchange exchange_column )
{
this.Id = id;
this.Name = name;
this.Desc = desc;
this.Price = price;
this.UpgradeToItemId = upgrade_to_item_id;
this.ExpireTime = expire_time;
this.BatchUseable = batch_useable;
this.Quality = quality;
this.ExchangeStream = exchange_stream;
this.ExchangeList = exchange_list;
this.ExchangeColumn = exchange_column;
PostInit();
}
public static Item DeserializeItem(JSONNode _json)
{
return new item.Item(_json);
}
/// <summary>
/// 这是id
/// </summary>
public int Id { get; private set; }
/// <summary>
/// 名字
/// </summary>
public string Name { get; private set; }
/// <summary>
/// 描述
/// </summary>
public string Desc { get; private set; }
/// <summary>
/// 价格
/// </summary>
public int Price { get; private set; }
/// <summary>
/// 引用当前表
/// </summary>
public int UpgradeToItemId { get; private set; }
public item.Item UpgradeToItemId_Ref { get; private set; }
/// <summary>
/// 过期时间
/// </summary>
public int? ExpireTime { get; private set; }
/// <summary>
/// 能否批量使用
/// </summary>
public bool BatchUseable { get; private set; }
/// <summary>
/// 品质
/// </summary>
public item.EQuality Quality { get; private set; }
/// <summary>
/// 道具兑换配置
/// </summary>
public item.ItemExchange ExchangeStream { get; private set; }
public System.Collections.Generic.List<item.ItemExchange> ExchangeList { get; private set; }
/// <summary>
/// 道具兑换配置
/// </summary>
public item.ItemExchange ExchangeColumn { get; private set; }
public const int __ID__ = 2107285806;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary<string, object> _tables)
{
this.UpgradeToItemId_Ref = (_tables["item.TbItem"] as item.TbItem).GetOrDefault(UpgradeToItemId);
ExchangeStream?.Resolve(_tables);
foreach(var _e in ExchangeList) { _e?.Resolve(_tables); }
ExchangeColumn?.Resolve(_tables);
PostResolve();
}
public void TranslateText(System.Func<string, string, string> translator)
{
ExchangeStream?.TranslateText(translator);
foreach(var _e in ExchangeList) { _e?.TranslateText(translator); }
ExchangeColumn?.TranslateText(translator);
}
public override string ToString()
{
return "{ "
+ "Id:" + Id + ","
+ "Name:" + Name + ","
+ "Desc:" + Desc + ","
+ "Price:" + Price + ","
+ "UpgradeToItemId:" + UpgradeToItemId + ","
+ "ExpireTime:" + ExpireTime + ","
+ "BatchUseable:" + BatchUseable + ","
+ "Quality:" + Quality + ","
+ "ExchangeStream:" + ExchangeStream + ","
+ "ExchangeList:" + Bright.Common.StringUtil.CollectionToString(ExchangeList) + ","
+ "ExchangeColumn:" + ExchangeColumn + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 3e65d3e4aa74f27438c746308c434ed9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,70 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace GameConfig.item
{
public sealed partial class ItemExchange : Bright.Config.BeanBase
{
public ItemExchange(JSONNode _json)
{
{ if(!_json["id"].IsNumber) { throw new SerializationException(); } Id = _json["id"]; }
{ if(!_json["num"].IsNumber) { throw new SerializationException(); } Num = _json["num"]; }
PostInit();
}
public ItemExchange(int id, int num )
{
this.Id = id;
this.Num = num;
PostInit();
}
public static ItemExchange DeserializeItemExchange(JSONNode _json)
{
return new item.ItemExchange(_json);
}
/// <summary>
/// 道具id
/// </summary>
public int Id { get; private set; }
/// <summary>
/// 道具数量
/// </summary>
public int Num { get; private set; }
public const int __ID__ = 1814660465;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary<string, object> _tables)
{
PostResolve();
}
public void TranslateText(System.Func<string, string, string> translator)
{
}
public override string ToString()
{
return "{ "
+ "Id:" + Id + ","
+ "Num:" + Num + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 9a752eb48ae7a124fba2dba3d3ca2c4e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,65 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace GameConfig.item
{
public sealed partial class TbItem
{
private readonly Dictionary<int, item.Item> _dataMap;
private readonly List<item.Item> _dataList;
public TbItem(JSONNode _json)
{
_dataMap = new Dictionary<int, item.Item>();
_dataList = new List<item.Item>();
foreach(JSONNode _row in _json.Children)
{
var _v = item.Item.DeserializeItem(_row);
_dataList.Add(_v);
_dataMap.Add(_v.Id, _v);
}
PostInit();
}
public Dictionary<int, item.Item> DataMap => _dataMap;
public List<item.Item> DataList => _dataList;
public item.Item GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
public item.Item Get(int key) => _dataMap[key];
public item.Item this[int key] => _dataMap[key];
public void Resolve(Dictionary<string, object> _tables)
{
foreach(var v in _dataList)
{
v.Resolve(_tables);
}
PostResolve();
}
public void TranslateText(System.Func<string, string, string> translator)
{
foreach(var v in _dataList)
{
v.TranslateText(translator);
}
}
partial void PostInit();
partial void PostResolve();
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 2ab4162ad0234444ea02f248b5c325c9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 1fb403cf09ac38a49aea0b887a068cba
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,25 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace GameConfig.test
{
[System.Flags]
public enum AccessFlag
{
WRITE = 1,
READ = 2,
TRUNCATE = 4,
NEW = 8,
/// <summary>
/// 位标记使用示例
/// </summary>
READ_WRITE = WRITE|READ,
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 0fa3d642fac8be9429d88fe4823320e0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,68 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using ProtoBuf;
using TEngine;
using System.Collections.Generic;
namespace GameProto
{
// 这个文件只放协议,和协议头
// 消息协议
[Serializable,global::ProtoBuf.ProtoContract(Name = @"CSPkg")]
public partial class CSPkg
{
[global::ProtoBuf.ProtoMember(1)]
public CSPkgHead Head { get; set; }
[global::ProtoBuf.ProtoMember(2)]
public CSPkgBody Body { get; set; }
}
// 消息协议头
[Serializable,global::ProtoBuf.ProtoContract(Name = @"CSPkgHead")]
public partial class CSPkgHead
{
[global::ProtoBuf.ProtoMember(1)]
public uint MsgId { get; set; }
[global::ProtoBuf.ProtoMember(2)]
public uint MsgLength { get; set; }
[global::ProtoBuf.ProtoMember(3)]
public uint MsgVersion { get; set; }
[global::ProtoBuf.ProtoMember(4)]
public uint Echo { get; set; }
[global::ProtoBuf.ProtoMember(5)]
public uint SvrTime { get; set; }
}
// 消息协议体
[Serializable,global::ProtoBuf.ProtoContract(Name = @"CSPkgBody")]
public partial class CSPkgBody
{
}
// 协议ID
[global::ProtoBuf.ProtoContract()]
public enum CSMsgID
{
CS_START = 0,
CS_HeartBeat = 10001,
CS_END = 10000,
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 6d59eaaad20d9234ba941173b39361fc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,5 +0,0 @@
{
"UpdateType": 1,
"UpdateStyle": 1,
"UpdateNotice": 1
}

View File

@@ -1,26 +0,0 @@
using System;
namespace GameMain
{
public class LoadUpdateLogic
{
private static LoadUpdateLogic _instance;
public Action<int> DownloadCompleteAction = null;
public Action<float> DownProgressAction = null;
public Action<bool,GameStatus> UnpackedCompleteAction = null;
public Action<float,GameStatus> UnpackedProgressAction = null;
public static LoadUpdateLogic Instance
{
get
{
if (_instance == null)
{
_instance = new LoadUpdateLogic();
}
return _instance;
}
}
}
}

View File

@@ -1,13 +0,0 @@
using UnityEngine;
namespace GameMain
{
public class UIBase : MonoBehaviour
{
protected object Param;
public virtual void OnEnter(object param)
{
Param = param;
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: b150d874e1db306419683d8fb8f50af4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,34 +0,0 @@
using System.Collections.Generic;
using TEngine;
namespace GameMain
{
public class UIDefine
{
public static readonly string UILoadUpdate = "UILoadUpdate";
public static readonly string UILoadTip = "UILoadTip";
/// <summary>
/// 注册ui
/// </summary>
/// <param name="list"></param>
public static void RegisterUI(Dictionary<string, string> list)
{
if (list == null)
{
Log.Error("[UIManager]list is null");
return;
}
if (!list.ContainsKey(UILoadUpdate))
{
list.Add(UILoadUpdate, $"AssetLoad/{UILoadUpdate}");
}
if (!list.ContainsKey(UILoadTip))
{
list.Add(UILoadTip, $"AssetLoad/{UILoadTip}");
}
}
}
}

View File

@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 8b4a6ad67f754024987f55526fa21034
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,149 +0,0 @@
using System.Collections.Generic;
using UnityEngine;
using TEngine;
namespace GameMain
{
public static class UILoadMgr
{
private static GameObject _uiLoad;
private static readonly Dictionary<string, string> UIList = new Dictionary<string, string>();
private static readonly Dictionary<string, UIBase> UIMap = new Dictionary<string, UIBase>();
/// <summary>
/// 初始化根节点
/// </summary>
public static void Initialize()
{
_uiLoad = GameObject.Find("AssetLoad");
if (_uiLoad == null)
{
var obj = Resources.Load($"AssetLoad/UILoad");
if (obj == null)
{
Log.Error("Failed to load UILoad. Please check the resource path");
return;
}
_uiLoad = Object.Instantiate(obj) as GameObject;
if (_uiLoad != null)
{
_uiLoad.name = "AssetLoad";
_uiLoad.transform.SetAsLastSibling();
}
else
{
Log.Error($"AssetLoad object Instantiate Failed");
return;
}
}
RegisterUI();
}
private static void RegisterUI()
{
UIDefine.RegisterUI(UIList);
}
/// <summary>
/// show ui
/// </summary>
/// <param name="uiInfo">对应的ui</param>
/// <param name="param">参数</param>
public static void Show(string uiInfo,object param = null)
{
if (string.IsNullOrEmpty(uiInfo))
return;
if (!UIList.ContainsKey(uiInfo))
{
Log.Error($"not define ui:{uiInfo}");
return;
}
GameObject ui = null;
if (!UIMap.ContainsKey(uiInfo))
{
Object obj = Resources.Load(UIList[uiInfo]);
if (obj != null)
{
ui = Object.Instantiate(obj) as GameObject;
if (ui != null)
{
ui.transform.SetParent(_uiLoad.transform);
ui.transform.localScale = Vector3.one;
ui.transform.localPosition = Vector3.zero;
RectTransform rect = ui.GetComponent<RectTransform>();
rect.sizeDelta = Vector2.zero;
}
}
if (ui != null)
{
UIBase uiBase = ui.GetComponent<UIBase>();
if (uiBase != null)
{
UIMap.Add(uiInfo, uiBase);
}
}
}
UIMap[uiInfo].gameObject.SetActive(true);
if (param != null)
{
UIBase component = UIMap[uiInfo].GetComponent<UIBase>();
if (component != null)
{
component.OnEnter(param);
}
}
}
/// <summary>
/// 隐藏ui对象
/// </summary>
/// <param name="uiName">对应的ui</param>
public static void Hide(string uiName)
{
if (string.IsNullOrEmpty(uiName))
{
return;
}
if (!UIMap.ContainsKey(uiName))
{
return;
}
UIMap[uiName].gameObject.SetActive(false);
Object.DestroyImmediate(UIMap[uiName].gameObject);
UIMap.Remove(uiName);
}
/// <summary>
/// 获取显示的ui对象
/// </summary>
/// <param name="ui"></param>
/// <returns></returns>
public static UIBase GetActiveUI(string ui)
{
return UIMap.ContainsKey(ui) ? UIMap[ui] : null;
}
/// <summary>
/// 隐藏ui管理器
/// </summary>
public static void HideAll()
{
foreach (var item in UIMap)
{
if (item.Value && item.Value.gameObject)
{
item.Value.gameObject.SetActive(false);
}
}
UIMap.Clear();
if (_uiLoad != null)
{
Object.Destroy(_uiLoad);
}
}
}
}

View File

@@ -1,133 +0,0 @@
using UnityEngine;
using UnityEngine.UI;
using System;
using TEngine;
namespace GameMain
{
public enum MessageShowType
{
None = 0,
OneButton = 1,
TwoButton = 2,
ThreeButton = 3,
}
public class UILoadTip : UIBase
{
public Button _btn_update;
public Button _btn_ignore;
public Button _btn_package;
public Text _label_desc;
public Text _label_tittle;
public Action OnOk;
public Action OnCancle;
public MessageShowType Showtype = MessageShowType.None;
void Start()
{
EventTriggerListener.Get(_btn_update.gameObject).OnClick = _OnGameUpdate;
EventTriggerListener.Get(_btn_ignore.gameObject).OnClick = _OnGameIgnor;
EventTriggerListener.Get(_btn_package.gameObject).OnClick = _OnInvoke;
}
public override void OnEnter(object data)
{
_btn_ignore.gameObject.SetActive(false);
_btn_package.gameObject.SetActive(false);
_btn_update.gameObject.SetActive(false);
switch (Showtype)
{
case MessageShowType.OneButton:
_btn_update.gameObject.SetActive(true);
break;
case MessageShowType.TwoButton:
_btn_update.gameObject.SetActive(true);
_btn_ignore.gameObject.SetActive(true);
break;
case MessageShowType.ThreeButton:
_btn_ignore.gameObject.SetActive(true);
_btn_package.gameObject.SetActive(true);
_btn_package.gameObject.SetActive(true);
break;
}
_label_desc.text = data.ToString();
}
private void _OnGameUpdate(GameObject obj)
{
if (OnOk == null)
{
_label_desc.text = "<color=#BA3026>该按钮不应该存在</color>";
}
else
{
OnOk();
_OnClose();
}
}
private void _OnGameIgnor(GameObject obj)
{
if (OnCancle == null)
{
_label_desc.text = "<color=#BA3026>该按钮不应该存在</color>";
}
else
{
OnCancle();
_OnClose();
}
}
private void _OnInvoke(GameObject obj)
{
if (OnOk == null)
{
_label_desc.text = "<color=#BA3026>该按钮不应该存在</color>";
}
else
{
OnOk();
_OnClose();
}
}
private void _OnClose()
{
UILoadMgr.Hide(UIDefine.UILoadTip);
}
/// <summary>
/// 显示提示框,目前最多支持三个按钮
/// </summary>
/// <param name="desc">描述</param>
/// <param name="showtype">类型MessageShowType</param>
/// <param name="style">StyleEnum</param>
/// <param name="onOk">点击事件</param>
/// <param name="onCancel">取消事件</param>
/// <param name="onPackage">更新事件</param>
public static void ShowMessageBox(string desc, MessageShowType showtype = MessageShowType.OneButton,
LoadStyle.StyleEnum style = LoadStyle.StyleEnum.Style_Default,
Action onOk = null,
Action onCancel = null,
Action onPackage = null)
{
UILoadMgr.Show(UIDefine.UILoadTip, desc);
var ui = UILoadMgr.GetActiveUI(UIDefine.UILoadTip) as UILoadTip;
if (ui == null) return;
ui.OnOk = onOk;
ui.OnCancle = onCancel;
ui.Showtype = showtype;
ui.OnEnter(desc);
var loadStyleUI = ui.GetComponent<LoadStyle>();
if (loadStyleUI)
{
loadStyleUI.SetStyle(style);
}
}
}
}

View File

@@ -1,138 +0,0 @@
using UnityEngine;
using UnityEngine.UI;
using TEngine;
namespace GameMain
{
public class UILoadUpdate : UIBase
{
[SerializeField] public Button _btn_clear;
[SerializeField] public Scrollbar _obj_progress;
[SerializeField] public Text _label_desc;
[SerializeField] public Text _label_appid;
[SerializeField] public Text _label_resid;
public virtual void Start()
{
EventTriggerListener.Get(_btn_clear.gameObject).OnClick = OnClear;
_btn_clear.gameObject.SetActive(true);
}
public virtual void OnEnable()
{
LoadUpdateLogic.Instance.DownloadCompleteAction += DownLoad_Complete_Action;
LoadUpdateLogic.Instance.DownProgressAction += DownLoad_Progress_Action;
LoadUpdateLogic.Instance.UnpackedCompleteAction += Unpacked_Complete_Action;
LoadUpdateLogic.Instance.UnpackedProgressAction += Unpacked_Progress_Action;
RefreshVersion();
}
public override void OnEnter(object param)
{
base.OnEnter(param);
_label_desc.text = param.ToString();
RefreshVersion();
}
public virtual void Update()
{
}
private void RefreshVersion()
{
_label_appid.text = string.Format(LoadText.Instance.Label_App_id, Version.GameVersion);
_label_resid.text = string.Format(LoadText.Instance.Label_Res_id, GameModule.Resource.GetPackageVersion());
}
public virtual void OnContinue(GameObject obj)
{
// LoadMgr.Instance.StartDownLoad();
}
public virtual void OnStop(GameObject obj)
{
// LoadMgr.Instance.StopDownLoad();
}
/// <summary>
/// 清空本地缓存
/// </summary>
/// <param name="obj"></param>
public virtual void OnClear(GameObject obj)
{
OnStop(null);
UILoadTip.ShowMessageBox(LoadText.Instance.Label_Clear_Comfirm, MessageShowType.TwoButton,
LoadStyle.StyleEnum.Style_Clear,
() =>
{
GameModule.Resource.ClearSandbox();
Application.Quit();
}, () => { OnContinue(null); });
}
/// <summary>
/// 下载进度完成
/// </summary>
/// <param name="type"></param>
public virtual void DownLoad_Complete_Action(int type)
{
Log.Info("DownLoad_Complete");
}
/// <summary>
/// 下载进度更新
/// </summary>
/// <param name="progress"></param>
public virtual void DownLoad_Progress_Action(float progress)
{
_obj_progress.gameObject.SetActive(true);
_obj_progress.size = progress;
}
/// <summary>
/// 解压缩完成回调
/// </summary>
/// <param name="type"></param>
/// <param name="status"></param>
public virtual void Unpacked_Complete_Action(bool type, GameStatus status)
{
_obj_progress.gameObject.SetActive(true);
_label_desc.text = LoadText.Instance.Label_Load_UnpackComplete;
if (status == GameStatus.AssetLoad)
{
}
else
{
Log.Error("error type");
}
}
/// <summary>
/// 解压缩进度更新
/// </summary>
/// <param name="progress"></param>
/// <param name="status"></param>
public virtual void Unpacked_Progress_Action(float progress, GameStatus status)
{
_obj_progress.gameObject.SetActive(true);
if (status == GameStatus.First)
{
_label_desc.text = LoadText.Instance.Label_Load_FirstUnpack;
}
else
{
_label_desc.text = LoadText.Instance.Label_Load_Unpacking;
}
_obj_progress.size = progress;
}
public virtual void OnDisable()
{
OnStop(null);
LoadUpdateLogic.Instance.DownloadCompleteAction -= DownLoad_Complete_Action;
LoadUpdateLogic.Instance.DownProgressAction -= DownLoad_Progress_Action;
}
}
}

View File

@@ -1,86 +0,0 @@
using System;
using Cysharp.Threading.Tasks;
using TEngine;
using YooAsset;
using ProcedureOwner = TEngine.IFsm<TEngine.IProcedureManager>;
namespace GameMain
{
/// <summary>
/// 流程 => 初始化Package。
/// </summary>
public class ProcedureInitPackage : ProcedureBase
{
public override bool UseNativeDialog { get; }
protected override void OnEnter(ProcedureOwner procedureOwner)
{
base.OnEnter(procedureOwner);
//Fire Forget立刻触发UniTask初始化Package
InitPackage(procedureOwner).Forget();
}
private async UniTaskVoid InitPackage(ProcedureOwner procedureOwner)
{
var initializationOperation = GameModule.Resource.InitPackage();
await UniTask.Delay(TimeSpan.FromSeconds(1f));
await initializationOperation.ToUniTask();
if (initializationOperation.Status == EOperationStatus.Succeed)
{
EPlayMode playMode = GameModule.Resource.PlayMode;
// 编辑器模式。
if (playMode == EPlayMode.EditorSimulateMode)
{
Log.Info("Editor resource mode detected.");
ChangeState<ProcedurePreload>(procedureOwner);
}
// 单机模式。
else if (playMode == EPlayMode.OfflinePlayMode)
{
Log.Info("Package resource mode detected.");
ChangeState<ProcedureInitResources>(procedureOwner);
}
// 可更新模式。
else if (playMode == EPlayMode.HostPlayMode)
{
// 打开启动UI。
UILoadMgr.Show(UIDefine.UILoadUpdate);
Log.Info("Updatable resource mode detected.");
ChangeState<ProcedureUpdateVersion>(procedureOwner);
}
else
{
Log.Error("UnKnow resource mode detected Please check???");
}
}
else
{
// 打开启动UI。
UILoadMgr.Show(UIDefine.UILoadUpdate);
Log.Error($"{initializationOperation.Error}");
// 打开启动UI。
UILoadMgr.Show(UIDefine.UILoadUpdate, $"资源初始化失败!");
UILoadTip.ShowMessageBox($"资源初始化失败!点击确认重试 \n \n <color=#FF0000>原因{initializationOperation.Error}</color>", MessageShowType.TwoButton,
LoadStyle.StyleEnum.Style_Retry
, () => { Retry(procedureOwner); }, UnityEngine.Application.Quit);
}
}
private void Retry(ProcedureOwner procedureOwner)
{
// 打开启动UI。
UILoadMgr.Show(UIDefine.UILoadUpdate, $"重新初始化资源中...");
InitPackage(procedureOwner).Forget();
}
}
}

Some files were not shown because too many files have changed in this diff Show More