예제 #1
0
 /// <summary>
 /// A shortcut to cancel and deactivate the menu.
 /// </summary>
 /// <param name="manager"></param>
 public virtual void CancelAndDeactivate(UIManager manager)
 {
     if (Cancelable)
     {
         manager.Deactivate();
         Cancel();
     }
 }
예제 #2
0
        public override void HandleInput(UIManager manager) {
            base.HandleInput(manager);

            if (manager.Left.Pressed) {
                Counter.Decrement();
                ItemSwitched();
            }
            if (manager.Right.Pressed) {
                Counter.Increment();
                ItemSwitched();
            }
            if (manager.A.Pressed) {
                Trigger();
                manager.Deactivate();
            }
            if (manager.B.Pressed) {
                CancelAndDeactivate(manager);
            }
        }
예제 #3
0
        public override void HandleInput(UIManager manager)
        {
            base.HandleInput(manager);

            if (manager.Left.Pressed)
            {
                Counter.Decrement();
                ItemSwitched();
            }
            if (manager.Right.Pressed)
            {
                Counter.Increment();
                ItemSwitched();
            }
            if (manager.A.Pressed)
            {
                Trigger();
                manager.Deactivate();
            }
            if (manager.B.Pressed)
            {
                CancelAndDeactivate(manager);
            }
        }
예제 #4
0
 /// <summary>
 /// A shortcut to trigger and deactivate the menu.
 /// </summary>
 /// <param name="manager"></param>
 public virtual void TriggerAndDeactivate(UIManager manager)
 {
     Trigger();
     manager.Deactivate();
 }