提交 9b870beb 编写于 作者: T tanghai

命名空间全部改成ET,不再区分ETModel跟ETHotfix

上级 a5e84881
syntax = "proto3";
package ETModel;
package ET;
/// <summary>
/// 传送unit
......
syntax = "proto3";
package ETModel;
package ET;
message C2M_TestRequest // IActorLocationRequest
{
......
......@@ -5,7 +5,7 @@ using System.Threading;
using CommandLine;
using NLog;
namespace ETModel
namespace ET
{
internal static class Program
{
......
using System;
using System.Net;
using ETModel;
namespace ETHotfix
namespace ET
{
[ActorMessageHandler]
public class Actor_TransferHandler : AMActorRpcHandler<Unit, Actor_TransferRequest, Actor_TransferResponse>
......
using System;
using ETModel;
namespace ETHotfix
namespace ET
{
[MessageHandler]
public class C2G_EnterMapHandler : AMRpcHandler<C2G_EnterMap, G2C_EnterMap>
......
using System;
using ETModel;
namespace ETHotfix
namespace ET
{
[MessageHandler]
public class C2G_LoginGateHandler : AMRpcHandler<C2G_LoginGate, G2C_LoginGate>
......
using System;
using ETModel;
namespace ETHotfix
namespace ET
{
[ActorMessageHandler]
public class C2M_TestActorRequestHandler : AMActorLocationRpcHandler<Unit, C2M_TestActorRequest, M2C_TestActorResponse>
......
using System;
using System.Net;
using ETModel;
namespace ETHotfix
namespace ET
{
[MessageHandler]
public class C2R_LoginHandler : AMRpcHandler<C2R_Login, R2C_Login>
......
using ETModel;

using PF;
using UnityEngine;
namespace ETHotfix
namespace ET
{
[ActorMessageHandler]
public class Frame_ClickMapHandler : AMActorLocationHandler<Unit, Frame_ClickMap>
......
using System;
using ETModel;
using PF;
using UnityEngine;
namespace ETHotfix
namespace ET
{
[ActorMessageHandler]
public class G2M_CreateUnitHandler : AMActorRpcHandler<Scene, G2M_CreateUnit, M2G_CreateUnit>
......
using ETModel;

namespace ETHotfix
namespace ET
{
[ActorMessageHandler]
public class G2M_SessionDisconnectHandler : AMActorLocationHandler<Unit, G2M_SessionDisconnect>
......
using System;
using ETModel;
namespace ETHotfix
namespace ET
{
[ActorMessageHandler]
public class M2M_TrasferUnitRequestHandler : AMActorRpcHandler<Scene, M2M_TrasferUnitRequest, M2M_TrasferUnitResponse>
......
using ETModel;

namespace ETHotfix
namespace ET
{
public static class MessageHelper
{
......
using System;
using ETModel;
namespace ETHotfix
namespace ET
{
[ActorMessageHandler]
public class R2G_GetLoginKeyHandler : AMActorRpcHandler<Scene, R2G_GetLoginKey, G2R_GetLoginKey>
......
using System.Collections.Generic;
using ETModel;
namespace ETHotfix
namespace ET
{
public static class RealmGateAddressHelper
{
......
using ETModel;

namespace ETHotfix
namespace ET
{
[ObjectSystem]
public class SessionPlayerComponentDestroySystem : DestroySystem<SessionPlayerComponent>
......
using System.Collections.Generic;
using System.Threading;
using ETModel;
using PF;
using UnityEngine;
namespace ETHotfix
namespace ET
{
public static class UnitPathComponentHelper
{
......
using System;
using ETModel;
namespace ETHotfix
namespace ET
{
// 用来测试消息包含复杂类型,是否产生gc
[MessageHandler]
......
using System;
using ETModel;
namespace ETHotfix
namespace ET
{
[MessageHandler]
public class C2M_ReloadHandler: AMRpcHandler<C2M_Reload, M2C_Reload>
......
using System;
using ETModel;
namespace ETHotfix
namespace ET
{
[MessageHandler]
public class C2R_PingHandler : AMRpcHandler<C2R_Ping, R2C_Ping>
......
using ETModel;

namespace ETHotfix
namespace ET
{
[MessageHandler]
public class G2C_TestHandler: AMHandler<G2C_Test>
......
using System;
using ETModel;
namespace ETHotfix
namespace ET
{
[MessageHandler]
public class M2A_ReloadHandler : AMRpcHandler<M2A_Reload, A2M_Reload>
......
using System;
using System.Reflection;
namespace ETHotfix
namespace ET
{
public static class HotfixHelper
{
......
using System;
using System.Collections.Generic;
using ETModel;
namespace ETHotfix
namespace ET
{
[ObjectSystem]
public class ActorMessageDispatcherComponentAwakeSystem: AwakeSystem<ActorMessageDispatcherComponent>
......
using System;
using ETModel;
namespace ETHotfix
namespace ET
{
[ObjectSystem]
public class ActorMessageSenderComponentAwakeSystem : AwakeSystem<ActorMessageSenderComponent>
......
using System;
using ETModel;
namespace ETHotfix
namespace ET
{
[ObjectSystem]
public class MailBoxComponentAwakeSystem : AwakeSystem<MailBoxComponent>
......
using System;
using ETModel;
namespace ETHotfix
namespace ET
{
[ObjectSystem]
public class ActorLocationSenderComponentAwakeSystem : AwakeSystem<ActorLocationSenderComponent>
......
using System;
using ETModel;
namespace ETHotfix
namespace ET
{
[ObjectSystem]
public class ActorLocationSenderAwakeSystem: AwakeSystem<ActorLocationSender>
......
using System;
using ETModel;
namespace ETHotfix
namespace ET
{
[ObjectSystem]
public class LocationProxyComponentSystem : AwakeSystem<LocationProxyComponent>
......
using System;
using ETModel;
namespace ETHotfix
namespace ET
{
[ActorMessageHandler]
public class ObjectAddRequestHandler : AMActorRpcHandler<Scene, ObjectAddRequest, ObjectAddResponse>
......
using System;
using ETModel;
namespace ETHotfix
namespace ET
{
[ActorMessageHandler]
public class ObjectGetRequestHandler : AMActorRpcHandler<Scene, ObjectGetRequest, ObjectGetResponse>
......
using System;
using ETModel;
namespace ETHotfix
namespace ET
{
[ActorMessageHandler]
public class ObjectLockRequestHandler : AMActorRpcHandler<Scene, ObjectLockRequest, ObjectLockResponse>
......
using System;
using ETModel;
namespace ETHotfix
namespace ET
{
[ActorMessageHandler]
public class ObjectRemoveRequestHandler : AMActorRpcHandler<Scene, ObjectRemoveRequest, ObjectRemoveResponse>
......
using System;
using ETModel;
namespace ETHotfix
namespace ET
{
[ActorMessageHandler]
public class ObjectUnLockRequestHandler : AMActorRpcHandler<Scene, ObjectUnLockRequest, ObjectUnLockResponse>
......
using System;
using System.Net;
using System.Threading.Tasks;
using ETModel;
namespace ETHotfix
namespace ET
{
[ObjectSystem]
public class BenchmarkComponentSystem : AwakeSystem<BenchmarkComponent, string>
......
using System;
using ETModel;
namespace ETHotfix
namespace ET
{
[ObjectSystem]
public class WebSocketBenchmarkComponentSystem : AwakeSystem<WebSocketBenchmarkComponent, string>
......
using System;
using System.Collections.Generic;
using ETModel;
namespace ETHotfix
namespace ET
{
[ObjectSystem]
public class ConfigAwakeSystem : AwakeSystem<ConfigComponent>
......
......@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq.Expressions;
using MongoDB.Driver;
namespace ETModel
namespace ET
{
[ObjectSystem]
public class DBComponentAwakeSystem : AwakeSystem<DBComponent, string, string>
......
using ETModel;

namespace ETHotfix
namespace ET
{
public class InnerMessageDispatcher: IMessageDispatcher
{
......
using ETModel;

namespace ETHotfix
namespace ET
{
public static class InnerMessageDispatcherHelper
{
......
using System;
using System.Collections.Generic;
using ETModel;
namespace ETHotfix
namespace ET
{
[ObjectSystem]
public class MessageDispatcherComponentAwakeSystem : AwakeSystem<MessageDispatcherComponent>
......
using ETModel;

namespace ETHotfix
namespace ET
{
[ObjectSystem]
public class NetInnerComponentAwakeSystem : AwakeSystem<NetInnerComponent>
......
using ETModel;

namespace ETHotfix
namespace ET
{
public class OuterMessageDispatcher: IMessageDispatcher
{
......
using ETModel;
namespace ETHotfix
namespace ET
{
[Event(EventIdType.AfterScenesAdd)]
public class AfterScenesAdd_CreateScene: AEvent
......
using ETModel;
namespace ETHotfix
namespace ET
{
public static class SceneFactory
{
......
......@@ -21,6 +21,12 @@
<Compile Include="..\..\Unity\Assets\Hotfix\Module\Message\NetOuterComponentSystem.cs">
<Link>Module\Message\NetOuterComponentSystem.cs</Link>
</Compile>
<Compile Include="..\..\Unity\Assets\Hotfix\Module\Numeric\NumericChangeEvent_NotifyWatcher.cs">
<Link>Module\Numeric\NumericChangeEvent_NotifyWatcher.cs</Link>
</Compile>
<Compile Include="..\..\Unity\Assets\Hotfix\Module\Numeric\NumericWatcher_Hp_ShowUI.cs">
<Link>Module\Numeric\NumericWatcher_Hp_ShowUI.cs</Link>
</Compile>
<EmbeddedResource Remove="Other\**" />
<None Remove="Other\**" />
</ItemGroup>
......
namespace ETModel
namespace ET
{
public static class EventIdType
{
......
using System.IO;
using System.Reflection;
namespace ETModel
namespace ET
{
public static class DllHelper
{
......
using System;
namespace ETModel
namespace ET
{
public static class JsonHelper
{
......
using System;
namespace ETModel
namespace ET
{
public static class Log
{
......
namespace ETModel
namespace ET
{
public enum LogType
{
......
namespace ETModel
namespace ET
{
public interface ILog
{
......
using NLog;
namespace ETModel
namespace ET
{
public class NLogAdapter: ILog
{
......
namespace ETModel
namespace ET
{
public interface IDBCollection
{
......
using System.Collections.Generic;
using MongoDB.Bson.Serialization.Attributes;
namespace ETModel
{
/// <summary>
/// Key Value组件用于保存一些数据
/// </summary>
public class KVComponent: Entity
{
[BsonElement]
private readonly Dictionary<string, object> kv = new Dictionary<string, object>();
public void Add(string key, object value)
{
this.kv.Add(key, value);
}
public void Remove(string key)
{
this.kv.Remove(key);
}
public T Get<T>(string key)
{
if (!this.kv.TryGetValue(key, out object k))
{
return default(T);
}
return (T) k;
}
public override void Dispose()
{
if (this.IsDisposed)
{
return;
}
base.Dispose();
}
}
}
\ No newline at end of file
using System;
using CommandLine;
namespace ETModel
{
[ObjectSystem]
public class OptionComponentSystem : AwakeSystem<OptionComponent, string[]>
{
public override void Awake(OptionComponent self, string[] a)
{
self.Awake(a);
}
}
public class OptionComponent : Entity
{
public Options Options { get; set; }
public void Awake(string[] args)
{
Parser.Default.ParseArguments<Options>(args)
.WithNotParsed(error => throw new Exception($"命令行格式错误!"))
.WithParsed(options => { Options = options; });
}
}
}
namespace ETModel
{
public class RobotComponent: Entity
{
public override void Dispose()
{
if (this.IsDisposed)
{
return;
}
base.Dispose();
}
}
}
\ No newline at end of file
namespace ETModel
namespace ET
{
[Config]
public partial class StartProcessConfigCategory : ACategory<StartProcessConfig>
......
namespace ETModel
namespace ET
{
[Config]
public partial class StartSceneConfigCategory : ACategory<StartSceneConfig>
......
namespace ETModel
namespace ET
{
[Config]
public partial class StartZoneConfigCategory : ACategory<StartZoneConfig>
......
namespace ETModel
namespace ET
{
[Config]
public partial class UnitConfigCategory : ACategory<UnitConfig>
......
using System.ComponentModel;
namespace ETModel
namespace ET
{
public partial class StartProcessConfigCategory : ISupportInitialize
public partial class StartProcessConfigCategory
{
public void EndInit()
public override void EndInit()
{
}
}
......
using System.Collections.Generic;
using System.ComponentModel;
namespace ETModel
namespace ET
{
public partial class StartSceneConfigCategory: ISupportInitialize
public partial class StartSceneConfigCategory
{
public MultiMap<int, StartSceneConfig> Gates = new MultiMap<int, StartSceneConfig>();
......@@ -23,7 +23,7 @@ namespace ETModel
return this.ZoneScenesByName[zone][name];
}
public void EndInit()
public override void EndInit()
{
foreach (StartSceneConfig startSceneConfig in this.GetAll().Values)
{
......
using System.Collections.Generic;
namespace ETModel
namespace ET
{
public class GateSessionKeyComponent : Entity
{
......
......@@ -2,7 +2,7 @@ using System;
using System.Threading;
using UnityEngine;
namespace ETModel
namespace ET
{
public class MoveComponent: Entity
{
......
namespace ETModel
namespace ET
{
[ObjectSystem]
public class PlayerSystem : AwakeSystem<Player, string>
......
using System.Collections.Generic;
using System.Linq;
namespace ETModel
namespace ET
{
[ObjectSystem]
public class PlayerComponentSystem : AwakeSystem<PlayerComponent>
......
namespace ETModel
namespace ET
{
public class SessionInfoComponent : Entity
{
......
namespace ETModel
namespace ET
{
public class SessionPlayerComponent : Entity
{
......
using PF;
using UnityEngine;
namespace ETModel
namespace ET
{
public enum UnitType
{
......
......@@ -3,7 +3,7 @@ using System.Linq;
using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Bson.Serialization.Options;
namespace ETModel
namespace ET
{
public class UnitComponent: Entity
{
......
namespace ETModel
namespace ET
{
[ObjectSystem]
public class UnitGateComponentAwakeSystem : AwakeSystem<UnitGateComponent, long>
......
......@@ -3,7 +3,7 @@ using System.Threading;
using PF;
using UnityEngine;
namespace ETModel
namespace ET
{
public class UnitPathComponent: Entity
{
......
using System;
namespace ETModel
namespace ET
{
public abstract class AMActorHandler<E, Message>: IMActorHandler where E: Entity where Message : class, IActorMessage
{
......
using System;
namespace ETModel
namespace ET
{
public abstract class AMActorRpcHandler<E, Request, Response>: IMActorHandler where E: Entity where Request: class, IActorRequest where Response : class, IActorResponse
{
......
using System;
namespace ETModel
namespace ET
{
public class ActorMessageAttribute : Attribute
{
......
using System;
using System.Collections.Generic;
namespace ETModel
namespace ET
{
/// <summary>
/// Actor消息分发组件
......
namespace ETModel
namespace ET
{
public class ActorMessageHandlerAttribute : BaseAttribute
{
......
using System;
namespace ETModel
namespace ET
{
// 知道对方的instanceId,使用这个类发actor消息
public struct ActorMessageSender
......
using System.Collections.Generic;
namespace ETModel
namespace ET
{
public class ActorMessageSenderComponent: Entity
{
......
namespace ETModel
namespace ET
{
/// <summary>
/// actor RPC消息响应
......
namespace ETModel
namespace ET
{
public struct ActorTask
{
......
using System;
namespace ETModel
namespace ET
{
public interface IMActorHandler
{
......
namespace ETModel
namespace ET
{
/// <summary>
/// 挂上这个组件表示该Entity是一个Actor,接收的消息将会队列处理
......
namespace ETModel
namespace ET
{
public enum MailboxType
{
......
using System;
namespace ETModel
namespace ET
{
public abstract class AMActorLocationHandler<E, Message>: IMActorHandler where E: Entity where Message : class, IActorLocationMessage
{
......
using System;
namespace ETModel
namespace ET
{
public abstract class AMActorLocationRpcHandler<E, Request, Response>: IMActorHandler where E: Entity where Request: class, IActorLocationRequest where Response : class, IActorLocationResponse
{
......
namespace ETModel
namespace ET
{
// 知道对方的Id,使用这个类发actor消息
public class ActorLocationSender : Entity
......
using System;
namespace ETModel
namespace ET
{
public class ActorLocationSenderComponent: Entity
{
......
using System;
using System.Collections.Generic;
namespace ETModel
namespace ET
{
[ObjectSystem]
public class LockInfoAwakeSystem : AwakeSystem<LockInfo, long, CoroutineLock>
......
using System.Net;
namespace ETModel
namespace ET
{
public class LocationProxyComponent : Entity
{
......
namespace ETModel
namespace ET
{
public class BenchmarkComponent: Entity
{
......
namespace ETModel
namespace ET
{
public class WebSocketBenchmarkComponent: Entity
{
......
using System;
using System.Collections.Generic;
namespace ETModel
namespace ET
{
/// <summary>
/// Config组件会扫描所有的有ConfigAttribute标签的配置,加载进来
......
using System;
using System.IO;
namespace ETModel
namespace ET
{
public static class ConfigHelper
{
......
......@@ -2,7 +2,7 @@ using System;
using System.Threading;
using System.Threading.Tasks;
namespace ETModel
namespace ET
{
[ObjectSystem]
public class ConsoleComponentAwakeSystem : StartSystem<ConsoleComponent>
......
......@@ -3,7 +3,7 @@ using System.Threading;
using Microsoft.CodeAnalysis.CSharp.Scripting;
using Microsoft.CodeAnalysis.Scripting;
namespace ETModel
namespace ET
{
[ObjectSystem]
public class ReplComponentAwakeSystem : AwakeSystem<ReplComponent>
......
......@@ -2,7 +2,7 @@
using System.Text;
using MongoDB.Driver;
namespace ETModel
namespace ET
{
/// <summary>
/// 用来缓存数据
......
using System;
namespace ETModel
namespace ET
{
public abstract class AMRpcHandler<Request, Response>: IMHandler where Request : class, IRequest where Response : class, IResponse
{
......
using ETModel;
using System.Collections.Generic;
namespace ETModel
namespace ET
{
/// <summary>
/// 传送unit
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册