예제 #1
0
 public virtual void Update(Scene scene)
 {
     Ticks++;
     foreach (var handler in SubMenuHandlers.OrderBy(x => x.UpdatePriority))
     {
         handler.Update(scene);
     }
 }
예제 #2
0
 public virtual void HandleInput(Scene scene)
 {
     InputBlocked = false;
     foreach (var handler in SubMenuHandlers.OrderBy(x => x.InputPriority))
     {
         handler.HandleInput(scene);
         if (handler.IsOpen && handler.BlocksInput)
         {
             InputBlocked = true;
             break;
         }
     }
 }
예제 #3
0
 public IEnumerable <Menu> GetAllMenus()
 {
     return(new[] { this }.Concat(SubMenuHandlers.Where(x => x.IsOpen).SelectMany(x => x.InternalMenu.GetAllMenus())).Where(x => x != null));
 }