ObjectRemoveRequestHandler.cs 445 B

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