Files
TEngine/Assets/GameScripts/DotNet/Hotfix/Server/Module/RobotCase/ARobotCase.cs
ALEXTANG 336d4b2eb9 [+] 接入ET8服务端
[+] 接入ET8服务端
2023-07-13 12:23:48 +08:00

24 lines
813 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

namespace ET.Server
{
// 这里为什么能定义class呢因为这里只有逻辑热重载后新的handler替换旧的仍然没有问题
[EnableClass]
public abstract class ARobotCase: AInvokeHandler<RobotInvokeArgs, ETTask>
{
protected abstract ETTask Run(RobotCase robotCase);
public override async ETTask Handle(RobotInvokeArgs a)
{
using RobotCase robotCase = await a.Fiber.Root.GetComponent<RobotCaseComponent>().New();
try
{
await this.Run(robotCase);
}
catch (System.Exception e)
{
Log.Error($"{robotCase.Zone()} {e}");
RobotLog.Console($"RobotCase Error {this.GetType().FullName}:\n\t{e}");
}
}
}
}