当前位置:网站首页>通用客户端架构
通用客户端架构
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不会弹出多个。
边栏推荐
- swift project, sqlcipher3 -> 4, cannot open legacy database is there a way to fix it
- 记一次gorm事务及调试解决mysql死锁
- Project Background Technology Express
- 2022-07-30 mysql8 executes slow SQL-Q17 analysis
- 【ORB_SLAM2】void Frame::AssignFeaturesToGrid()
- Software testing Interface automation testing Pytest framework encapsulates requests library Encapsulates unified request and multiple base path processing Interface association encapsulation Test cas
- 2022河南青训联赛第(三)场
- 2022-08-01 Install mysql monitoring tool phhMyAdmin
- Handwritten Blog Platform ~ Day Two
- oracle query scan full table and walk index
猜你喜欢

MySQL8 download, start, configure, verify

AOF rewrite

记一次gorm事务及调试解决mysql死锁

Safety (2)

工程师如何对待开源

Nanoprobes多组氨酸 (His-) 标签标记:重组蛋白检测方案

Nanoprobes纳米探针丨Nanogold偶联物的特点和应用

Handwriting a blogging platform ~ Day 3

Analysis of the status quo of digital transformation of manufacturing enterprises

Remember a pit for gorm initialization
随机推荐
【 wheeled odometer 】
2022-07-30 mysql8执行慢SQL-Q17分析
Project Background Technology Express
C语言之插入字符简单练习
十字光标太小怎么调节、CAD梦想画图算量技巧
Yunhe Enmo: Let the value of the commercial database era continue to prosper in the openGauss ecosystem
力扣(LeetCode)213. 打家劫舍 II(2022.08.01)
messy website
Nanoprobes丨1-巯基-(三甘醇)甲醚功能化金纳米颗粒
【ORB_SLAM2】void Frame::AssignFeaturesToGrid()
Check if IP or port is blocked
密码学的基础:X.690和对应的BER CER DER编码
LeetCode brushing diary: 53, the largest sub-array and
Ask God to answer, how should this kind of sql be written?
Speed up your programs with bitwise operations
【LeetCode每日一题】——704.二分查找
Nanoprobes纳米探针丨Nanogold偶联物的特点和应用
NIO's Sword
The principle and code implementation of intelligent follower robot in the actual combat of innovative projects
数据链路层的数据传输