地图尺寸改小,同步位置放大1000倍取整
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;
|
||||
|
||||
/** 当前生命值 */
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user