Esempio n. 1
0
        /// <summary>
        ///     Handles a change in PlayerKeyState.
        /// </summary>
        /// <param name="sender">Sender of the event.</param>
        /// <param name="e">Object containing information about the event.</param>
        public void Handle(object sender, KeyStateChangedEventArgs e)
        {
            var args = new CancelableEventArgs();

            OnHighPriority(sender, args);

            if (!args.IsCanceled)
                OnNormalPriority(sender, args);

            if (!args.IsCanceled)
                OnLowPriority(sender, args);
        }
Esempio n. 2
0
 private void OnNormalPriority(object sender, CancelableEventArgs e)
 {
     if (NormalPriority != null)
         NormalPriority(sender, e);
 }
Esempio n. 3
0
 private void OnLowPriority(object sender, CancelableEventArgs e)
 {
     if (LowPriority != null)
         LowPriority(sender, e);
 }
Esempio n. 4
0
 private void OnHighPriority(object sender, CancelableEventArgs e)
 {
     if (HighPriority != null)
         HighPriority(sender, e);
 }
Esempio n. 5
0
 private void OnLowPriority(object sender, CancelableEventArgs e)
 {
     LowPriority?.Invoke(sender, e);
 }