Пример #1
0
 /// <summary>
 /// constructor
 /// </summary>
 public InputMapping(String _action, String _handheld, String _keyboard, WiiButtons _wii)
 {
     action   = _action;
     handheld = _handheld;
     keyboard = _keyboard;
     wii      = _wii;
 }
Пример #2
0
        bool GetWiiButton(WiiButtons btn)
        {
            if (remote != null)
            {
                switch (btn)
                {
                case WiiButtons.WII_BUTTON_1:
                    return(remote.Button.one);

                case WiiButtons.WII_BUTTON_2:
                    return(remote.Button.two);

                case WiiButtons.WII_BUTTON_A:
                    return(remote.Button.a);

                case WiiButtons.WII_BUTTON_B:
                    return(remote.Button.b);

                case WiiButtons.WII_BUTTON_PLUS:
                    return(remote.Button.plus);

                case WiiButtons.WII_BUTTON_MINUS:
                    return(remote.Button.minus);

                case WiiButtons.WII_BUTTON_HOME:
                    return(remote.Button.home);
                }
            }

            return(false);
        }
Пример #3
0
 void Start()
 {
     wiiButtons   = new WiiButtons();
     clicked      = new WiiButtons();
     buttons      = clicked;
     clicked.one  = false;
     clicked.a    = false;
     clicked.b    = false;
     clicked.home = false;
     wiiDetected  = false;
 }
Пример #4
0
 /// <summary>
 /// constructor
 /// </summary>
 public InputMapping(String _action, String _handheld, String _keyboard, WiiButtons _wii) {
   action = _action;
   handheld = _handheld;
   keyboard = _keyboard;
   wii = _wii;
 }
Пример #5
0
    bool GetWiiButton(WiiButtons btn) {
      if (remote != null) {
        switch(btn) {
        case WiiButtons.WII_BUTTON_1:
          return remote.Button.one;
        case WiiButtons.WII_BUTTON_2:
          return remote.Button.two;
        case WiiButtons.WII_BUTTON_A:
          return remote.Button.a;
        case WiiButtons.WII_BUTTON_B:
          return remote.Button.b;
        case WiiButtons.WII_BUTTON_PLUS:
          return remote.Button.plus;
        case WiiButtons.WII_BUTTON_MINUS:
          return remote.Button.minus;
        case WiiButtons.WII_BUTTON_HOME:
          return remote.Button.home;
        }
      }

      return false;
    }