ObjectRemoveRequestHandler.cs 436 B

12345678910111213141516
  1. using System;
  2. using ETModel;
  3. namespace ETHotfix
  4. {
  5. [MessageHandler]
  6. public class ObjectRemoveRequestHandler : AMActorRpcHandler<Scene, ObjectRemoveRequest, ObjectRemoveResponse>
  7. {
  8. protected override async ETTask Run(Scene scene, ObjectRemoveRequest request, ObjectRemoveResponse response, Action reply)
  9. {
  10. await scene.GetComponent<LocationComponent>().Remove(request.Key);
  11. reply();
  12. await ETTask.CompletedTask;
  13. }
  14. }
  15. }