Exemplo n.º 1
0
        /// <summary>
        /// Action when a button is released
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected virtual void Pad_Released(object sender, MouseReleaseEntityEventArgs e)
        {
            YnSprite button = sender as YnSprite;

            if (button != null)
            {
                PadButtons direction = GetDirection(button.Name);
                VirtualPadPressedEventArgs vpEvent = new VirtualPadPressedEventArgs(direction);

                OnReleased(vpEvent);
            }
        }
Exemplo n.º 2
0
 private void _virtualPad_Pressed(object sender, VirtualPadPressedEventArgs e)
 {
     _buttons[(int)e.Direction] = true;
 }
Exemplo n.º 3
0
 private void OnReleased(VirtualPadPressedEventArgs e)
 {
     if (VirtualPadReleased != null)
         VirtualPadReleased(this, e);
 }