协议新增

This commit is contained in:
2025-09-08 17:54:08 +08:00
parent 7dad49bf5f
commit ebb1a467c4
5 changed files with 69 additions and 17 deletions

View File

@@ -114,11 +114,4 @@ message SkillInfo
int32 ConfigId = 1; //技能配置id
int32 Level = 2; //技能等级
int32 Exp = 3; //技能经验
}
///玩家当前使用钓组信息
message GearInfo
{
int64 Rod = 1;
repeated int64 Rigs = 2; //钓组配件
}

View File

@@ -19,14 +19,20 @@ message QuaternionInfo
float w = 4;
}
message UnitFishingInfo
///玩家当前使用钓组信息
message GearInfo
{
float LineLength = 1;//线长度
float ReelSpeed = 2;//收线速度
bool OpenLight = 3;//打开手电筒
int RodSetting = 4;
int64 Rod = 1;
repeated int64 Rigs = 2; //钓组配件
float LineLength = 3; //线长度
float ReelSpeed = 4; //收线速度
int32 State = 5; //杆子状态
Vector3Info Position = 6; //钓组当前位置
Vector3Info Rotation = 7; //钓组方向
}
message UnitStateInfo
{
int32 State = 1; //状态id
@@ -40,8 +46,8 @@ message MapUnitInfo
Vector3Info Position = 3; //当前位置
Vector3Info Rotation = 4; //角色方向
UnitStateInfo State = 5; //状态信息
GearInfo Gears = 6; //钓组数据
UnitFishingInfo FishingInfo = 7; //钓鱼状态信息
repeated KeyValueInt32 KV = 8; //属性信息
GearInfo Gears = 7; //钓组数据
UnitFishingInfo FishingInfo = 8; //钓鱼状态信息
repeated KeyValueInt32 KV = 9; //属性信息
}

View File

@@ -1,4 +1,5 @@
using Fantasy.Entitas;
using Fantasy;
using Fantasy.Entitas;
using Unity.Mathematics;
namespace NB.Map;
@@ -8,6 +9,11 @@ namespace NB.Map;
/// </summary>
public class MapUnit : Entity
{
/// <summary>
/// 角色基础信息
/// </summary>
public RoleSimpleInfo Info;
/// <summary>
/// 位置
/// </summary>
@@ -29,4 +35,9 @@ public class MapUnit : Entity
public long RoomId;
public long GateRouteId;
/// <summary>
/// 钓组信息
/// </summary>
public List<MapUnitGear> Gears = new List<MapUnitGear>();
}

View File

@@ -0,0 +1,42 @@
using Fantasy.Entitas;
using Unity.Mathematics;
namespace NB.Map;
public enum MapGearState
{
None = 0,
Take = 1,
Put = 2,
}
/// <summary>
/// 钓组信息
/// </summary>
public class MapUnitGear : Entity
{
/// <summary>
/// 杆子
/// </summary>
public long Rod;
/// <summary>
/// 杆子配件
/// </summary>
public List<long> Rings = new List<long>();
/// <summary>
/// 杆子状态
/// </summary>
public MapGearState State;
/// <summary>
/// 位置
/// </summary>
public float3 Position;
/// <summary>
/// 旋转
/// </summary>
public float3 Rotation;
}

View File

@@ -3,7 +3,7 @@
"profiles": {
"Main": {
"commandName": "Project",
// "workingDirectory": "$(OutputPath)",
"workingDirectory": "$(OutputPath)",
"environmentVariables": {},
"commandLineArgs": "--m Develop"
}