mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-10-31 23:20:18 +08:00
refactor: client 和 system 直接导出,不再使用中间量
This commit is contained in:
1 parent
d77918d29c
commit
052a8d224c
4 files changed
+11
-11
No files matched your search
@@ -2,12 +2,12 @@
|
||||
|
||||
`@motajs/client` 包含多个模块:
|
||||
|
||||
- [ClientBase](../motajs-client-base/)
|
||||
- [`@motajs/client-base`](../motajs-client-base/)
|
||||
|
||||
示例:
|
||||
|
||||
```ts
|
||||
import { ClientBase } from '@motajs/client';
|
||||
import { KeyCode } from '@motajs/client';
|
||||
|
||||
const { ClientBase } = Mota.require('@motajs/client');
|
||||
const { KeyCOde } = Mota.require('@motajs/client');
|
||||
```
|
||||
@@ -2,16 +2,16 @@
|
||||
|
||||
包含两个模块:
|
||||
|
||||
- [Action](../motajs-system-action/index.md)
|
||||
- [UI](../motajs-system-ui/index.md)
|
||||
- [`@motajs/system-action`](../motajs-system-action/index.md)
|
||||
- [`@motajs/system-ui`](../motajs-system-ui/index.md)
|
||||
|
||||
## 引入示例
|
||||
|
||||
```ts
|
||||
import { Action, UI } from '@motajs/system';
|
||||
import { gameKey, UIController } from '@motajs/system';
|
||||
|
||||
Action.gameKey.register(...);
|
||||
const myController = new UI.UIController('my-controller');
|
||||
gameKey.register(...);
|
||||
const myController = new UIController('my-controller');
|
||||
```
|
||||
|
||||
等效于:
|
||||
|
||||
Reference in new issue
Block a user