Example #1
0
 /// <summary>
 /// constructor
 /// </summary>
 public InputMapping(String _action, String _handheld, String _keyboard, WiiButtons _wii)
 {
     action   = _action;
     handheld = _handheld;
     keyboard = _keyboard;
     wii      = _wii;
 }
Example #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);
        }
Example #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;
 }
 /// <summary>
 /// constructor
 /// </summary>
 public InputMapping(String _action, String _handheld, String _keyboard, WiiButtons _wii) {
   action = _action;
   handheld = _handheld;
   keyboard = _keyboard;
   wii = _wii;
 }
    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;
    }