Control.cs 637 B

12345678910111213141516171819202122232425262728
  1. using System.Collections.Generic;
  2. namespace UnityEditor.Timeline
  3. {
  4. class Control
  5. {
  6. readonly List<Manipulator> m_Manipulators = new List<Manipulator>();
  7. public bool HandleManipulatorsEvents(WindowState state)
  8. {
  9. var isHandled = false;
  10. foreach (var manipulator in m_Manipulators)
  11. {
  12. isHandled = manipulator.HandleEvent(state);
  13. if (isHandled)
  14. break;
  15. }
  16. return isHandled;
  17. }
  18. public void AddManipulator(Manipulator m)
  19. {
  20. m_Manipulators.Add(m);
  21. }
  22. }
  23. }