ObjectRemoveRequestHandler.cs 421 B

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