mirror of
				https://github.com/unanmed/HumanBreak.git
				synced 2025-10-31 04:02:59 +08:00 
			
		
		
		
	refactor: client 和 system 直接导出,不再使用中间量
This commit is contained in:
		
							parent
							
								
									d77918d29c
								
							
						
					
					
						commit
						052a8d224c
					
				| @ -2,12 +2,12 @@ | |||||||
| 
 | 
 | ||||||
| `@motajs/client` 包含多个模块: | `@motajs/client` 包含多个模块: | ||||||
| 
 | 
 | ||||||
| -   [ClientBase](../motajs-client-base/) | -   [`@motajs/client-base`](../motajs-client-base/) | ||||||
| 
 | 
 | ||||||
| 示例: | 示例: | ||||||
| 
 | 
 | ||||||
| ```ts | ```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) | -   [`@motajs/system-action`](../motajs-system-action/index.md) | ||||||
| -   [UI](../motajs-system-ui/index.md) | -   [`@motajs/system-ui`](../motajs-system-ui/index.md) | ||||||
| 
 | 
 | ||||||
| ## 引入示例 | ## 引入示例 | ||||||
| 
 | 
 | ||||||
| ```ts | ```ts | ||||||
| import { Action, UI } from '@motajs/system'; | import { gameKey, UIController } from '@motajs/system'; | ||||||
| 
 | 
 | ||||||
| Action.gameKey.register(...); | gameKey.register(...); | ||||||
| const myController = new UI.UIController('my-controller'); | const myController = new UIController('my-controller'); | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| 等效于: | 等效于: | ||||||
|  | |||||||
| @ -1 +1 @@ | |||||||
| export * as Base from '@motajs/client-base'; | export * from '@motajs/client-base'; | ||||||
|  | |||||||
| @ -1,2 +1,2 @@ | |||||||
| export * as Action from '@motajs/system-action'; | export * from '@motajs/system-action'; | ||||||
| export * as UI from '@motajs/system-ui'; | export * from '@motajs/system-ui'; | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user