{"id":14960325,"url":"https://github.com/liangxiegame/qframework","last_synced_at":"2025-05-13T19:15:15.221Z","repository":{"id":38359492,"uuid":"51142932","full_name":"liangxiegame/QFramework","owner":"liangxiegame","description":"Godot/Unity3D System Design Architecture","archived":false,"fork":false,"pushed_at":"2025-05-11T12:06:37.000Z","size":529502,"stargazers_count":4788,"open_issues_count":21,"forks_count":799,"subscribers_count":159,"default_branch":"master","last_synced_at":"2025-05-11T13:21:47.567Z","etag":null,"topics":["frameworks","game-dev","godot","godot-addon","godot-engine","godot-plugin","godot4","godotengine","qframework","u3d","unity","unity-3d","unity-asset","unity-editor","unity-framework","unity-scripts","unity2d","unity3d","unity3d-framework","unity3d-plugin"],"latest_commit_sha":null,"homepage":"https://qframework.cn","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liangxiegame.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-02-05T11:30:53.000Z","updated_at":"2025-05-11T12:30:22.000Z","dependencies_parsed_at":"2023-02-09T14:16:24.467Z","dependency_job_id":"d6b590b4-61bc-431a-b06a-392fc656273f","html_url":"https://github.com/liangxiegame/QFramework","commit_stats":{"total_commits":237,"total_committers":6,"mean_commits":39.5,"dds":0.07172995780590719,"last_synced_commit":"44c9ea89cf45f8d84c6227ed8977cd9b125ffc7c"},"previous_names":[],"tags_count":202,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liangxiegame%2FQFramework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liangxiegame%2FQFramework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liangxiegame%2FQFramework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liangxiegame%2FQFramework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liangxiegame","download_url":"https://codeload.github.com/liangxiegame/QFramework/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254010822,"owners_count":21999002,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["frameworks","game-dev","godot","godot-addon","godot-engine","godot-plugin","godot4","godotengine","qframework","u3d","unity","unity-3d","unity-asset","unity-editor","unity-framework","unity-scripts","unity2d","unity3d","unity3d-framework","unity3d-plugin"],"created_at":"2024-09-24T13:22:03.103Z","updated_at":"2025-05-13T19:15:15.214Z","avatar_url":"https://github.com/liangxiegame.png","language":"C#","readme":"\n\n\n\n\n\n\n\n![LOGO](LOGO.png)\n\n\n\n[![](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/liangxiegame/QFramework/blob/master/LICENSE)\n\n# QFramework 简介 Intro\n\n[中文]()|[English](README_EN.md)\n\n[QFramework](https://github.com/liangxiegame/QFramework) 是提供一套简单、强大、易上手、符合 SOLID 原则、支持领域驱动设计（DDD）、事件驱动、数据驱动、分层、MVC 、CQRS、模块化、易扩展的架构，她的源码只有不到 1000 行，你可以完全把她放在你的笔记应用里保存。\n\n## 提供的架构图\n\n![](http://processon.com/chart_image/5c270aa6e4b007ba5d5029dc.png)\n\n## 举个例子（一图胜千言😂）\n\n![](https://file.liangxiegame.com/6bf42306-0b2a-4417-bbcf-354af0132596.png)\n\n## 各种情况的示意图\n\n![](http://processon.com/chart_image/5cbb1edce4b0bab90960a4f6.png)\n\n## 架构使用规范\n\n**QFramework系统设计架构分为四层及其规则：**\n\n* 表现层：ViewController层。IController接口，负责接收输入和状态变化时的表现，一般情况下，MonoBehaviour 均为表现层\n    * 可以获取System\n    * 可以获取Model\n    * 可以发送Command\n    * 可以监听Event\n* 系统层：System层。ISystem接口，帮助IController承担一部分逻辑，在多个表现层共享的逻辑，比如计时系统、商城系统、成就系统等\n    * 可以获取System\n    * 可以获取Model\n    * 可以监听Event\n    * 可以发送Event\n* 数据层：Model层。IModel接口，负责数据的定义、数据的增删查改方法的提供\n    * 可以获取Utility\n    * 可以发送Event\n* 工具层：Utility层。IUtility接口，负责提供基础设施，比如存储方法、序列化方法、网络连接方法、蓝牙方法、SDK、框架继承等。啥都干不了，可以集成第三方库，或者封装API\n* 除了四个层级，还有一个核心概念——Command\n    * 可以获取System\n    * 可以获取Model\n    * 可以发送Event\n    * 可以发送Command\n* 层级规则：\n    * IController 更改 ISystem、IModel 的状态必须用Command\n    * ISystem、IModel状态发生变更后通知IController必须用事件或BindableProperty\n    * IController可以获取ISystem、IModel对象来进行数据查询\n    * ICommand不能有状态\n    * 上层可以直接获取下层，下层不能获取上层对象\n    * 下层向上层通信用事件\n    * 上层向下层通信用方法调用（只是做查询，状态变更用Command），IController的交互逻辑为特别情况，只能用Command\n\n（照抄自：[学生课堂笔记1](https://github.com/Haogehaojiu/FrameworkDesign)）\n\n### 运行环境\n\n* Unity 2018.4.x ~ Unity 6.x\n\n## 安装\n\n* QFramework.cs \n    * 直接复制[此代码](QFramework.cs)到自己项目中的任意脚本中\n* QFramework.cs 与 官方示例\n    * [点此下载 unitypackage](./QFramework.cs.Examples.unitypackage)\n\n* QFramework.ToolKits\n    * [点此下载 unitypackage](./QFramework.Toolkits.unitypackage)\n* QFramework.ToolKitsPro\n    * 从 [AssetStore](http://u3d.as/SJ9) 安装\n\n\n\n## 资源\n\n| **版本** |                                      |                                                          |\n| ----------------------  | ---------------------------------------- | ------------------------------------------------------------ |\n| QFramework.cs | QFramework 本体架构的实现 | [文件](QFramework.cs) |\n| QFramework.cs  示例 | QFramework.cs 与官方示例： CounterApp、《点点点》、FlappyBird、CubeMaster、ShootingEditor2D、贪吃蛇等 | [点此下载 unitypackage](./QFramework.cs.Examples.unitypackage) |\n| QFramework.Toolkits | QFramework  集成 CoreKit/UIKit/ActionKit/ResKit/PackageKit/AudioKit 等全部官方工具（已包含 QFramework.cs 和 示例) | [点此下载 unitypackage](./QFramework.Toolkits.unitypackage) |\n| QFramework.Toolkits.Demo.WuZiQi | 使用 QFramework.Toolkits 开发的五子棋 Demo（需要安装好  QFramework.Toolkits） | [点此下载 unitypackage](./QFramework.Toolkits.Demo.WuZiQi.unitypackage) |\n| QFramework.Toolkits.Demo.Saolei | 使用 QFramework.Toolkits 开发的扫雷 Demo（需要安装好  QFramework.Toolkits） | [点此下载 unitypackage](./QFramework.Toolkits.Demo.SaoLei.unitypackage) |\n| QFramework.ToolKitsPro | 在 ToolKits 基础上集成更多好用的工具的版本（已包含 QFramework.Toolkits） | [AssetStore](http://u3d.as/SJ9) |\n| **群友案例** |  |  |\n| 赛车游戏《Crazy Car》 | 群友 [TastSong](https://github.com/TastSong) 使用 QF 进行重构的开源赛车游戏 | [游戏主页(Github](https://github.com/TastSong/CrazyCar)) |\n| **社区** |  |  |\n| QQ 群1（已满）：623597263 | 交流群 | [点击加群](https://qm.qq.com/cgi-bin/qm/qr?k=G4DZ_6qMbN8miP8RcRD9NdhNcVyrD88F\u0026jump_from=webapi\u0026authKey=P8WO3esK/KbDxWPHI5F3EC04IPT6jDSkk/tl73/EHIcRkMTvnLhwpTK1PtHr6V+p) |\n| QQ 群2：541745166 | 交流群 | [点击加群](https://qm.qq.com/q/VI5Od3rri4) |\n| QQ 频道 :qframework        | 交流群\u0026社区 | [点击加入频道](https://pd.qq.com/s/52bw86mlv) |\n| **教程** |  |  |\n| 《框架搭建 决定版》    | 教程 QFramework  的核心架构是怎么演化过来的？ | [课程主页](https://learn.u3d.cn/tutorial/framework_design)\\|[学生课堂笔记1](https://github.com/Haogehaojiu/FrameworkDesign)\\|[学生课堂笔记2](https://github.com/Haogehaojiu/ShootingEditor2D) |\n| **产品案例** | 如果用了 qf 并且想要在如下列表中登记，可以在 github/gitee 的 issue 里发帖子,也可以加 qq 群，也可以用邮箱联系凉鞋 liangxiegame@163.com，当然如果看到使用 qf 的项目，我也会先去尝试征得同意再放到如下列表。 |  |\n| ![](./README/scalebox.jpg) | 独立游戏《ScaleBox》 | [Steam](https://store.steampowered.com/app/3528380/ScaleBox/) |\n| ![](./README/myrose.jpg) | 独立游戏《我的玫瑰》 | [Steam](https://store.steampowered.com/app/3246640/_/) |\n| ![](./README/超自然.jpg) | 独立游戏《超自然侦探社》 | [TapTap](https://www.taptap.cn/app/222365) \\|[Steam](https://store.steampowered.com/app/1976540/_/) |\n| ![](./README/boxbread.jpeg) | 独立游戏《盒子面包坊》 | [TapTap](https://www.taptap.cn/app/384085) \\| [Steam](https://store.steampowered.com/app/2942950/_/) |\n| ![](./README/X-teroids.png) | 独立游戏《X-teriods》 | [Steam](https://store.steampowered.com/app/3342540/Xteroids/) |\n| ![](./README/thebirthofsprites.jpg) | 独立游戏《你好茄子：精灵的诞生》 | [Steam](https://store.steampowered.com/app/2375290/_/) |\n| ![](./README/huoche.jpg) | 独立游戏《当火车鸣笛三秒》 | [Steam](https://store.steampowered.com/app/1563700/_/)\\|[TapTap](https://www.taptap.cn/app/208258) |\n| ![](./README/qiezi1.jpg) | 独立游戏《你好茄子》 | [Steam](https://store.steampowered.com/app/2091640/Hi_Eggplant/) |\n| ![](./README/1stmountain.jpg) | 独立游戏《第一座山》 | [Steam](https://store.steampowered.com/app/2149980/The_First_Mountain/) |\n| ![](./README/tuimiepaopaomu.webp) | 独立游戏《推灭泡泡姆》 | [TapTap](https://www.taptap.com/app/233228) |\n| ![](./README/utgm.jpg) | 独立游戏《鬼山之下》 | [Steam](https://store.steampowered.com/app/1517160/_/) |\n| ![](./README/xieyingeng.png) | 手机游戏《谐音梗挑战》 | [TapTap](https://www.taptap.com/app/201075)        |\n| **其他相关教程** |  |  |\n| 《独立游戏体验计划》（猫叔） | 独立游戏制作体验教程，有用到 QFramework.cs | [b 站](https://space.bilibili.com/656352) |\n| 《原创独立游戏制作：平台射击 Roguelike》（凉鞋） | 原创独立游戏制作教程，有用到 QFramework.cs | [b 站](https://space.bilibili.com/60450548/channel/collectiondetail?sid=125221) |\n| 《原创独立游戏制作：类星露谷》（凉鞋） | 原创独立游戏制作教程，有用到 PlayMaker、QFramework.Tookits | [b 站](https://space.bilibili.com/60450548/channel/collectiondetail?sid=919279) |\n| 《QFramework 游戏开发：类幸存者》 | 面向 QFramework 的游戏开发教程，完成一款类吸血鬼幸存者游戏。 | [b 站](https://www.bilibili.com/video/BV1Uu4y1i7WH/) |\n| 《QFramework 教程年会员》 | QFramework 相关的课程案例 | [GamePix](https://www.gamepixedu.com/goods/show/55) |\n\n\n\n## Star 趋势（如果项目有帮到您欢迎点赞）\n\n[![Stargazers over time](https://starchart.cc/liangxiegame/QFramework.svg)](https://starchart.cc/liangxiegame/QFramework)\n\n\n\n### 作者\n\n* [凉鞋 liangxiegame](https://github.com/liangxiegame)\n\n### 贡献者\n\n* [京产肠饭]( https://gitee.com/JingChanChangFan/hk_-unity-tools)\n\n* [猫叔(一只皮皮虾)]( https://space.bilibili.com/656352/)\n\n* [TastSong]( https://github.com/TastSong)\n\n* [misakiMeiii](https://github.com/misakiMeiii)\n\n* [soso](https://github.com/so-sos-so)\n\n* [蓝色孤舟 gdtdftdqtd](https://github.com/gdtdftdqtd)\n\n* [h3166179](https://github.com/h3166179)\n\n* [葫芦 WangEdgar](https://github.com/WangEdgar)\n\n* New一天\n\n* 幽飞冷凝雪～冷\n\n\n### 优秀的 Unity 库、框架\n\n- [ET](https://github.com/egametang/ET)：ET Unity3D Client And C# Server Framework\n- [IFramework（OnClick）](https://github.com/OnClick9927/IFramework) Simple Unity Tools\n- [JEngine](https://github.com/JasonXuDeveloper/JEngine)  使Unity开发的游戏支持热更新的解决方案。\n- [TinaX Framework](https://tinax.corala.space/) “开箱即用”的Unity独立游戏开发工具\n\n### 代码规范完全遵循:\n\n[QCSharpStyleGuide](https://github.com/liangxiegame/QCSharpStyleGuide)\n\n\n### 赞助 Donate:\n\n* 如果觉得不错可以在 [这里 Asset Store](http://u3d.as/SJ9) 给个 5 星哦~ give 5 star\n* 或者给此仓库一个小小的 Star~ star this repository\n* 以上这些都会转化成我们的动力,提供更好的技术服务! \n\n\n\n### 鸣谢\n\n感谢 JetBrains 公司提供的使用许可证！\n\n\u003cp\u003e\u003ca href=\"https://www.jetbrains.com/?from=QFramework \"\u003e\n\u003cimg src=\"https://file.liangxiegame.com/2bf40802-c296-4bdc-bc8a-718000503771.png\" alt=\"JetBrains的Logo\" width=\"20%\" height=\"20%\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n本开源项目由 [QFramework 教程年会员](https://www.gamepixedu.com/goods/show/55) 提供资助\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliangxiegame%2Fqframework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliangxiegame%2Fqframework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliangxiegame%2Fqframework/lists"}