提交示例代码

This commit is contained in:
Bob.Song
2026-03-05 11:39:06 +08:00
commit 25958f58c3
2534 changed files with 209593 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
using Fantasy.Async;
using Fantasy.Network.Interface;
namespace Fantasy.Map;
public class G2M_LoginRequestHandler : RouteRPC<Scene,G2M_LoginRequest, M2G_LoginResponse>
{
protected override async FTask Run(Scene scene, G2M_LoginRequest request, M2G_LoginResponse response, Action reply)
{
var chatInfoTree = ChatTreeFactory.Broadcast(scene).AddendTextNode("您杀死了奥格瑞玛!");
scene.TimerComponent.Net.RepeatedTimer(2000, () =>
{
ChatHelper.SendChatMessage(scene, request.ChatUnitRouteId, chatInfoTree);
});
await FTask.CompletedTask;
}
}