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,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c85bf5cb7b62b2f4d83f401d23ab35bb
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,70 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using MongoDB.Bson.Serialization.Options;
|
||||
|
||||
namespace ET
|
||||
{
|
||||
[Config]
|
||||
public partial class AIConfigCategory : ConfigSingleton<AIConfigCategory>, IMerge
|
||||
{
|
||||
[BsonElement]
|
||||
[BsonDictionaryOptions(DictionaryRepresentation.ArrayOfArrays)]
|
||||
private Dictionary<int, AIConfig> dict = new Dictionary<int, AIConfig>();
|
||||
|
||||
public void Merge(object o)
|
||||
{
|
||||
AIConfigCategory s = o as AIConfigCategory;
|
||||
foreach (var kv in s.dict)
|
||||
{
|
||||
this.dict.Add(kv.Key, kv.Value);
|
||||
}
|
||||
}
|
||||
|
||||
public AIConfig Get(int id)
|
||||
{
|
||||
this.dict.TryGetValue(id, out AIConfig item);
|
||||
|
||||
if (item == null)
|
||||
{
|
||||
throw new Exception($"配置找不到,配置表名: {nameof (AIConfig)},配置id: {id}");
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
public bool Contain(int id)
|
||||
{
|
||||
return this.dict.ContainsKey(id);
|
||||
}
|
||||
|
||||
public Dictionary<int, AIConfig> GetAll()
|
||||
{
|
||||
return this.dict;
|
||||
}
|
||||
|
||||
public AIConfig GetOne()
|
||||
{
|
||||
if (this.dict == null || this.dict.Count <= 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return this.dict.Values.GetEnumerator().Current;
|
||||
}
|
||||
}
|
||||
|
||||
public partial class AIConfig: ProtoObject, IConfig
|
||||
{
|
||||
/// <summary>Id</summary>
|
||||
public int Id { get; set; }
|
||||
/// <summary>所属ai</summary>
|
||||
public int AIConfigId { get; set; }
|
||||
/// <summary>此ai中的顺序</summary>
|
||||
public int Order { get; set; }
|
||||
/// <summary>节点名字</summary>
|
||||
public string Name { get; set; }
|
||||
/// <summary>节点参数</summary>
|
||||
public int[] NodeParams { get; set; }
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 25f89cbd24b877146a00f0b89443ed02
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using MongoDB.Bson.Serialization.Options;
|
||||
|
||||
namespace ET
|
||||
{
|
||||
[Config]
|
||||
public partial class StartMachineConfigCategory : ConfigSingleton<StartMachineConfigCategory>, IMerge
|
||||
{
|
||||
[BsonElement]
|
||||
[BsonDictionaryOptions(DictionaryRepresentation.ArrayOfArrays)]
|
||||
private Dictionary<int, StartMachineConfig> dict = new Dictionary<int, StartMachineConfig>();
|
||||
|
||||
public void Merge(object o)
|
||||
{
|
||||
StartMachineConfigCategory s = o as StartMachineConfigCategory;
|
||||
foreach (var kv in s.dict)
|
||||
{
|
||||
this.dict.Add(kv.Key, kv.Value);
|
||||
}
|
||||
}
|
||||
|
||||
public StartMachineConfig Get(int id)
|
||||
{
|
||||
this.dict.TryGetValue(id, out StartMachineConfig item);
|
||||
|
||||
if (item == null)
|
||||
{
|
||||
throw new Exception($"配置找不到,配置表名: {nameof (StartMachineConfig)},配置id: {id}");
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
public bool Contain(int id)
|
||||
{
|
||||
return this.dict.ContainsKey(id);
|
||||
}
|
||||
|
||||
public Dictionary<int, StartMachineConfig> GetAll()
|
||||
{
|
||||
return this.dict;
|
||||
}
|
||||
|
||||
public StartMachineConfig GetOne()
|
||||
{
|
||||
if (this.dict == null || this.dict.Count <= 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return this.dict.Values.GetEnumerator().Current;
|
||||
}
|
||||
}
|
||||
|
||||
public partial class StartMachineConfig: ProtoObject, IConfig
|
||||
{
|
||||
/// <summary>Id</summary>
|
||||
public int Id { get; set; }
|
||||
/// <summary>内网地址</summary>
|
||||
public string InnerIP { get; set; }
|
||||
/// <summary>外网地址</summary>
|
||||
public string OuterIP { get; set; }
|
||||
/// <summary>守护进程端口</summary>
|
||||
public string WatcherPort { get; set; }
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 563f0756420049a44a3bb5e2a477d595
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,64 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using MongoDB.Bson.Serialization.Options;
|
||||
|
||||
namespace ET
|
||||
{
|
||||
[Config]
|
||||
public partial class StartProcessConfigCategory : ConfigSingleton<StartProcessConfigCategory>, IMerge
|
||||
{
|
||||
[BsonElement]
|
||||
[BsonDictionaryOptions(DictionaryRepresentation.ArrayOfArrays)]
|
||||
private Dictionary<int, StartProcessConfig> dict = new Dictionary<int, StartProcessConfig>();
|
||||
|
||||
public void Merge(object o)
|
||||
{
|
||||
StartProcessConfigCategory s = o as StartProcessConfigCategory;
|
||||
foreach (var kv in s.dict)
|
||||
{
|
||||
this.dict.Add(kv.Key, kv.Value);
|
||||
}
|
||||
}
|
||||
|
||||
public StartProcessConfig Get(int id)
|
||||
{
|
||||
this.dict.TryGetValue(id, out StartProcessConfig item);
|
||||
|
||||
if (item == null)
|
||||
{
|
||||
throw new Exception($"配置找不到,配置表名: {nameof (StartProcessConfig)},配置id: {id}");
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
public bool Contain(int id)
|
||||
{
|
||||
return this.dict.ContainsKey(id);
|
||||
}
|
||||
|
||||
public Dictionary<int, StartProcessConfig> GetAll()
|
||||
{
|
||||
return this.dict;
|
||||
}
|
||||
|
||||
public StartProcessConfig GetOne()
|
||||
{
|
||||
if (this.dict == null || this.dict.Count <= 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return this.dict.Values.GetEnumerator().Current;
|
||||
}
|
||||
}
|
||||
|
||||
public partial class StartProcessConfig: ProtoObject, IConfig
|
||||
{
|
||||
/// <summary>Id</summary>
|
||||
public int Id { get; set; }
|
||||
/// <summary>所属机器</summary>
|
||||
public int MachineId { get; set; }
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 33af398c5827a1e4e9d75cc717b24f19
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,72 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using MongoDB.Bson.Serialization.Options;
|
||||
|
||||
namespace ET
|
||||
{
|
||||
[Config]
|
||||
public partial class StartSceneConfigCategory : ConfigSingleton<StartSceneConfigCategory>, IMerge
|
||||
{
|
||||
[BsonElement]
|
||||
[BsonDictionaryOptions(DictionaryRepresentation.ArrayOfArrays)]
|
||||
private Dictionary<int, StartSceneConfig> dict = new Dictionary<int, StartSceneConfig>();
|
||||
|
||||
public void Merge(object o)
|
||||
{
|
||||
StartSceneConfigCategory s = o as StartSceneConfigCategory;
|
||||
foreach (var kv in s.dict)
|
||||
{
|
||||
this.dict.Add(kv.Key, kv.Value);
|
||||
}
|
||||
}
|
||||
|
||||
public StartSceneConfig Get(int id)
|
||||
{
|
||||
this.dict.TryGetValue(id, out StartSceneConfig item);
|
||||
|
||||
if (item == null)
|
||||
{
|
||||
throw new Exception($"配置找不到,配置表名: {nameof (StartSceneConfig)},配置id: {id}");
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
public bool Contain(int id)
|
||||
{
|
||||
return this.dict.ContainsKey(id);
|
||||
}
|
||||
|
||||
public Dictionary<int, StartSceneConfig> GetAll()
|
||||
{
|
||||
return this.dict;
|
||||
}
|
||||
|
||||
public StartSceneConfig GetOne()
|
||||
{
|
||||
if (this.dict == null || this.dict.Count <= 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return this.dict.Values.GetEnumerator().Current;
|
||||
}
|
||||
}
|
||||
|
||||
public partial class StartSceneConfig: ProtoObject, IConfig
|
||||
{
|
||||
/// <summary>Id</summary>
|
||||
public int Id { get; set; }
|
||||
/// <summary>所属进程</summary>
|
||||
public int Process { get; set; }
|
||||
/// <summary>所属区</summary>
|
||||
public int Zone { get; set; }
|
||||
/// <summary>类型</summary>
|
||||
public string SceneType { get; set; }
|
||||
/// <summary>名字</summary>
|
||||
public string Name { get; set; }
|
||||
/// <summary>外网端口</summary>
|
||||
public int Port { get; set; }
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 14c0e4b0dd4cc3d4ebdd1d4a47d3a27d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using MongoDB.Bson.Serialization.Options;
|
||||
|
||||
namespace ET
|
||||
{
|
||||
[Config]
|
||||
public partial class StartZoneConfigCategory : ConfigSingleton<StartZoneConfigCategory>, IMerge
|
||||
{
|
||||
[BsonElement]
|
||||
[BsonDictionaryOptions(DictionaryRepresentation.ArrayOfArrays)]
|
||||
private Dictionary<int, StartZoneConfig> dict = new Dictionary<int, StartZoneConfig>();
|
||||
|
||||
public void Merge(object o)
|
||||
{
|
||||
StartZoneConfigCategory s = o as StartZoneConfigCategory;
|
||||
foreach (var kv in s.dict)
|
||||
{
|
||||
this.dict.Add(kv.Key, kv.Value);
|
||||
}
|
||||
}
|
||||
|
||||
public StartZoneConfig Get(int id)
|
||||
{
|
||||
this.dict.TryGetValue(id, out StartZoneConfig item);
|
||||
|
||||
if (item == null)
|
||||
{
|
||||
throw new Exception($"配置找不到,配置表名: {nameof (StartZoneConfig)},配置id: {id}");
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
public bool Contain(int id)
|
||||
{
|
||||
return this.dict.ContainsKey(id);
|
||||
}
|
||||
|
||||
public Dictionary<int, StartZoneConfig> GetAll()
|
||||
{
|
||||
return this.dict;
|
||||
}
|
||||
|
||||
public StartZoneConfig GetOne()
|
||||
{
|
||||
if (this.dict == null || this.dict.Count <= 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return this.dict.Values.GetEnumerator().Current;
|
||||
}
|
||||
}
|
||||
|
||||
public partial class StartZoneConfig: ProtoObject, IConfig
|
||||
{
|
||||
/// <summary>Id</summary>
|
||||
public int Id { get; set; }
|
||||
/// <summary>数据库地址</summary>
|
||||
public string DBConnection { get; set; }
|
||||
/// <summary>数据库名</summary>
|
||||
public string DBName { get; set; }
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e1c42eaffb283cc46b9844755f7738d9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,70 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using MongoDB.Bson.Serialization.Options;
|
||||
|
||||
namespace ET
|
||||
{
|
||||
[Config]
|
||||
public partial class UnitConfigCategory : ConfigSingleton<UnitConfigCategory>, IMerge
|
||||
{
|
||||
[BsonElement]
|
||||
[BsonDictionaryOptions(DictionaryRepresentation.ArrayOfArrays)]
|
||||
private Dictionary<int, UnitConfig> dict = new Dictionary<int, UnitConfig>();
|
||||
|
||||
public void Merge(object o)
|
||||
{
|
||||
UnitConfigCategory s = o as UnitConfigCategory;
|
||||
foreach (var kv in s.dict)
|
||||
{
|
||||
this.dict.Add(kv.Key, kv.Value);
|
||||
}
|
||||
}
|
||||
|
||||
public UnitConfig Get(int id)
|
||||
{
|
||||
this.dict.TryGetValue(id, out UnitConfig item);
|
||||
|
||||
if (item == null)
|
||||
{
|
||||
throw new Exception($"配置找不到,配置表名: {nameof (UnitConfig)},配置id: {id}");
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
public bool Contain(int id)
|
||||
{
|
||||
return this.dict.ContainsKey(id);
|
||||
}
|
||||
|
||||
public Dictionary<int, UnitConfig> GetAll()
|
||||
{
|
||||
return this.dict;
|
||||
}
|
||||
|
||||
public UnitConfig GetOne()
|
||||
{
|
||||
if (this.dict == null || this.dict.Count <= 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return this.dict.Values.GetEnumerator().Current;
|
||||
}
|
||||
}
|
||||
|
||||
public partial class UnitConfig: ProtoObject, IConfig
|
||||
{
|
||||
/// <summary>Id</summary>
|
||||
public int Id { get; set; }
|
||||
/// <summary>Type</summary>
|
||||
public int Type { get; set; }
|
||||
/// <summary>名字</summary>
|
||||
public string Name { get; set; }
|
||||
/// <summary>位置</summary>
|
||||
public int Position { get; set; }
|
||||
/// <summary>体重</summary>
|
||||
public int Weight { get; set; }
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 947acfb009d18314896dfdc3311921ba
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fea0fd2e70a98ea43b4cadf76f874c28
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,22 @@
|
||||
using System.Net;
|
||||
|
||||
namespace ET
|
||||
{
|
||||
public partial class StartProcessConfig
|
||||
{
|
||||
public long SceneId;
|
||||
|
||||
public string InnerIP => this.StartMachineConfig.InnerIP;
|
||||
|
||||
public string OuterIP => this.StartMachineConfig.OuterIP;
|
||||
|
||||
public StartMachineConfig StartMachineConfig => StartMachineConfigCategory.Instance.Get(this.MachineId);
|
||||
|
||||
public override void EndInit()
|
||||
{
|
||||
InstanceIdStruct instanceIdStruct = new(0, (uint)this.Id);
|
||||
this.SceneId = instanceIdStruct.ToLong();
|
||||
Log.Info($"StartProcess info: {this.MachineId} {this.Id} {this.SceneId}");
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d21748fcd16e9ba4490731de6fb475b7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,142 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Net;
|
||||
|
||||
namespace ET
|
||||
{
|
||||
public partial class StartSceneConfigCategory
|
||||
{
|
||||
public MultiMap<int, StartSceneConfig> Gates = new();
|
||||
|
||||
public MultiMap<int, StartSceneConfig> ProcessScenes = new();
|
||||
|
||||
public Dictionary<int, StartSceneConfig> NetInners = new();
|
||||
|
||||
public Dictionary<long, Dictionary<string, StartSceneConfig>> ClientScenesByName = new();
|
||||
|
||||
public StartSceneConfig LocationConfig;
|
||||
|
||||
public List<StartSceneConfig> Realms = new();
|
||||
|
||||
public List<StartSceneConfig> Routers = new();
|
||||
|
||||
public List<StartSceneConfig> Robots = new();
|
||||
|
||||
public List<StartSceneConfig> Maps = new();
|
||||
|
||||
public StartSceneConfig Match;
|
||||
|
||||
public List<StartSceneConfig> GetByProcess(int process)
|
||||
{
|
||||
return this.ProcessScenes[process];
|
||||
}
|
||||
|
||||
public StartSceneConfig GetBySceneName(int zone, string name)
|
||||
{
|
||||
return this.ClientScenesByName[zone][name];
|
||||
}
|
||||
|
||||
public override void EndInit()
|
||||
{
|
||||
foreach (StartSceneConfig startSceneConfig in this.GetAll().Values)
|
||||
{
|
||||
this.ProcessScenes.Add(startSceneConfig.Process, startSceneConfig);
|
||||
|
||||
if (!this.ClientScenesByName.ContainsKey(startSceneConfig.Zone))
|
||||
{
|
||||
this.ClientScenesByName.Add(startSceneConfig.Zone, new Dictionary<string, StartSceneConfig>());
|
||||
}
|
||||
this.ClientScenesByName[startSceneConfig.Zone].Add(startSceneConfig.Name, startSceneConfig);
|
||||
|
||||
switch (startSceneConfig.Type)
|
||||
{
|
||||
case SceneType.NetInner:
|
||||
this.NetInners.Add(startSceneConfig.Process, startSceneConfig);
|
||||
break;
|
||||
case SceneType.Realm:
|
||||
this.Realms.Add(startSceneConfig);
|
||||
break;
|
||||
case SceneType.Gate:
|
||||
this.Gates.Add(startSceneConfig.Zone, startSceneConfig);
|
||||
break;
|
||||
case SceneType.Location:
|
||||
this.LocationConfig = startSceneConfig;
|
||||
break;
|
||||
case SceneType.Robot:
|
||||
this.Robots.Add(startSceneConfig);
|
||||
break;
|
||||
case SceneType.Router:
|
||||
this.Routers.Add(startSceneConfig);
|
||||
break;
|
||||
case SceneType.Map:
|
||||
this.Maps.Add(startSceneConfig);
|
||||
break;
|
||||
case SceneType.Match:
|
||||
this.Match = startSceneConfig;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public partial class StartSceneConfig: ISupportInitialize
|
||||
{
|
||||
public ActorId ActorId;
|
||||
|
||||
public SceneType Type;
|
||||
|
||||
public StartProcessConfig StartProcessConfig
|
||||
{
|
||||
get
|
||||
{
|
||||
return StartProcessConfigCategory.Instance.Get(this.Process);
|
||||
}
|
||||
}
|
||||
|
||||
public StartZoneConfig StartZoneConfig
|
||||
{
|
||||
get
|
||||
{
|
||||
return StartZoneConfigCategory.Instance.Get(this.Zone);
|
||||
}
|
||||
}
|
||||
|
||||
// 内网地址外网端口,通过防火墙映射端口过来
|
||||
private IPEndPoint innerIPPort;
|
||||
|
||||
public IPEndPoint InnerIPPort
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.innerIPPort == null)
|
||||
{
|
||||
this.innerIPPort = NetworkHelper.ToIPEndPoint($"{this.StartProcessConfig.InnerIP}:{this.Port}");
|
||||
}
|
||||
|
||||
return this.innerIPPort;
|
||||
}
|
||||
}
|
||||
|
||||
private IPEndPoint outerIPPort;
|
||||
|
||||
// 外网地址外网端口
|
||||
public IPEndPoint OuterIPPort
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.outerIPPort == null)
|
||||
{
|
||||
this.outerIPPort = NetworkHelper.ToIPEndPoint($"{this.StartProcessConfig.OuterIP}:{this.Port}");
|
||||
}
|
||||
|
||||
return this.outerIPPort;
|
||||
}
|
||||
}
|
||||
|
||||
public override void EndInit()
|
||||
{
|
||||
this.ActorId = new ActorId(this.Process, this.Id, 1);
|
||||
this.Type = EnumHelper.FromString<SceneType>(this.SceneType);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2328265af4362554bb7e63612eafcc2e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d062d8a8ef84f66479bef1bec4baeb3a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -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: 78bb986771fe05c4dbd537687d809df5
|
||||
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: 77ca20f99751331479808fb220803c31
|
||||
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: f5da6702a31064c42833a7f9147016ce
|
||||
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: 8fdb6d43fedc543daa3824a136bf364f
|
||||
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: c0d2c0be69c996a4488513ae7ade42f3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "Unity.GenerateServer",
|
||||
"rootNamespace": "",
|
||||
"references": [],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [
|
||||
"IGNORE"
|
||||
],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7142a78e1dbb1f341a7d3920552f7699
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user