mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
[+] 接入ET8服务端
[+] 接入ET8服务端
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
using ET;
|
||||
using MemoryPack;
|
||||
using System.Collections.Generic;
|
||||
namespace ET
|
||||
{
|
||||
// using
|
||||
[ResponseType(nameof(NetClient2Main_Login))]
|
||||
[Message(ClientMessage.Main2NetClient_Login)]
|
||||
[MemoryPackable]
|
||||
public partial class Main2NetClient_Login: MessageObject, IActorRequest
|
||||
{
|
||||
public static Main2NetClient_Login Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new Main2NetClient_Login() : ObjectPool.Instance.Fetch(typeof(Main2NetClient_Login)) as Main2NetClient_Login;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public string Account { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public string Password { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Account = default;
|
||||
this.Password = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Message(ClientMessage.NetClient2Main_Login)]
|
||||
[MemoryPackable]
|
||||
public partial class NetClient2Main_Login: MessageObject, IActorResponse
|
||||
{
|
||||
public static NetClient2Main_Login Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new NetClient2Main_Login() : ObjectPool.Instance.Fetch(typeof(NetClient2Main_Login)) as NetClient2Main_Login;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public int Error { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public string Message { get; set; }
|
||||
|
||||
[MemoryPackOrder(3)]
|
||||
public long PlayerId { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Error = default;
|
||||
this.Message = default;
|
||||
this.PlayerId = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class ClientMessage
|
||||
{
|
||||
public const ushort Main2NetClient_Login = 1001;
|
||||
public const ushort NetClient2Main_Login = 1002;
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 92edc085102634d49b0441de1f600ce7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,758 @@
|
||||
using ET;
|
||||
using MemoryPack;
|
||||
using System.Collections.Generic;
|
||||
namespace ET
|
||||
{
|
||||
// using
|
||||
[ResponseType(nameof(ObjectQueryResponse))]
|
||||
[Message(InnerMessage.ObjectQueryRequest)]
|
||||
[MemoryPackable]
|
||||
public partial class ObjectQueryRequest: MessageObject, IActorRequest
|
||||
{
|
||||
public static ObjectQueryRequest Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new ObjectQueryRequest() : ObjectPool.Instance.Fetch(typeof(ObjectQueryRequest)) as ObjectQueryRequest;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public long Key { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public long InstanceId { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Key = default;
|
||||
this.InstanceId = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[ResponseType(nameof(A2M_Reload))]
|
||||
[Message(InnerMessage.M2A_Reload)]
|
||||
[MemoryPackable]
|
||||
public partial class M2A_Reload: MessageObject, IActorRequest
|
||||
{
|
||||
public static M2A_Reload Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new M2A_Reload() : ObjectPool.Instance.Fetch(typeof(M2A_Reload)) as M2A_Reload;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Message(InnerMessage.A2M_Reload)]
|
||||
[MemoryPackable]
|
||||
public partial class A2M_Reload: MessageObject, IActorResponse
|
||||
{
|
||||
public static A2M_Reload Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new A2M_Reload() : ObjectPool.Instance.Fetch(typeof(A2M_Reload)) as A2M_Reload;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public int Error { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public string Message { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Error = default;
|
||||
this.Message = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[ResponseType(nameof(G2G_LockResponse))]
|
||||
[Message(InnerMessage.G2G_LockRequest)]
|
||||
[MemoryPackable]
|
||||
public partial class G2G_LockRequest: MessageObject, IActorRequest
|
||||
{
|
||||
public static G2G_LockRequest Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new G2G_LockRequest() : ObjectPool.Instance.Fetch(typeof(G2G_LockRequest)) as G2G_LockRequest;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public long Id { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public string Address { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Id = default;
|
||||
this.Address = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Message(InnerMessage.G2G_LockResponse)]
|
||||
[MemoryPackable]
|
||||
public partial class G2G_LockResponse: MessageObject, IActorResponse
|
||||
{
|
||||
public static G2G_LockResponse Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new G2G_LockResponse() : ObjectPool.Instance.Fetch(typeof(G2G_LockResponse)) as G2G_LockResponse;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public int Error { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public string Message { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Error = default;
|
||||
this.Message = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[ResponseType(nameof(G2G_LockReleaseResponse))]
|
||||
[Message(InnerMessage.G2G_LockReleaseRequest)]
|
||||
[MemoryPackable]
|
||||
public partial class G2G_LockReleaseRequest: MessageObject, IActorRequest
|
||||
{
|
||||
public static G2G_LockReleaseRequest Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new G2G_LockReleaseRequest() : ObjectPool.Instance.Fetch(typeof(G2G_LockReleaseRequest)) as G2G_LockReleaseRequest;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public long Id { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public string Address { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Id = default;
|
||||
this.Address = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Message(InnerMessage.G2G_LockReleaseResponse)]
|
||||
[MemoryPackable]
|
||||
public partial class G2G_LockReleaseResponse: MessageObject, IActorResponse
|
||||
{
|
||||
public static G2G_LockReleaseResponse Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new G2G_LockReleaseResponse() : ObjectPool.Instance.Fetch(typeof(G2G_LockReleaseResponse)) as G2G_LockReleaseResponse;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public int Error { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public string Message { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Error = default;
|
||||
this.Message = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[ResponseType(nameof(ObjectAddResponse))]
|
||||
[Message(InnerMessage.ObjectAddRequest)]
|
||||
[MemoryPackable]
|
||||
public partial class ObjectAddRequest: MessageObject, IActorRequest
|
||||
{
|
||||
public static ObjectAddRequest Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new ObjectAddRequest() : ObjectPool.Instance.Fetch(typeof(ObjectAddRequest)) as ObjectAddRequest;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public int Type { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public long Key { get; set; }
|
||||
|
||||
[MemoryPackOrder(3)]
|
||||
public ActorId ActorId { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Type = default;
|
||||
this.Key = default;
|
||||
this.ActorId = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Message(InnerMessage.ObjectAddResponse)]
|
||||
[MemoryPackable]
|
||||
public partial class ObjectAddResponse: MessageObject, IActorResponse
|
||||
{
|
||||
public static ObjectAddResponse Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new ObjectAddResponse() : ObjectPool.Instance.Fetch(typeof(ObjectAddResponse)) as ObjectAddResponse;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public int Error { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public string Message { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Error = default;
|
||||
this.Message = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[ResponseType(nameof(ObjectLockResponse))]
|
||||
[Message(InnerMessage.ObjectLockRequest)]
|
||||
[MemoryPackable]
|
||||
public partial class ObjectLockRequest: MessageObject, IActorRequest
|
||||
{
|
||||
public static ObjectLockRequest Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new ObjectLockRequest() : ObjectPool.Instance.Fetch(typeof(ObjectLockRequest)) as ObjectLockRequest;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public int Type { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public long Key { get; set; }
|
||||
|
||||
[MemoryPackOrder(3)]
|
||||
public ActorId ActorId { get; set; }
|
||||
|
||||
[MemoryPackOrder(4)]
|
||||
public int Time { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Type = default;
|
||||
this.Key = default;
|
||||
this.ActorId = default;
|
||||
this.Time = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Message(InnerMessage.ObjectLockResponse)]
|
||||
[MemoryPackable]
|
||||
public partial class ObjectLockResponse: MessageObject, IActorResponse
|
||||
{
|
||||
public static ObjectLockResponse Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new ObjectLockResponse() : ObjectPool.Instance.Fetch(typeof(ObjectLockResponse)) as ObjectLockResponse;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public int Error { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public string Message { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Error = default;
|
||||
this.Message = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[ResponseType(nameof(ObjectUnLockResponse))]
|
||||
[Message(InnerMessage.ObjectUnLockRequest)]
|
||||
[MemoryPackable]
|
||||
public partial class ObjectUnLockRequest: MessageObject, IActorRequest
|
||||
{
|
||||
public static ObjectUnLockRequest Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new ObjectUnLockRequest() : ObjectPool.Instance.Fetch(typeof(ObjectUnLockRequest)) as ObjectUnLockRequest;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public int Type { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public long Key { get; set; }
|
||||
|
||||
[MemoryPackOrder(3)]
|
||||
public ActorId OldActorId { get; set; }
|
||||
|
||||
[MemoryPackOrder(4)]
|
||||
public ActorId NewActorId { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Type = default;
|
||||
this.Key = default;
|
||||
this.OldActorId = default;
|
||||
this.NewActorId = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Message(InnerMessage.ObjectUnLockResponse)]
|
||||
[MemoryPackable]
|
||||
public partial class ObjectUnLockResponse: MessageObject, IActorResponse
|
||||
{
|
||||
public static ObjectUnLockResponse Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new ObjectUnLockResponse() : ObjectPool.Instance.Fetch(typeof(ObjectUnLockResponse)) as ObjectUnLockResponse;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public int Error { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public string Message { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Error = default;
|
||||
this.Message = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[ResponseType(nameof(ObjectRemoveResponse))]
|
||||
[Message(InnerMessage.ObjectRemoveRequest)]
|
||||
[MemoryPackable]
|
||||
public partial class ObjectRemoveRequest: MessageObject, IActorRequest
|
||||
{
|
||||
public static ObjectRemoveRequest Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new ObjectRemoveRequest() : ObjectPool.Instance.Fetch(typeof(ObjectRemoveRequest)) as ObjectRemoveRequest;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public int Type { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public long Key { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Type = default;
|
||||
this.Key = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Message(InnerMessage.ObjectRemoveResponse)]
|
||||
[MemoryPackable]
|
||||
public partial class ObjectRemoveResponse: MessageObject, IActorResponse
|
||||
{
|
||||
public static ObjectRemoveResponse Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new ObjectRemoveResponse() : ObjectPool.Instance.Fetch(typeof(ObjectRemoveResponse)) as ObjectRemoveResponse;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public int Error { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public string Message { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Error = default;
|
||||
this.Message = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[ResponseType(nameof(ObjectGetResponse))]
|
||||
[Message(InnerMessage.ObjectGetRequest)]
|
||||
[MemoryPackable]
|
||||
public partial class ObjectGetRequest: MessageObject, IActorRequest
|
||||
{
|
||||
public static ObjectGetRequest Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new ObjectGetRequest() : ObjectPool.Instance.Fetch(typeof(ObjectGetRequest)) as ObjectGetRequest;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public int Type { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public long Key { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Type = default;
|
||||
this.Key = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Message(InnerMessage.ObjectGetResponse)]
|
||||
[MemoryPackable]
|
||||
public partial class ObjectGetResponse: MessageObject, IActorResponse
|
||||
{
|
||||
public static ObjectGetResponse Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new ObjectGetResponse() : ObjectPool.Instance.Fetch(typeof(ObjectGetResponse)) as ObjectGetResponse;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public int Error { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public string Message { get; set; }
|
||||
|
||||
[MemoryPackOrder(3)]
|
||||
public int Type { get; set; }
|
||||
|
||||
[MemoryPackOrder(4)]
|
||||
public ActorId ActorId { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Error = default;
|
||||
this.Message = default;
|
||||
this.Type = default;
|
||||
this.ActorId = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[ResponseType(nameof(G2R_GetLoginKey))]
|
||||
[Message(InnerMessage.R2G_GetLoginKey)]
|
||||
[MemoryPackable]
|
||||
public partial class R2G_GetLoginKey: MessageObject, IActorRequest
|
||||
{
|
||||
public static R2G_GetLoginKey Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new R2G_GetLoginKey() : ObjectPool.Instance.Fetch(typeof(R2G_GetLoginKey)) as R2G_GetLoginKey;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public string Account { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Account = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Message(InnerMessage.G2R_GetLoginKey)]
|
||||
[MemoryPackable]
|
||||
public partial class G2R_GetLoginKey: MessageObject, IActorResponse
|
||||
{
|
||||
public static G2R_GetLoginKey Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new G2R_GetLoginKey() : ObjectPool.Instance.Fetch(typeof(G2R_GetLoginKey)) as G2R_GetLoginKey;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public int Error { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public string Message { get; set; }
|
||||
|
||||
[MemoryPackOrder(3)]
|
||||
public long Key { get; set; }
|
||||
|
||||
[MemoryPackOrder(4)]
|
||||
public long GateId { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Error = default;
|
||||
this.Message = default;
|
||||
this.Key = default;
|
||||
this.GateId = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Message(InnerMessage.G2M_SessionDisconnect)]
|
||||
[MemoryPackable]
|
||||
public partial class G2M_SessionDisconnect: MessageObject, IActorLocationMessage
|
||||
{
|
||||
public static G2M_SessionDisconnect Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new G2M_SessionDisconnect() : ObjectPool.Instance.Fetch(typeof(G2M_SessionDisconnect)) as G2M_SessionDisconnect;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Message(InnerMessage.ObjectQueryResponse)]
|
||||
[MemoryPackable]
|
||||
public partial class ObjectQueryResponse: MessageObject, IActorResponse
|
||||
{
|
||||
public static ObjectQueryResponse Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new ObjectQueryResponse() : ObjectPool.Instance.Fetch(typeof(ObjectQueryResponse)) as ObjectQueryResponse;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public int Error { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public string Message { get; set; }
|
||||
|
||||
[MemoryPackOrder(3)]
|
||||
public byte[] Entity { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Error = default;
|
||||
this.Message = default;
|
||||
this.Entity = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[ResponseType(nameof(M2M_UnitTransferResponse))]
|
||||
[Message(InnerMessage.M2M_UnitTransferRequest)]
|
||||
[MemoryPackable]
|
||||
public partial class M2M_UnitTransferRequest: MessageObject, IActorRequest
|
||||
{
|
||||
public static M2M_UnitTransferRequest Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new M2M_UnitTransferRequest() : ObjectPool.Instance.Fetch(typeof(M2M_UnitTransferRequest)) as M2M_UnitTransferRequest;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public ActorId OldActorId { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public byte[] Unit { get; set; }
|
||||
|
||||
[MemoryPackOrder(3)]
|
||||
public List<byte[]> Entitys { get; set; } = new();
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.OldActorId = default;
|
||||
this.Unit = default;
|
||||
this.Entitys.Clear();
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Message(InnerMessage.M2M_UnitTransferResponse)]
|
||||
[MemoryPackable]
|
||||
public partial class M2M_UnitTransferResponse: MessageObject, IActorResponse
|
||||
{
|
||||
public static M2M_UnitTransferResponse Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new M2M_UnitTransferResponse() : ObjectPool.Instance.Fetch(typeof(M2M_UnitTransferResponse)) as M2M_UnitTransferResponse;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public int Error { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public string Message { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Error = default;
|
||||
this.Message = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class InnerMessage
|
||||
{
|
||||
public const ushort ObjectQueryRequest = 20002;
|
||||
public const ushort M2A_Reload = 20003;
|
||||
public const ushort A2M_Reload = 20004;
|
||||
public const ushort G2G_LockRequest = 20005;
|
||||
public const ushort G2G_LockResponse = 20006;
|
||||
public const ushort G2G_LockReleaseRequest = 20007;
|
||||
public const ushort G2G_LockReleaseResponse = 20008;
|
||||
public const ushort ObjectAddRequest = 20009;
|
||||
public const ushort ObjectAddResponse = 20010;
|
||||
public const ushort ObjectLockRequest = 20011;
|
||||
public const ushort ObjectLockResponse = 20012;
|
||||
public const ushort ObjectUnLockRequest = 20013;
|
||||
public const ushort ObjectUnLockResponse = 20014;
|
||||
public const ushort ObjectRemoveRequest = 20015;
|
||||
public const ushort ObjectRemoveResponse = 20016;
|
||||
public const ushort ObjectGetRequest = 20017;
|
||||
public const ushort ObjectGetResponse = 20018;
|
||||
public const ushort R2G_GetLoginKey = 20019;
|
||||
public const ushort G2R_GetLoginKey = 20020;
|
||||
public const ushort G2M_SessionDisconnect = 20021;
|
||||
public const ushort ObjectQueryResponse = 20022;
|
||||
public const ushort M2M_UnitTransferRequest = 20023;
|
||||
public const ushort M2M_UnitTransferResponse = 20024;
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e0b72155012589840a78d9d64f29bdce
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,263 @@
|
||||
using ET;
|
||||
using MemoryPack;
|
||||
using System.Collections.Generic;
|
||||
namespace ET
|
||||
{
|
||||
// 请求匹配
|
||||
[ResponseType(nameof(Match2G_Match))]
|
||||
[Message(LockStepInner.G2Match_Match)]
|
||||
[MemoryPackable]
|
||||
public partial class G2Match_Match: MessageObject, IActorRequest
|
||||
{
|
||||
public static G2Match_Match Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new G2Match_Match() : ObjectPool.Instance.Fetch(typeof(G2Match_Match)) as G2Match_Match;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public long Id { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Id = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Message(LockStepInner.Match2G_Match)]
|
||||
[MemoryPackable]
|
||||
public partial class Match2G_Match: MessageObject, IActorResponse
|
||||
{
|
||||
public static Match2G_Match Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new Match2G_Match() : ObjectPool.Instance.Fetch(typeof(Match2G_Match)) as Match2G_Match;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public int Error { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public string Message { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Error = default;
|
||||
this.Message = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[ResponseType(nameof(Map2Match_GetRoom))]
|
||||
[Message(LockStepInner.Match2Map_GetRoom)]
|
||||
[MemoryPackable]
|
||||
public partial class Match2Map_GetRoom: MessageObject, IActorRequest
|
||||
{
|
||||
public static Match2Map_GetRoom Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new Match2Map_GetRoom() : ObjectPool.Instance.Fetch(typeof(Match2Map_GetRoom)) as Match2Map_GetRoom;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public List<long> PlayerIds { get; set; } = new();
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.PlayerIds.Clear();
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Message(LockStepInner.Map2Match_GetRoom)]
|
||||
[MemoryPackable]
|
||||
public partial class Map2Match_GetRoom: MessageObject, IActorResponse
|
||||
{
|
||||
public static Map2Match_GetRoom Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new Map2Match_GetRoom() : ObjectPool.Instance.Fetch(typeof(Map2Match_GetRoom)) as Map2Match_GetRoom;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public int Error { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public string Message { get; set; }
|
||||
|
||||
// 房间的ActorId
|
||||
[MemoryPackOrder(3)]
|
||||
public ActorId ActorId { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Error = default;
|
||||
this.Message = default;
|
||||
this.ActorId = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[ResponseType(nameof(Room2G_Reconnect))]
|
||||
[Message(LockStepInner.G2Room_Reconnect)]
|
||||
[MemoryPackable]
|
||||
public partial class G2Room_Reconnect: MessageObject, IActorRequest
|
||||
{
|
||||
public static G2Room_Reconnect Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new G2Room_Reconnect() : ObjectPool.Instance.Fetch(typeof(G2Room_Reconnect)) as G2Room_Reconnect;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public long PlayerId { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.PlayerId = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Message(LockStepInner.Room2G_Reconnect)]
|
||||
[MemoryPackable]
|
||||
public partial class Room2G_Reconnect: MessageObject, IActorResponse
|
||||
{
|
||||
public static Room2G_Reconnect Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new Room2G_Reconnect() : ObjectPool.Instance.Fetch(typeof(Room2G_Reconnect)) as Room2G_Reconnect;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public int Error { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public string Message { get; set; }
|
||||
|
||||
[MemoryPackOrder(3)]
|
||||
public long StartTime { get; set; }
|
||||
|
||||
[MemoryPackOrder(4)]
|
||||
public List<LockStepUnitInfo> UnitInfos { get; set; } = new();
|
||||
|
||||
[MemoryPackOrder(5)]
|
||||
public int Frame { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Error = default;
|
||||
this.Message = default;
|
||||
this.StartTime = default;
|
||||
this.UnitInfos.Clear();
|
||||
this.Frame = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[ResponseType(nameof(Room2RoomManager_Init))]
|
||||
[Message(LockStepInner.RoomManager2Room_Init)]
|
||||
[MemoryPackable]
|
||||
public partial class RoomManager2Room_Init: MessageObject, IActorRequest
|
||||
{
|
||||
public static RoomManager2Room_Init Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new RoomManager2Room_Init() : ObjectPool.Instance.Fetch(typeof(RoomManager2Room_Init)) as RoomManager2Room_Init;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public List<long> PlayerIds { get; set; } = new();
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.PlayerIds.Clear();
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Message(LockStepInner.Room2RoomManager_Init)]
|
||||
[MemoryPackable]
|
||||
public partial class Room2RoomManager_Init: MessageObject, IActorResponse
|
||||
{
|
||||
public static Room2RoomManager_Init Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new Room2RoomManager_Init() : ObjectPool.Instance.Fetch(typeof(Room2RoomManager_Init)) as Room2RoomManager_Init;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public int Error { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public string Message { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Error = default;
|
||||
this.Message = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class LockStepInner
|
||||
{
|
||||
public const ushort G2Match_Match = 21002;
|
||||
public const ushort Match2G_Match = 21003;
|
||||
public const ushort Match2Map_GetRoom = 21004;
|
||||
public const ushort Map2Match_GetRoom = 21005;
|
||||
public const ushort G2Room_Reconnect = 21006;
|
||||
public const ushort Room2G_Reconnect = 21007;
|
||||
public const ushort RoomManager2Room_Init = 21008;
|
||||
public const ushort Room2RoomManager_Init = 21009;
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9a6810f88918d4d20ae7b353895f1af1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,342 @@
|
||||
using ET;
|
||||
using MemoryPack;
|
||||
using System.Collections.Generic;
|
||||
namespace ET
|
||||
{
|
||||
[ResponseType(nameof(G2C_Match))]
|
||||
[Message(LockStepOuter.C2G_Match)]
|
||||
[MemoryPackable]
|
||||
public partial class C2G_Match: MessageObject, IRequest
|
||||
{
|
||||
public static C2G_Match Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new C2G_Match() : ObjectPool.Instance.Fetch(typeof(C2G_Match)) as C2G_Match;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Message(LockStepOuter.G2C_Match)]
|
||||
[MemoryPackable]
|
||||
public partial class G2C_Match: MessageObject, IResponse
|
||||
{
|
||||
public static G2C_Match Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new G2C_Match() : ObjectPool.Instance.Fetch(typeof(G2C_Match)) as G2C_Match;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public int Error { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public string Message { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.Error = default;
|
||||
this.Message = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 匹配成功,通知客户端切换场景
|
||||
[Message(LockStepOuter.Match2G_NotifyMatchSuccess)]
|
||||
[MemoryPackable]
|
||||
public partial class Match2G_NotifyMatchSuccess: MessageObject, IActorMessage
|
||||
{
|
||||
public static Match2G_NotifyMatchSuccess Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new Match2G_NotifyMatchSuccess() : ObjectPool.Instance.Fetch(typeof(Match2G_NotifyMatchSuccess)) as Match2G_NotifyMatchSuccess;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int RpcId { get; set; }
|
||||
|
||||
// 房间的ActorId
|
||||
[MemoryPackOrder(1)]
|
||||
public ActorId ActorId { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.RpcId = default;
|
||||
this.ActorId = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 客户端通知房间切换场景完成
|
||||
[Message(LockStepOuter.C2Room_ChangeSceneFinish)]
|
||||
[MemoryPackable]
|
||||
public partial class C2Room_ChangeSceneFinish: MessageObject, IActorRoom
|
||||
{
|
||||
public static C2Room_ChangeSceneFinish Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new C2Room_ChangeSceneFinish() : ObjectPool.Instance.Fetch(typeof(C2Room_ChangeSceneFinish)) as C2Room_ChangeSceneFinish;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public long PlayerId { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.PlayerId = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Message(LockStepOuter.LockStepUnitInfo)]
|
||||
[MemoryPackable]
|
||||
public partial class LockStepUnitInfo: MessageObject
|
||||
{
|
||||
public static LockStepUnitInfo Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new LockStepUnitInfo() : ObjectPool.Instance.Fetch(typeof(LockStepUnitInfo)) as LockStepUnitInfo;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public long PlayerId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public TrueSync.TSVector Position { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public TrueSync.TSQuaternion Rotation { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.PlayerId = default;
|
||||
this.Position = default;
|
||||
this.Rotation = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 房间通知客户端进入战斗
|
||||
[Message(LockStepOuter.Room2C_Start)]
|
||||
[MemoryPackable]
|
||||
public partial class Room2C_Start: MessageObject, IActorMessage
|
||||
{
|
||||
public static Room2C_Start Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new Room2C_Start() : ObjectPool.Instance.Fetch(typeof(Room2C_Start)) as Room2C_Start;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public long StartTime { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public List<LockStepUnitInfo> UnitInfo { get; set; } = new();
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.StartTime = default;
|
||||
this.UnitInfo.Clear();
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Message(LockStepOuter.FrameMessage)]
|
||||
[MemoryPackable]
|
||||
public partial class FrameMessage: MessageObject, IActorMessage
|
||||
{
|
||||
public static FrameMessage Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new FrameMessage() : ObjectPool.Instance.Fetch(typeof(FrameMessage)) as FrameMessage;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int Frame { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public long PlayerId { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public LSInput Input { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.Frame = default;
|
||||
this.PlayerId = default;
|
||||
this.Input = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Message(LockStepOuter.OneFrameInputs)]
|
||||
[MemoryPackable]
|
||||
public partial class OneFrameInputs: MessageObject, IActorMessage
|
||||
{
|
||||
public static OneFrameInputs Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new OneFrameInputs() : ObjectPool.Instance.Fetch(typeof(OneFrameInputs)) as OneFrameInputs;
|
||||
}
|
||||
|
||||
[MongoDB.Bson.Serialization.Attributes.BsonDictionaryOptions(MongoDB.Bson.Serialization.Options.DictionaryRepresentation.ArrayOfArrays)]
|
||||
[MemoryPackOrder(1)]
|
||||
public Dictionary<long, LSInput> Inputs { get; set; } = new();
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.Inputs.Clear();
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Message(LockStepOuter.Room2C_AdjustUpdateTime)]
|
||||
[MemoryPackable]
|
||||
public partial class Room2C_AdjustUpdateTime: MessageObject, IActorMessage
|
||||
{
|
||||
public static Room2C_AdjustUpdateTime Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new Room2C_AdjustUpdateTime() : ObjectPool.Instance.Fetch(typeof(Room2C_AdjustUpdateTime)) as Room2C_AdjustUpdateTime;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int DiffTime { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.DiffTime = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Message(LockStepOuter.C2Room_CheckHash)]
|
||||
[MemoryPackable]
|
||||
public partial class C2Room_CheckHash: MessageObject, IActorRoom
|
||||
{
|
||||
public static C2Room_CheckHash Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new C2Room_CheckHash() : ObjectPool.Instance.Fetch(typeof(C2Room_CheckHash)) as C2Room_CheckHash;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public long PlayerId { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public int Frame { get; set; }
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public long Hash { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.PlayerId = default;
|
||||
this.Frame = default;
|
||||
this.Hash = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Message(LockStepOuter.Room2C_CheckHashFail)]
|
||||
[MemoryPackable]
|
||||
public partial class Room2C_CheckHashFail: MessageObject, IActorMessage
|
||||
{
|
||||
public static Room2C_CheckHashFail Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new Room2C_CheckHashFail() : ObjectPool.Instance.Fetch(typeof(Room2C_CheckHashFail)) as Room2C_CheckHashFail;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public int Frame { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public byte[] LSWorldBytes { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.Frame = default;
|
||||
this.LSWorldBytes = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Message(LockStepOuter.G2C_Reconnect)]
|
||||
[MemoryPackable]
|
||||
public partial class G2C_Reconnect: MessageObject, IActorMessage
|
||||
{
|
||||
public static G2C_Reconnect Create(bool isFromPool = true)
|
||||
{
|
||||
return !isFromPool? new G2C_Reconnect() : ObjectPool.Instance.Fetch(typeof(G2C_Reconnect)) as G2C_Reconnect;
|
||||
}
|
||||
|
||||
[MemoryPackOrder(0)]
|
||||
public long StartTime { get; set; }
|
||||
|
||||
[MemoryPackOrder(1)]
|
||||
public List<LockStepUnitInfo> UnitInfos { get; set; } = new();
|
||||
|
||||
[MemoryPackOrder(2)]
|
||||
public int Frame { get; set; }
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
if (!this.IsFromPool) return;
|
||||
this.StartTime = default;
|
||||
this.UnitInfos.Clear();
|
||||
this.Frame = default;
|
||||
|
||||
ObjectPool.Instance.Recycle(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class LockStepOuter
|
||||
{
|
||||
public const ushort C2G_Match = 11002;
|
||||
public const ushort G2C_Match = 11003;
|
||||
public const ushort Match2G_NotifyMatchSuccess = 11004;
|
||||
public const ushort C2Room_ChangeSceneFinish = 11005;
|
||||
public const ushort LockStepUnitInfo = 11006;
|
||||
public const ushort Room2C_Start = 11007;
|
||||
public const ushort FrameMessage = 11008;
|
||||
public const ushort OneFrameInputs = 11009;
|
||||
public const ushort Room2C_AdjustUpdateTime = 11010;
|
||||
public const ushort C2Room_CheckHash = 11011;
|
||||
public const ushort Room2C_CheckHashFail = 11012;
|
||||
public const ushort G2C_Reconnect = 11013;
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f493672bf2fa046739a1f8fbf88a28c3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9a420edf6a4a57a4c8d98e5acdffcfe9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user