123456789101112131415161718 |
- using System;
- namespace ET.Server
- {
- [ActorMessageHandler(SceneType.Game)]
- public class R2G_GetLoginKeyHandler : AMActorRpcHandler<Scene, R2G_GetLoginKey, G2R_GetLoginKey>
- {
- protected override async ETTask Run(Scene scene, R2G_GetLoginKey request, G2R_GetLoginKey response)
- {
- long key = RandomGenerator.RandInt64();
- scene.GetComponent<GameSessionKeyComponent>().Add(key, request.Account);
- response.Key = key;
- response.GateId = scene.Id;
- await ETTask.CompletedTask;
- }
- }
- }
|