feat(network): 基于 TSRPC 的网络同步模块 (#318)
- network-protocols: 共享协议包,使用 TSRPC CLI 生成完整类型验证 - network: 浏览器客户端,提供 NetworkPlugin、NetworkService 和同步系统 - network-server: Node.js 服务端,提供 GameServer 和房间管理
This commit is contained in:
34
packages/network-protocols/src/index.ts
Normal file
34
packages/network-protocols/src/index.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* @esengine/network-protocols
|
||||
*
|
||||
* 基于 TSRPC 的共享网络协议
|
||||
* TSRPC-based shared network protocols
|
||||
*/
|
||||
|
||||
// ============================================================================
|
||||
// Service Protocol | 服务协议
|
||||
// ============================================================================
|
||||
|
||||
export { serviceProto } from './shared/protocols/serviceProto';
|
||||
export type { ServiceType } from './shared/protocols/serviceProto';
|
||||
|
||||
// ============================================================================
|
||||
// Types | 类型定义
|
||||
// ============================================================================
|
||||
|
||||
export type { Vec2, IEntityState, IPlayerInput } from './shared/protocols/types';
|
||||
|
||||
// ============================================================================
|
||||
// API Protocols | API 协议
|
||||
// ============================================================================
|
||||
|
||||
export type { ReqJoin, ResJoin } from './shared/protocols/PtlJoin';
|
||||
|
||||
// ============================================================================
|
||||
// Message Protocols | 消息协议
|
||||
// ============================================================================
|
||||
|
||||
export type { MsgSync } from './shared/protocols/MsgSync';
|
||||
export type { MsgInput } from './shared/protocols/MsgInput';
|
||||
export type { MsgSpawn } from './shared/protocols/MsgSpawn';
|
||||
export type { MsgDespawn } from './shared/protocols/MsgDespawn';
|
||||
Reference in New Issue
Block a user