新增位移,数值相关组件
This commit is contained in:
@@ -10,18 +10,18 @@ using NBC.Serialize;
|
||||
namespace NBC
|
||||
{
|
||||
[ProtoContract]
|
||||
public partial class RoleGearItemInfo : AMessage, IProto
|
||||
public partial class UnitGearItemInfo : AMessage, IProto
|
||||
{
|
||||
public static RoleGearItemInfo Create(Scene scene)
|
||||
public static UnitGearItemInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<RoleGearItemInfo>();
|
||||
return scene.MessagePoolComponent.Rent<UnitGearItemInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Id = default;
|
||||
ConfigId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<RoleGearItemInfo>(this);
|
||||
GetScene().MessagePoolComponent.Return<UnitGearItemInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
@@ -30,11 +30,11 @@ namespace NBC
|
||||
public int ConfigId { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class RoleGearInfo : AMessage, IProto
|
||||
public partial class UnitGearInfo : AMessage, IProto
|
||||
{
|
||||
public static RoleGearInfo Create(Scene scene)
|
||||
public static UnitGearInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<RoleGearInfo>();
|
||||
return scene.MessagePoolComponent.Rent<UnitGearInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
@@ -49,29 +49,29 @@ namespace NBC
|
||||
Leader = default;
|
||||
Feeder = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<RoleGearInfo>(this);
|
||||
GetScene().MessagePoolComponent.Return<UnitGearInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public RoleGearItemInfo Rod { get; set; }
|
||||
public UnitGearItemInfo Rod { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public RoleGearItemInfo Reel { get; set; }
|
||||
public UnitGearItemInfo Reel { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public RoleGearItemInfo Bobber { get; set; }
|
||||
public UnitGearItemInfo Bobber { get; set; }
|
||||
[ProtoMember(4)]
|
||||
public RoleGearItemInfo Hook { get; set; }
|
||||
public UnitGearItemInfo Hook { get; set; }
|
||||
[ProtoMember(5)]
|
||||
public RoleGearItemInfo Bait { get; set; }
|
||||
public UnitGearItemInfo Bait { get; set; }
|
||||
[ProtoMember(6)]
|
||||
public RoleGearItemInfo Lure { get; set; }
|
||||
public UnitGearItemInfo Lure { get; set; }
|
||||
[ProtoMember(7)]
|
||||
public RoleGearItemInfo Weight { get; set; }
|
||||
public UnitGearItemInfo Weight { get; set; }
|
||||
[ProtoMember(8)]
|
||||
public RoleGearItemInfo Line { get; set; }
|
||||
public UnitGearItemInfo Line { get; set; }
|
||||
[ProtoMember(9)]
|
||||
public RoleGearItemInfo Leader { get; set; }
|
||||
public UnitGearItemInfo Leader { get; set; }
|
||||
[ProtoMember(10)]
|
||||
public RoleGearItemInfo Feeder { get; set; }
|
||||
public UnitGearItemInfo Feeder { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class Vector3Info : AMessage, IProto
|
||||
@@ -123,11 +123,11 @@ namespace NBC
|
||||
public float w { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class RoleFishingInfo : AMessage, IProto
|
||||
public partial class UnitFishingInfo : AMessage, IProto
|
||||
{
|
||||
public static RoleFishingInfo Create(Scene scene)
|
||||
public static UnitFishingInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<RoleFishingInfo>();
|
||||
return scene.MessagePoolComponent.Rent<UnitFishingInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
@@ -136,7 +136,7 @@ namespace NBC
|
||||
OpenLight = default;
|
||||
RodSetting = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<RoleFishingInfo>(this);
|
||||
GetScene().MessagePoolComponent.Return<UnitFishingInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
@@ -149,18 +149,18 @@ namespace NBC
|
||||
public int RodSetting { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class RoleStateInfo : AMessage, IProto
|
||||
public partial class UnitStateInfo : AMessage, IProto
|
||||
{
|
||||
public static RoleStateInfo Create(Scene scene)
|
||||
public static UnitStateInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<RoleStateInfo>();
|
||||
return scene.MessagePoolComponent.Rent<UnitStateInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
State = default;
|
||||
Args.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<RoleStateInfo>(this);
|
||||
GetScene().MessagePoolComponent.Return<UnitStateInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
@@ -169,11 +169,11 @@ namespace NBC
|
||||
public List<string> Args = new List<string>();
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class MapRoleInfo : AMessage, IProto
|
||||
public partial class MapUnitInfo : AMessage, IProto
|
||||
{
|
||||
public static MapRoleInfo Create(Scene scene)
|
||||
public static MapUnitInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<MapRoleInfo>();
|
||||
return scene.MessagePoolComponent.Rent<MapUnitInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
@@ -183,8 +183,9 @@ namespace NBC
|
||||
State = default;
|
||||
Gears = default;
|
||||
FishingInfo = default;
|
||||
KV.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<MapRoleInfo>(this);
|
||||
GetScene().MessagePoolComponent.Return<MapUnitInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
@@ -192,27 +193,29 @@ namespace NBC
|
||||
[ProtoMember(2)]
|
||||
public RoleSimpleInfo RoleInfo { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public MapRolePositionInfo Location { get; set; }
|
||||
public MapUnitPositionInfo Location { get; set; }
|
||||
[ProtoMember(4)]
|
||||
public RoleStateInfo State { get; set; }
|
||||
public UnitStateInfo State { get; set; }
|
||||
[ProtoMember(5)]
|
||||
public RoleGearInfo Gears { get; set; }
|
||||
public UnitGearInfo Gears { get; set; }
|
||||
[ProtoMember(6)]
|
||||
public RoleFishingInfo FishingInfo { get; set; }
|
||||
public UnitFishingInfo FishingInfo { get; set; }
|
||||
[ProtoMember(7)]
|
||||
public List<KeyValueInt32> KV = new List<KeyValueInt32>();
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class MapRolePositionInfo : AMessage, IProto
|
||||
public partial class MapUnitPositionInfo : AMessage, IProto
|
||||
{
|
||||
public static MapRolePositionInfo Create(Scene scene)
|
||||
public static MapUnitPositionInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<MapRolePositionInfo>();
|
||||
return scene.MessagePoolComponent.Rent<MapUnitPositionInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Position = default;
|
||||
Rotation = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<MapRolePositionInfo>(this);
|
||||
GetScene().MessagePoolComponent.Return<MapUnitPositionInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
@@ -230,14 +233,14 @@ namespace NBC
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
Roles.Clear();
|
||||
Units.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Map2C_CreateMapResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Map2C_CreateMapResponse; }
|
||||
[ProtoMember(1)]
|
||||
public List<MapRoleInfo> Roles = new List<MapRoleInfo>();
|
||||
public List<MapUnitInfo> Units = new List<MapUnitInfo>();
|
||||
[ProtoMember(2)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
@@ -276,14 +279,14 @@ namespace NBC
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
Roles.Clear();
|
||||
Units.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Map2C_EnterMapResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Map2C_EnterMapResponse; }
|
||||
[ProtoMember(1)]
|
||||
public List<MapRoleInfo> Roles = new List<MapRoleInfo>();
|
||||
public List<MapUnitInfo> Units = new List<MapUnitInfo>();
|
||||
[ProtoMember(2)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
@@ -306,7 +309,7 @@ namespace NBC
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
[ProtoMember(1)]
|
||||
public MapRolePositionInfo Location { get; set; }
|
||||
public MapUnitPositionInfo Location { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public bool IsStop { get; set; }
|
||||
}
|
||||
@@ -331,7 +334,7 @@ namespace NBC
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
[ProtoMember(1)]
|
||||
public MapRoleInfo Info { get; set; }
|
||||
public MapUnitInfo Info { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 用户离开地图
|
||||
@@ -380,7 +383,7 @@ namespace NBC
|
||||
[ProtoMember(1)]
|
||||
public long Id { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public RoleStateInfo State { get; set; }
|
||||
public UnitStateInfo State { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 玩家钓组状态变化
|
||||
@@ -406,7 +409,7 @@ namespace NBC
|
||||
[ProtoMember(1)]
|
||||
public long Id { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public RoleFishingInfo State { get; set; }
|
||||
public UnitFishingInfo State { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 玩家钓组变化
|
||||
@@ -432,7 +435,7 @@ namespace NBC
|
||||
[ProtoMember(1)]
|
||||
public long Id { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public RoleGearInfo Gears { get; set; }
|
||||
public UnitGearInfo Gears { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 玩家位置变化
|
||||
@@ -455,6 +458,6 @@ namespace NBC
|
||||
[ProtoMember(1)]
|
||||
public long Id { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public MapRolePositionInfo Location { get; set; }
|
||||
public MapUnitPositionInfo Location { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user