Skip to content

Commit

Permalink
1.1.101 1.优化配置表模块判空,2.优化Timer模块实现,3.完善文档
Browse files Browse the repository at this point in the history
  • Loading branch information
TippingGame committed Jan 25, 2025
1 parent 64c3dd0 commit fbbb51f
Show file tree
Hide file tree
Showing 9 changed files with 89 additions and 86 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [1.1.101] - 2025-01-25
1.优化配置表模块判空
2.优化Timer模块实现
3.完善文档

## [1.1.100] - 2025-01-25
1.删除高速本地缓存模块
2.删除MessagePack-CSharp第三方库
Expand Down
2 changes: 1 addition & 1 deletion Plugins/LitJson/JsonMapper.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ private static void AddObjectMetadata (Type type)
if (parameters[0].ParameterType == typeof(string) || parameters[0].ParameterType == typeof(int) ||
parameters[0].ParameterType == typeof(byte) || parameters[0].ParameterType == typeof(short) ||
parameters[0].ParameterType == typeof(long) || parameters[0].ParameterType == typeof(float) ||
parameters[0].ParameterType == typeof(double))
parameters[0].ParameterType == typeof(double) || parameters[0].ParameterType == typeof(decimal))
data.ElementType = p_info.PropertyType;

continue;
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@ Unity 2021.3.15f1+
* [1. 热更新版本管理(内置)](https://github.com/TippingGame/F8Framework/blob/main/Tests/HotUpdateManager/README.md) - 选择打包平台,输出路径,版本号,远程资产加载地址,启用热更新,全量打包,分包,空包。
* [2. 代码热更新(接入HybridCLR)](https://github.com/TippingGame/F8Framework/blob/main/Tests/HybridCLR/README.md) - [HybridCLR](https://github.com/focus-creative-games/hybridclr) 是一个特性完整、零成本、高性能、低内存的近乎完美的Unity全平台原生c#热更方案。
### ----------核心功能----------
* [1. 配置表(内置)](https://github.com/TippingGame/F8Framework/blob/main/Tests/ExcelTool/README.md) - 使用Excel作为配置表,兼顾**高性能、高适应性**,点击F8加载手动生成的 Excel 二进制缓存,运行时自动读取最新 Excel,无需频繁导表。
* [1. 配置表(内置)](https://github.com/TippingGame/F8Framework/blob/main/Tests/ExcelTool/README.md) - 使用Excel作为配置表,兼顾**高性能、高适应性**。字段类型分为:**基础类型、容器类型**,可**自由组合**类型。点击F8生成的 Excel 二进制文件和C#类,点击F7实时读取 Excel 并替换数据,无需频繁导表,可多端运行时读写Excel
* [2. 资源加载(内置)](https://github.com/TippingGame/F8Framework/blob/main/Tests/AssetManager/README.md) - **编辑器下**:点击F8自动生成资产索引/AB名称,自动区分不同平台,清理多余AB和文件夹,Editor模式下减少开发周期。**运行时**:同步/异步加载单个资产,展开文件夹或同一AB下所有资产,自动判断是 Resources / AssetBundle 资产,加载Remote远程资产,获取加载进度,同步打断异步加载。你可以这样加载AssetBundle:**单个资产单个AB、指定文件夹名称(文件夹第一层的AB)、设置多个资产为同一AB名(指定任意资产名)**
* [3. 模块中心(内置)](https://github.com/TippingGame/F8Framework/blob/main/Tests/Module/README.md) - 模块中心可以获取所有模块的实例,延迟加载策略,自由控制生命周期。
* [4. 日志管理(内置)](https://github.com/TippingGame/F8Framework/blob/main/Tests/Log/README.md) - 打印日志,写入文件,上报错误。
* [5. 声音管理(内置)](https://github.com/TippingGame/F8Framework/blob/main/Tests/Audio/README.md) - 声音的播放/暂停/停止/进度控制,音量控制/保存,全局暂停/恢复。Audio分为三大类:**背景音乐、人声、特效声**
* [6. 事件管理(内置)](https://github.com/TippingGame/F8Framework/blob/main/Tests/Event/README.md) - 发送消息事件,事件监听,防止**消息死循环**,自动释放事件。
* [7. 时间管理(内置)](https://github.com/TippingGame/F8Framework/blob/main/Tests/Timer/README.md) - 提供Timer、FrameTimer两种计时器,暂停/恢复,自动释放Timer。
* [8. 补间动画(内置)](https://github.com/TippingGame/F8Framework/blob/main/Tests/Tween/README.md) - 播放/终止动画,有旋转/位移/缩放/渐变/填充动画,可根据UI的**相对布局**位移动画。
* [8. 补间动画(内置)](https://github.com/TippingGame/F8Framework/blob/main/Tests/Tween/README.md) - 播放/终止动画,**自由组合**动画,有旋转/位移/缩放/渐变/填充/震动动画,可根据UI的**相对布局**位移动画。
* [9. 引用池管理(内置)](https://github.com/TippingGame/F8Framework/blob/main/Tests/ReferencePool/README.md) - 引用池管理,C# 对象,入池/取出/回收/清空。
* [10. 游戏对象池(内置)](https://github.com/TippingGame/F8Framework/blob/main/Tests/GameObjectPool/README.md) - 游戏对象池管理,GameObject 预加载池化,生成/销毁/延迟销毁,生命周期事件监听。
* [11. 本地化管理(内置)](https://github.com/TippingGame/F8Framework/blob/main/Tests/Localization/README.md) - 本地化 Text / TextMeshPro / Image / RawImage / SpriteRenderer / Renderer / Audio / Timeline 等组件,使用 **Excel** 作为多语言翻译表。
* [12. 有限状态机(内置)](https://github.com/TippingGame/F8Framework/blob/main/Tests/FSM/README.md) - 自定义有限状态机 FSMState / FSMSwitch,创建/切换状态/轮询/销毁。
* [13. 下载管理器(内置)](https://github.com/TippingGame/F8Framework/blob/main/Tests/Download/README.md) - 支持localhost与http地址文件的下载,可**本地写入、监听下载进度、断点续传**,支持动态添加、移除、暂停、恢复下载。
* [14. UI界面管理(内置)](https://github.com/TippingGame/F8Framework/blob/main/Tests/UI/README.md) - 处理界面加载、打开、关闭、查询、层级控制、自定义动画、自动获取组件索引。UI界面分为三大类:**普通UI、模态弹窗、非模态弹窗**
* [14. UI界面管理(内置)](https://github.com/TippingGame/F8Framework/blob/main/Tests/UI/README.md) - 处理界面加载、打开、关闭、查询、层级控制、自定义动画、自动获取组件索引。UI界面分为三大类:**普通UI、模态弹窗、非模态弹窗**,内置各种常用组件
* [15. 输入系统管理(内置)](https://github.com/TippingGame/F8Framework/blob/main/Tests/Input/README.md) - 使用同一套代码,通过自定义输入设备,适配多平台,可热切换输入设备,或同时启用多套输入设备。
* [16. 游戏流程管理(内置)](https://github.com/TippingGame/F8Framework/blob/main/Tests/Procedure/README.md) - 自定义流程节点 ProcedureNode,控制游戏流程的,添加/运行/轮询/移除。
* [17. 本地数据存储(内置)](https://github.com/TippingGame/F8Framework/blob/main/Tests/Storage/README.md) - 本地数据存储/读取。
Expand Down Expand Up @@ -113,20 +113,20 @@ Support for building:Win / Android / iOS / Mac / Linux / WebGL / WeChat mini g
* [1. Hot update version manager (built-in)](https://github.com/TippingGame/F8Framework/blob/main/Tests/HotUpdateManager/README_EN.md) - Select packaging platform, output path, version number, remote asset loading address, enable hot update, full packaging, subcontracting, and empty packaging.
* [2. Code Hot Update (Import HybridCLR)](https://github.com/TippingGame/F8Framework/blob/main/Tests/HybridCLR/README_EN.md) - [HybridCLR](https://github.com/focus-creative-games/hybridclr) HybridCLR is a full-platform native c# hot update solution for Unity with complete features, zero cost, high performance, and low memory.
### ----------Core Features----------
* [1. Config table (built-in)](https://github.com/TippingGame/F8Framework/blob/main/Tests/ExcelTool/README_EN.md) - Using Excel as the configuration table, **balancing high performance and adaptability**, click F8 to load the manually generated Excel binary cache, and automatically read the latest Excel at runtime without the need for frequent table navigation.
* [1. Config table (built-in)](https://github.com/TippingGame/F8Framework/blob/main/Tests/ExcelTool/README_EN.md) - Use Excel as the configuration table, taking into account both **high performance and high adaptability**. The field types are divided into: **basic types and container types**, and these types can be **freely combined**. Click F8 to generate Excel binary files and C# classes. Click F7 to read Excel data in real time and replace the data. There is no need to frequently import the tables, and it enables reading and writing of Excel files during runtime on multiple platforms.
* [2. Asset Manager (built-in)](https://github.com/TippingGame/F8Framework/blob/main/Tests/AssetManager/README_EN.md) - **At editor**: Click F8 to automatically generate asset index/AB name, automatically distinguish different platforms, and clean up excess AB and folders, Reduce development cycle in Editor mode. **At runtime**: load a single asset synchronously/asynchronously, expand a folder or all assets under the same AB, automatically determine whether it is a Resources/AssetBundle asset, load remote assets, obtain loading progress, and synchronously interrupt asynchronous loading. You can load AssetBundle in this way: **a single asset with a single AB, specify a folder name (AB on the first layer of the folder), set multiple assets to the same AB name (specify any asset name)**.
* [3. Module Center (built-in)](https://github.com/TippingGame/F8Framework/blob/main/Tests/Module/README_EN.md) - The module center can obtain instances of all modules, implement delayed loading strategies, and freely control the lifecycle.
* [4. Log Manager (built-in)](https://github.com/TippingGame/F8Framework/blob/main/Tests/Log/README_EN.md) - Print logs, write files, and report errors.
* [5. Sound Manager (built-in)](https://github.com/TippingGame/F8Framework/blob/main/Tests/Audio/README_EN.md) - Play/pause/stop/progress control of sound, volume control/save, global pause/resume. Audio is divided into three categories: **background music, vocals, and special effects sound**.
* [6. Event Manager (built-in)](https://github.com/TippingGame/F8Framework/blob/main/Tests/Event/README_EN.md) - Send message events, monitor events, **prevent message loops**, and automatically release events.
* [7. Time Manager (built-in)](https://github.com/TippingGame/F8Framework/blob/main/Tests/Timer/README_EN.md) - Provide Timer/FrameTimer has two types of timers, pause/resume, and automatically release the timer.
* [8. Tween Animation (built-in)](https://github.com/TippingGame/F8Framework/blob/main/Tests/Tween/README_EN.md) - Play/Stop animations, including rotation/displacement/scaling/gradient/fill animations, which can be shifted based on the **relative layout** of the UI.
* [8. Tween Animation (built-in)](https://github.com/TippingGame/F8Framework/blob/main/Tests/Tween/README_EN.md) - Play/stop animations. Animations can be **freely combined**. There are rotation/displacement/scale/fade/fill/shake animations. Animations can be moved according to the **relative layout** of the UI.
* [9. Reference Pool Manager (built-in)](https://github.com/TippingGame/F8Framework/blob/main/Tests/ReferencePool/README_EN.md) - Reference Pool Manager, C # object, pooling/retrieving/recycling/emptying.
* [10. GameObject Pool (built-in)](https://github.com/TippingGame/F8Framework/blob/main/Tests/GameObjectPool/README_EN.md) - GameObject Pool Manager, GameObject preload pooling, generation/destruction/delayed destruction, lifecycle event monitoring.
* [11. Localization Manager (built-in)](https://github.com/TippingGame/F8Framework/blob/main/Tests/Localization/README_EN.md) - Localize components such as Text/TextMeshPro/Image/RawImage/SpriteRenderer/Renderer/Audio/Timeline, and use **Excel** as a multilingual translation table.
* [12. Finite state machine (built-in)](https://github.com/TippingGame/F8Framework/blob/main/Tests/FSM/README_EN.md) - Customize finite state machine FSMState/FSMSwitch, create/switch states/poll/destroy.
* [13. Download Manager (built-in)](https://github.com/TippingGame/F8Framework/blob/main/Tests/Download/README_EN.md) - Supports downloading of files from both local host and HTTP addresses, **allowing for local writing, monitoring of download progress, and recovery of downloads**. It also supports dynamic addition, removal, pause, and recovery of downloads.
* [14. UI interface manager (built-in)](https://github.com/TippingGame/F8Framework/blob/main/Tests/UI/README_EN.md) - Handle interface loading, opening, closing, querying, hierarchical control, custom animation, and automatic retrieval of component indexes. UI interfaces are divided into three categories: **regular UI, modal pop ups, and non modal pop ups**.
* [14. UI interface manager (built-in)](https://github.com/TippingGame/F8Framework/blob/main/Tests/UI/README_EN.md) - Handle interface loading, opening, closing, querying, hierarchical control, custom animation, and automatic retrieval of component indexes. UI interfaces are divided into three categories: **regular UI, modal pop ups, and non modal pop ups**, it has various commonly used components built-in..
* [15. Input System Manager (built-in)](https://github.com/TippingGame/F8Framework/blob/main/Tests/Input/README_EN.md) - Using the same set of code, customize input devices, adapt to multiple platforms, hot switch input devices, or enable multiple sets of input devices simultaneously.
* [16. Game Procedure Manager (built-in)](https://github.com/TippingGame/F8Framework/blob/main/Tests/Procedure/README_EN.md) - Customize the process node ProcedureNode to control the game process, add/run/poll/remove.
* [17. Local data storage (built-in)](https://github.com/TippingGame/F8Framework/blob/main/Tests/Storage/README_EN.md) - Local data storage/reading.
Expand Down
19 changes: 13 additions & 6 deletions Runtime/ExcelTool/ReadExcel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ private static void Serialize(object container, Type temp, List<ConfigData[]> da

private static void DebugError(string type, string data, string classname)
{
LogF8.LogError(string.Format("数据类型错误类型:{0} 数据:{1} 类名:{2}", type, data, classname));
LogF8.LogError(string.Format("数据类型错误类型:{0} 数据:{1} 类名:{2}", type, data, classname));
}

public static object ParseValue(string type, string data, string classname)
Expand Down Expand Up @@ -343,8 +343,8 @@ public static object ParseValue(string type, string data, string classname)
var dictionary = (IDictionary)Activator.CreateInstance(typeof(Dictionary<,>).MakeGenericType(keyElementType, valueElementType));
for (int i = 0; i < elementsLength; i += 2)
{
object key = ParseValue(keyType, elements[i], classname);
object value = ParseValue(valueType, elements[i + 1], classname);
object key = ParseValue(keyType, elementsLength >= i + 1 ? elements[i] : null, classname);
object value = ParseValue(valueType, elementsLength >= i + 2 ? elements[i + 1] : null, classname);
if (dictionary.Contains(key))
{
LogF8.LogError("Dictionary 重复Key值:{0} Value值:{1} 类型:{2} 数据:{3} 类名:{4}",key, value, type, data, classname);
Expand Down Expand Up @@ -374,6 +374,7 @@ public static object ParseValue(string type, string data, string classname)
{
DebugError(type, data, classname);
o = 0;
break;
}

o = BYTE_byte;
Expand All @@ -384,6 +385,7 @@ public static object ParseValue(string type, string data, string classname)
{
DebugError(type, data, classname);
o = 0;
break;
}

o = SHORT_short;
Expand All @@ -394,6 +396,7 @@ public static object ParseValue(string type, string data, string classname)
{
DebugError(type, data, classname);
o = 0;
break;
}

o = INT_int;
Expand All @@ -404,6 +407,7 @@ public static object ParseValue(string type, string data, string classname)
{
DebugError(type, data, classname);
o = 0;
break;
}

o = LONG_long;
Expand All @@ -413,7 +417,8 @@ public static object ParseValue(string type, string data, string classname)
if (float.TryParse(data, out FLOAT_float) == false)
{
DebugError(type, data, classname);
o = 0;
o = 0f;
break;
}

o = FLOAT_float;
Expand All @@ -423,7 +428,8 @@ public static object ParseValue(string type, string data, string classname)
if (double.TryParse(data, out DOUBLE_double) == false)
{
DebugError(type, data, classname);
o = 0;
o = 0d;
break;
}

o = DOUBLE_double;
Expand All @@ -433,7 +439,8 @@ public static object ParseValue(string type, string data, string classname)
if (decimal.TryParse(data, out DECIMAL_decimal) == false)
{
DebugError(type, data, classname);
o = 0;
o = 0m;
break;
}

o = DECIMAL_decimal;
Expand Down
Loading

0 comments on commit fbbb51f

Please sign in to comment.