角色控制和房间进入推送
This commit is contained in:
@@ -17,96 +17,24 @@ using Fantasy.Serialize;
|
||||
|
||||
namespace Fantasy
|
||||
{
|
||||
[ProtoContract]
|
||||
public partial class C2Map_EnterRoomRequest : AMessage, ICustomRouteRequest, IProto
|
||||
{
|
||||
public static C2Map_EnterRoomRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2Map_EnterRoomRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
MapId = default;
|
||||
Password = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2Map_EnterRoomRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public Map2C_EnterRoomResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2Map_EnterRoomRequest; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
[ProtoMember(1)]
|
||||
public int MapId { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public string Password { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class Map2C_EnterRoomResponse : AMessage, ICustomRouteResponse, IProto
|
||||
{
|
||||
public static Map2C_EnterRoomResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Map2C_EnterRoomResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
MapId = default;
|
||||
RoomId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Map2C_EnterRoomResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Map2C_EnterRoomResponse; }
|
||||
[ProtoMember(1)]
|
||||
public int MapId { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public long RoomId { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class C2Map_Move : AMessage, ICustomRouteMessage, IProto
|
||||
{
|
||||
public static C2Map_Move Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2Map_Move>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Location = default;
|
||||
IsStop = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2Map_Move>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.C2Map_Move; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
[ProtoMember(1)]
|
||||
public MapUnitPositionInfo Location { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public bool IsStop { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 用户进入地图
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class Map2C_RoleEnterMapNotify : AMessage, ICustomRouteMessage, IProto
|
||||
public partial class Map2C_RoleEnterRoomNotify : AMessage, ICustomRouteMessage, IProto
|
||||
{
|
||||
public static Map2C_RoleEnterMapNotify Create(Scene scene)
|
||||
public static Map2C_RoleEnterRoomNotify Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Map2C_RoleEnterMapNotify>();
|
||||
return scene.MessagePoolComponent.Rent<Map2C_RoleEnterRoomNotify>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Info = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Map2C_RoleEnterMapNotify>(this);
|
||||
GetScene().MessagePoolComponent.Return<Map2C_RoleEnterRoomNotify>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Map2C_RoleEnterMapNotify; }
|
||||
public uint OpCode() { return OuterOpcode.Map2C_RoleEnterRoomNotify; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
[ProtoMember(1)]
|
||||
@@ -116,20 +44,20 @@ namespace Fantasy
|
||||
/// 用户离开地图
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class Map2C_RoleExitMapNotify : AMessage, ICustomRouteMessage, IProto
|
||||
public partial class Map2C_RoleExitRoomNotify : AMessage, ICustomRouteMessage, IProto
|
||||
{
|
||||
public static Map2C_RoleExitMapNotify Create(Scene scene)
|
||||
public static Map2C_RoleExitRoomNotify Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Map2C_RoleExitMapNotify>();
|
||||
return scene.MessagePoolComponent.Rent<Map2C_RoleExitRoomNotify>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Id = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Map2C_RoleExitMapNotify>(this);
|
||||
GetScene().MessagePoolComponent.Return<Map2C_RoleExitRoomNotify>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Map2C_RoleExitMapNotify; }
|
||||
public uint OpCode() { return OuterOpcode.Map2C_RoleExitRoomNotify; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
[ProtoMember(1)]
|
||||
@@ -213,11 +141,66 @@ namespace Fantasy
|
||||
[ProtoMember(2)]
|
||||
public GearInfo Gears { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class C2Map_Move : AMessage, ICustomRouteMessage, IProto
|
||||
{
|
||||
public static C2Map_Move Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2Map_Move>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Position = default;
|
||||
Rotation = default;
|
||||
Direction = default;
|
||||
IsStop = default;
|
||||
Timestamp = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2Map_Move>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.C2Map_Move; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
[ProtoMember(1)]
|
||||
public Vector3Info Position { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public Vector3Info Rotation { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public Vector3Info Direction { get; set; }
|
||||
[ProtoMember(4)]
|
||||
public bool IsStop { get; set; }
|
||||
[ProtoMember(5)]
|
||||
public long Timestamp { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class C2Map_Look : AMessage, ICustomRouteMessage, IProto
|
||||
{
|
||||
public static C2Map_Look Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2Map_Look>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Rotation = default;
|
||||
Timestamp = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2Map_Look>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.C2Map_Look; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
[ProtoMember(1)]
|
||||
public Vector3Info Rotation { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public long Timestamp { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 玩家位置变化
|
||||
/// 玩家移动推送
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class Map2C_MoveNotify : AMessage, IProto
|
||||
public partial class Map2C_MoveNotify : AMessage, ICustomRouteMessage, IProto
|
||||
{
|
||||
public static Map2C_MoveNotify Create(Scene scene)
|
||||
{
|
||||
@@ -226,14 +209,58 @@ namespace Fantasy
|
||||
public override void Dispose()
|
||||
{
|
||||
Id = default;
|
||||
Location = default;
|
||||
Position = default;
|
||||
Rotation = default;
|
||||
Direction = default;
|
||||
IsStop = default;
|
||||
Timestamp = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Map2C_MoveNotify>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Map2C_MoveNotify; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
[ProtoMember(1)]
|
||||
public long Id { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public MapUnitPositionInfo Location { get; set; }
|
||||
public Vector3Info Position { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public Vector3Info Rotation { get; set; }
|
||||
[ProtoMember(4)]
|
||||
public Vector3Info Direction { get; set; }
|
||||
[ProtoMember(5)]
|
||||
public bool IsStop { get; set; }
|
||||
[ProtoMember(6)]
|
||||
public long Timestamp { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 玩家旋转推送
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class Map2C_LookeNotify : AMessage, ICustomRouteMessage, IProto
|
||||
{
|
||||
public static Map2C_LookeNotify Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Map2C_LookeNotify>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Id = default;
|
||||
Rotation = default;
|
||||
Timestamp = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Map2C_LookeNotify>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Map2C_LookeNotify; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
[ProtoMember(1)]
|
||||
public long Id { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public Vector3Info Rotation { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public long Timestamp { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user