当前位置:网站首页>通用客户端架构
通用客户端架构
2022-08-02 02:17:00 【zfoo-framework】
1)common // 通用的一些组件
NetManager.ts // 网络管理,是一个常驻节点
GlobalMsgPreProcessManager.ts // 全局消息预处理,数据和UI分离
TipManager.ts // 弹框
SceneManager.ts // 负责界面的切换。切界面时,是阻塞的,这样子保证消息不会丢失。
2)start // 负责游戏的启动,闪屏等
StartMain.ts // 负责网络连接管理等组件的初始化
3)login // 登录页面
LoginMain.ts
LoginPanel.ts // 登录面板
4)hall
HallMain.ts
HallPanel.ts // 大厅面板
5)game
GameMain.ts
GamePanel.ts
-------------------
1)xxxMain.ts是作为场景入口,上面挂载了很多的资源Prefab等,这样子容易知道这个场景下有多少个页面。
其中使用单例的xxxMain.instance = this; 保存下来当前引用。 这样子所有的Panel都可以索引到。
2)每一个xxxPrefab就是一个页面,关联一个xxxPanel.ts的脚本,书写相关的逻辑。
3)由于单例模式,这样子很方便保证相同UI不会弹出多个。
边栏推荐
- 哈希冲突和一致性哈希
- LeetCode brushing diary: 33. Search and rotate sorted array
- 十字光标太小怎么调节、CAD梦想画图算量技巧
- AWR分析报告问题求助:SQL如何可以从哪几个方面优化?
- Outsourcing worked for three years, it was abolished...
- Analysis of volatile principle
- swift项目,sqlcipher3 -> 4,无法打开旧版数据库有办法解决吗
- LeetCode brush diary: LCP 03. Machine's adventure
- Redis 底层的数据结构
- 60 Feature Engineering Operations: Using Custom Aggregate Functions【Favorites】
猜你喜欢
Scheduled tasks for distributed applications in Golang
使用DBeaver进行mysql数据备份与恢复
Chopper webshell feature analysis
Install mysql using docker
The ultra-large-scale industrial practical semantic segmentation dataset PSSL and pre-training model are open source!
Hash collisions and consistent hashing
[LeetCode Daily Question] - 103. Zigzag Level Order Traversal of Binary Tree
使用docker安装mysql
数据链路层的数据传输
软件测试 接口自动化测试 pytest框架封装 requests库 封装统一请求和多个基础路径处理 接口关联封装 测试用例写在yaml文件中 数据热加载(动态参数) 断言
随机推荐
Outsourcing worked for three years, it was abolished...
2022河南青训联赛第(三)场
菜刀webshell特征分析
LeetCode刷题日记:LCP 03.机器人大冒险
Handwriting a blogging platform ~ the first day
垃圾回收器CMS和G1
From 2023 onwards, these regions will be able to obtain a certificate with a score lower than 45 in the soft examination.
Yunhe Enmo: Let the value of the commercial database era continue to prosper in the openGauss ecosystem
leetcode / anagram in string - some permutation of s1 string is a substring of s2
Constructor instance method inheritance of typescript37-class (extends)
oracle查询扫描全表和走索引
MySQL - CRUD operations
Redis 订阅与 Redis Stream
Effects of Scraping and Aggregation
LeetCode刷题日记:53、最大子数组和
Scheduled tasks for distributed applications in Golang
BioVendor人俱乐部细胞蛋白(CC16)Elisa试剂盒研究领域
【web】理解 Cookie 和 Session 机制
Coding Experience Talk
Check if IP or port is blocked