地图尺寸改小,同步位置放大1000倍取整

This commit is contained in:
janing
2025-12-18 13:43:16 +08:00
parent e677b1e11b
commit 637978357f
11 changed files with 77 additions and 23 deletions

View File

@@ -11,7 +11,7 @@ export interface MsgPlayerJoin {
/** 玩家昵称 */
playerName: string;
/** 玩家位置 */
/** 玩家位置客户端坐标放大1000倍后的整数 */
position: Position;
/** 是否新玩家 */

View File

@@ -11,7 +11,7 @@ export interface MsgPlayerMove {
/** 玩家昵称 */
playerName: string;
/** 移动后的位置 */
/** 移动后的位置客户端坐标放大1000倍后的整数 */
position: Position;
/** 移动时间戳 */

View File

@@ -2,9 +2,9 @@
* 移动请求消息
*/
export interface MsgReqMove {
/** X坐标 */
/** X坐标放大1000倍后取整服务器内部除以1000作为实际坐标 */
x: number;
/** Y坐标 */
/** Y坐标放大1000倍后取整服务器内部除以1000作为实际坐标 */
y: number;
}

View File

@@ -10,10 +10,10 @@ export interface PlayerInfo {
/** 玩家昵称 */
name: string;
/** 当前位置 */
/** 当前位置客户端坐标放大1000倍后的整数 */
position: Position;
/** 出生点 */
/** 出生点客户端坐标放大1000倍后的整数 */
spawnPoint: Position;
/** 当前生命值 */

View File

@@ -10,6 +10,6 @@ export interface MsgResMove {
/** 消息 */
message: string;
/** 新位置(成功时返回) */
/** 新位置(成功时返回客户端坐标放大1000倍后的整数 */
position?: Position;
}

View File

@@ -15,7 +15,7 @@ export interface BaseMessage {
}
/**
* 位置坐标
* 位置坐标客户端使用放大1000倍后的整数坐标
*/
export interface Position {
x: number;