示例#1
0
        internal bool IsButtonPressed(WiimoteButton button)
        {
            switch (button)
            {
            case (WiimoteButton.A):
                return(Wiimote.WiimoteState.ButtonState.A);

            case (WiimoteButton.B):
                return(Wiimote.WiimoteState.ButtonState.B);

            case (WiimoteButton.Left):
                return(Wiimote.WiimoteState.ButtonState.Left);

            case (WiimoteButton.Right):
                return(Wiimote.WiimoteState.ButtonState.Right);

            case (WiimoteButton.Down):
                return(Wiimote.WiimoteState.ButtonState.Down);

            case (WiimoteButton.Up):
                return(Wiimote.WiimoteState.ButtonState.Up);

            case (WiimoteButton.Home):
                return(Wiimote.WiimoteState.ButtonState.Home);

            case (WiimoteButton.Plus):
                return(Wiimote.WiimoteState.ButtonState.Plus);

            case (WiimoteButton.Minus):
                return(Wiimote.WiimoteState.ButtonState.Minus);

            case (WiimoteButton.One):
                return(Wiimote.WiimoteState.ButtonState.One);

            case (WiimoteButton.Two):
                return(Wiimote.WiimoteState.ButtonState.Two);
            }
            return(false);
        }
示例#2
0
 public void executeButtonDown(WiimoteButton button)
 {
     this.executeButtonDown(button.ToString());
 }
示例#3
0
 public void executeButtonUp(WiimoteButton button)
 {
     this.executeButtonUp(button.ToString());//ToString converts WiimoteButton.A to "A" for instance
 }
示例#4
0
 public void executeButtonDown(WiimoteButton button)
 {
     this.executeButtonDown(button.ToString());
 }
示例#5
0
 public void executeButtonUp(WiimoteButton button)
 {
     this.executeButtonUp(button.ToString());//ToString converts WiimoteButton.A to "A" for instance
 }