当前位置:网站首页>[oops framework] interface management
[oops framework] interface management
2022-07-26 00:38:00 【dgflash_ game】
Functional specifications
OopsFramework- Interface management module , It mainly realizes the management of different types of windows in the game , For example, the resident main interface window 、 Pop-up window 、 modal window , System prompt window .
Instructions
Window configuration fields
| Field | Introduce |
|---|---|
| layer | Window level |
| prefab | Prefabricated resource relative path |
| bundle | Remote package name |
Window configuration data
/** Unique identification of the interface */
export enum UIID {
/** Resource loading interface */
Loading = 1,
/** Pop up interface */
Window,
/** Loading and delay prompt interface */
Netinstable
}
/** Open the configuration data of the interface */
export var UIConfigData: { [key: number]: UIConfig } = {
[UIID.Loading]: { layer: LayerType.UI, prefab: "loading/prefab/loading", bundle: "resources" },
[UIID.Netinstable]: { layer: LayerType.PopUp, prefab: "common/prefab/netinstable" },
[UIID.Window]: { layer: LayerType.Dialog, prefab: "common/prefab/window" }
}
Open a window
var uic: UICallbacks = {
// Add window to interface completion event
onAdded: (node: Node, params: any) => {
var comp = node.getComponent(LoadingViewComp) as ecs.Comp;
}
// Window node destroy And then back
onRemoved:(node: Node | null, params: any) => {
}
};
oops.gui.open(UIID.Loading, null, uic);
The asynchronous function opens a window
var node = await oops.gui.openAsync(UIID.Loading);
Close a window
oops.gui.remove(UIID.Loading);
Specify a node to delete the window
oops.gui.removeByNode(cc.Node);
notes : there Node It has to be through oops.gui.open or openAsync Only when it is opened will it be closed
Whether there is a window with the specified ID in the cache
oops.gui.has(UIID.Loading);
Fade past hint
oops.gui.toast(" Prompt content ");
Clear all windows
oops.gui.clear();
边栏推荐
- 前缀异或和,异或差分数组
- Super super super realistic digital people! Keep you on the air 24 hours a day
- In order to grasp the redis data structure, I drew 40 pictures (full version)
- Mwec: a new Chinese word discovery method based on multi semantic word vector
- Master MySQL in an article
- 8 tips - database performance optimization, yyds~
- 融合聚类信息的技术主题图可视化方法研究
- Nodejs surface longitude
- 快速入门顺序表链表
- ShardingSphere数据分片
猜你喜欢

开发还没联调,任务就要上线

SQL (basic 2)

Hoops exchange helps hybrid computational fluid dynamics software build 3D format import and read function | customer case

Pikachu靶机通关和源码分析

Are you still counting the time complexity?

Nest. JS uses express but not completely

为了拿捏 Redis 数据结构,我画了 40 张图(完整版)

Nodejs learning

【IJCAI 2022】参数高效的大模型稀疏训练方法,大幅减少稀疏训练所需资源

Hcip day 12
随机推荐
生物JC UVSSA复合物缓解MYC驱动的转录压⼒ English
前缀异或和,异或差分数组
Private cloud disk setup
Super super super realistic digital people! Keep you on the air 24 hours a day
Leetcode 笔记 20. 有效的括号
快速入门顺序表链表
Modeling and simulation analysis of online medical crowdfunding communication based on SEIR model
分布式事务 :可靠消息最终一致性方案
Use of redis
Redis夺命十二问,你能扛到第几问?
Sorting out the encapsulation classes of control elements in appium
[GOM engine] script setting method for dummy configuration
Find the single dog (Li Kou 260)
本地电脑架设传奇怎么开外网叫朋友一起玩?
Nest. JS uses express but not completely
SQL server failed to send mail, prompting that the recipient must be specified
使用LocalDate类完成日历设计
HNOI2012矿场搭建
HOOPS Exchange助力混合计算流体动力学软件搭建3D格式导入读取功能 | 客户案例
JMeter/IDEA中引用jar包json-path.jar的坎坷之路