接入ResLogin.otherPlayers
This commit is contained in:
@@ -11,7 +11,7 @@ export interface MsgPlayerJoin {
|
||||
/** 玩家昵称 */
|
||||
playerName: string;
|
||||
|
||||
/** 玩家位置 */
|
||||
/** 玩家位置(客户端坐标,放大1000倍后的整数) */
|
||||
position: Position;
|
||||
|
||||
/** 是否新玩家 */
|
||||
|
||||
@@ -11,7 +11,7 @@ export interface MsgPlayerMove {
|
||||
/** 玩家昵称 */
|
||||
playerName: string;
|
||||
|
||||
/** 移动后的位置 */
|
||||
/** 移动后的位置(客户端坐标,放大1000倍后的整数) */
|
||||
position: Position;
|
||||
|
||||
/** 移动时间戳 */
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
* 移动请求消息
|
||||
*/
|
||||
export interface MsgReqMove {
|
||||
/** X坐标 */
|
||||
/** X坐标(放大1000倍后取整,服务器内部除以1000作为实际坐标) */
|
||||
x: number;
|
||||
|
||||
/** Y坐标 */
|
||||
/** Y坐标(放大1000倍后取整,服务器内部除以1000作为实际坐标) */
|
||||
y: number;
|
||||
}
|
||||
@@ -10,10 +10,10 @@ export interface PlayerInfo {
|
||||
/** 玩家昵称 */
|
||||
name: string;
|
||||
|
||||
/** 当前位置 */
|
||||
/** 当前位置(客户端坐标,放大1000倍后的整数) */
|
||||
position: Position;
|
||||
|
||||
/** 出生点 */
|
||||
/** 出生点(客户端坐标,放大1000倍后的整数) */
|
||||
spawnPoint: Position;
|
||||
|
||||
/** 当前生命值 */
|
||||
@@ -47,4 +47,7 @@ export interface MsgResLogin {
|
||||
|
||||
/** 是否新玩家 */
|
||||
isNewPlayer?: boolean;
|
||||
|
||||
/** 房间内其他在线玩家信息 */
|
||||
otherPlayers?: PlayerInfo[];
|
||||
}
|
||||
@@ -10,6 +10,6 @@ export interface MsgResMove {
|
||||
/** 消息 */
|
||||
message: string;
|
||||
|
||||
/** 新位置(成功时返回) */
|
||||
/** 新位置(成功时返回,客户端坐标,放大1000倍后的整数) */
|
||||
position?: Position;
|
||||
}
|
||||
@@ -15,7 +15,7 @@ export interface BaseMessage {
|
||||
}
|
||||
|
||||
/**
|
||||
* 位置坐标
|
||||
* 位置坐标(客户端使用放大1000倍后的整数坐标)
|
||||
*/
|
||||
export interface Position {
|
||||
x: number;
|
||||
|
||||
@@ -27,7 +27,7 @@ export interface ServiceType {
|
||||
}
|
||||
|
||||
export const serviceProto: ServiceProto<ServiceType> = {
|
||||
"version": 5,
|
||||
"version": 6,
|
||||
"services": [
|
||||
{
|
||||
"id": 0,
|
||||
@@ -273,6 +273,18 @@ export const serviceProto: ServiceProto<ServiceType> = {
|
||||
"type": "Boolean"
|
||||
},
|
||||
"optional": true
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "otherPlayers",
|
||||
"type": {
|
||||
"type": "Array",
|
||||
"elementType": {
|
||||
"type": "Reference",
|
||||
"target": "MsgResLogin/PlayerInfo"
|
||||
}
|
||||
},
|
||||
"optional": true
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user