ShowDeviceEvent.cs 587 B

1234567891011121314151617181920212223242526
  1. using Blue;
  2. using UnityEngine;
  3. /// <summary>
  4. /// ShowDevice获取位置事件
  5. /// </summary>
  6. public struct ShowDeviceEvent : IEvent
  7. {
  8. public Transform ShowDeviceTransform;
  9. }
  10. /// <summary>
  11. /// ShowDevice获取位置命令
  12. /// </summary>
  13. public class ShowDeviceCommand : ICommand
  14. {
  15. private Transform showDeviceTransform;
  16. public ShowDeviceCommand(Transform showDeviceTransform)
  17. {
  18. this.showDeviceTransform = showDeviceTransform;
  19. }
  20. public void OnExcute()
  21. {
  22. this.SendEvent(new ShowDeviceEvent(){ShowDeviceTransform = showDeviceTransform});
  23. }
  24. }