ObjectAddRequestHandler.cs 507 B

1234567891011121314151617
  1. using System;
  2. namespace ET.Server
  3. {
  4. [ActorMessageHandler(SceneType.Location)]
  5. public class ObjectAddRequestHandler: AMActorRpcHandler<Scene, ObjectAddRequest, ObjectAddResponse>
  6. {
  7. protected override async ETTask Run(Scene scene, ObjectAddRequest request, ObjectAddResponse response, Action reply)
  8. {
  9. await scene.GetComponent<LocationComponent>().Add(request.Key, request.InstanceId);
  10. reply();
  11. await ETTask.CompletedTask;
  12. }
  13. }
  14. }