当前位置:网站首页>[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();
边栏推荐
- Master MySQL in an article
- MySQL - master-slave replication
- 【零基础玩转BLDC系列】基于反电动势过零检测法的无刷直流电机控制原理
- MySQL - Multi version concurrency control (mvcc)
- Sorting out the encapsulation classes of control elements in appium
- P4047 [JSOI2010]部落划分
- Solve page refresh without attaching data
- 白蛋白纳米-超声微泡载组织型纤溶酶原激活物基因靶向制备研究
- 数据流通交易场景下数据质量综合管理体系与技术框架研究
- 2022/7/25 exam summary
猜你喜欢

基于网络分析和文本挖掘的意见领袖影响力研究

Master MySQL in an article

BGP 综合实验

Verilog语法基础HDL Bits训练 05

MWEC:一种基于多语义词向量的中文新词发现方法

基于SEIR模型的网络医疗众筹传播建模与仿真分析

DC-6 -- vulnhub range

Distributed transactions: the final consistency scheme of reliable messages

In order to grasp the redis data structure, I drew 40 pictures (full version)

12. Neural network model
随机推荐
Hoops exchange helps hybrid computational fluid dynamics software build 3D format import and read function | customer case
分布式事务 :可靠消息最终一致性方案
Nodejs learning resources
Research on the integrated data quality management system and technical framework under the scenario of data circulation and transaction
Leetcode 笔记 350. 两个数组的交集 II
BGP 综合实验
[contents] mqtt, nodejs projects
Verilog语法基础HDL Bits训练 05
Prefix XOR sum, XOR difference array
letfaw
MySQL - master-slave replication
【零基础玩转BLDC系列】基于反电动势过零检测法的无刷直流电机控制原理
P4047 [JSOI2010]部落划分
基于网络分析和文本挖掘的意见领袖影响力研究
[GOM engine] script setting method for dummy configuration
Flask send verification code logic
白蛋白纳米粒表面修饰低分子量鱼精蛋白LMWP/PEG-1900修饰牛血清白蛋白制备研究
MySQL - Multi version concurrency control (mvcc)
Redis命令参考手册 - Key
使用CMake编译OpenFoam求解器