重构NetManager支持MessagePair,新增TSRPCWsClient。
This commit is contained in:
50
client/assets/scripts/Shared/protocols/MsgResLogin.ts
Normal file
50
client/assets/scripts/Shared/protocols/MsgResLogin.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
import { Position } from './base';
|
||||
|
||||
/**
|
||||
* 玩家角色信息
|
||||
*/
|
||||
export interface PlayerInfo {
|
||||
/** 玩家ID */
|
||||
id: string;
|
||||
|
||||
/** 玩家昵称 */
|
||||
name: string;
|
||||
|
||||
/** 当前位置 */
|
||||
position: Position;
|
||||
|
||||
/** 出生点 */
|
||||
spawnPoint: Position;
|
||||
|
||||
/** 当前生命值 */
|
||||
hp: number;
|
||||
|
||||
/** 最大生命值 */
|
||||
maxHp: number;
|
||||
|
||||
/** 是否存活 */
|
||||
isAlive: boolean;
|
||||
|
||||
/** 创建时间 */
|
||||
createdAt: number;
|
||||
|
||||
/** 最后登录时间 */
|
||||
lastLoginAt: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 登录响应消息
|
||||
*/
|
||||
export interface MsgResLogin {
|
||||
/** 是否成功 */
|
||||
success: boolean;
|
||||
|
||||
/** 消息 */
|
||||
message: string;
|
||||
|
||||
/** 玩家信息 */
|
||||
player?: PlayerInfo;
|
||||
|
||||
/** 是否新玩家 */
|
||||
isNewPlayer?: boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user