当前位置:网站首页>通用客户端架构
通用客户端架构
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不会弹出多个。
边栏推荐
- "NetEase Internship" Weekly Diary (2)
- 垃圾回收器CMS和G1
- swift project, sqlcipher3 -> 4, cannot open legacy database is there a way to fix it
- LeetCode Brushing Diary: 74. Searching 2D Matrix
- MySQL优化策略
- AWR分析报告问题求助:SQL如何可以从哪几个方面优化?
- 2022年NPDP考完多久出成绩?怎么查询?
- 力扣、752-打开转盘锁
- Talking about the "horizontal, vertical and vertical" development trend of domestic ERP
- Effects of Scraping and Aggregation
猜你喜欢

Check if IP or port is blocked

拼多多借力消博会推动国内农产品品牌升级 看齐国际精品农货

"NetEase Internship" Weekly Diary (3)

The principle and code implementation of intelligent follower robot in the actual combat of innovative projects

ofstream,ifstream,fstream read and write files

2022-07-30 mysql8 executes slow SQL-Q17 analysis

【LeetCode Daily Question】——704. Binary Search

Service discovery of kubernetes

How to adjust the cross cursor too small, CAD dream drawing calculation skills

永磁同步电机36问(二)——机械量与电物理量如何转化?
随机推荐
手写一个博客平台~第一天
Yunhe Enmo: Let the value of the commercial database era continue to prosper in the openGauss ecosystem
From 2023 onwards, these regions will be able to obtain a certificate with a score lower than 45 in the soft examination.
Entry name 'org/apache/commons/codec/language/bm/gen_approx_greeklatin.txt' collided
AI目标分割能力,无需绿幕即可实现快速视频抠图
MySQL optimization strategy
2022-08-01 反思
Redis 订阅与 Redis Stream
使用DBeaver进行mysql数据备份与恢复
LeetCode刷题日记:74. 搜索二维矩阵
"NetEase Internship" Weekly Diary (2)
Handwriting a blogging platform ~ the first day
How to adjust the cross cursor too small, CAD dream drawing calculation skills
LeetCode刷题日记: 33、搜索旋转排序数组
AWR分析报告问题求助:SQL如何可以从哪几个方面优化?
The underlying data structure of Redis
Safety (2)
A good book for newcomers to the workplace
Effects of Scraping and Aggregation
ALCCIKERS Shane 20191114