mirror of
https://github.com/motajs/template.git
synced 2026-11-03 15:34:31 +08:00
refactor: UI 系统及其在渲染端的初始化
This commit is contained in:
1 parent
c466949ce0
commit
acfb9c117d
7 files changed
+105
-20
No files matched your search
@@ -0,0 +1,26 @@
|
||||
import {
|
||||
IUIController,
|
||||
IUIInstance,
|
||||
UIComponent,
|
||||
UIPropsBaseCreator
|
||||
} from '@motajs/system';
|
||||
import { IClientBase, IGameUIPropsBase } from '@user/client-base';
|
||||
|
||||
/**
|
||||
* 创建游戏 UI 基础参数的构造函数
|
||||
* @param state 游戏状态对象
|
||||
*/
|
||||
export function createUIPropsBase(
|
||||
state: IClientBase
|
||||
): UIPropsBaseCreator<IGameUIPropsBase> {
|
||||
return (
|
||||
instance: IUIInstance<UIComponent, IGameUIPropsBase>,
|
||||
controller: IUIController<IGameUIPropsBase>
|
||||
): IGameUIPropsBase => {
|
||||
return {
|
||||
instance,
|
||||
controller,
|
||||
state
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user