コード例 #1
0
        // Utility
        public static void GetState(ref NpadState pOutValue, NpadId npadId, NpadStyle npadStyle)
        {
            NpadButton preButtons = pOutValue.buttons;

            switch (npadStyle)
            {
            case NpadStyle.FullKey:
                NpadFullKey.GetState(ref pOutValue, npadId);
                break;

            case NpadStyle.Handheld:
                NpadHandheld.GetState(ref pOutValue, npadId);
                break;

            case NpadStyle.JoyDual:
                NpadJoyDual.GetState(ref pOutValue, npadId);
                break;

            case NpadStyle.JoyLeft:
                NpadJoyLeft.GetState(ref pOutValue, npadId);
                break;

            case NpadStyle.JoyRight:
                NpadJoyRight.GetState(ref pOutValue, npadId);
                break;
            }
            pOutValue.preButtons = preButtons;
        }
コード例 #2
0
    void Start()
    {
        nn.account.Account.Initialize();
        nn.account.UserHandle userHandle = new nn.account.UserHandle();

        nn.account.Account.OpenPreselectedUser(ref userHandle);
        nn.account.Account.GetUserId(ref userId, userHandle);

        nn.Result result = nn.fs.SaveData.Mount(mountName, userId);
        result.abortUnlessSuccess();

        filePath = string.Format("{0}:/{1}", mountName, fileName);

        nn.hid.Npad.Initialize();
        nn.hid.Npad.SetSupportedStyleSet(nn.hid.NpadStyle.Handheld | nn.hid.NpadStyle.JoyDual);
        nn.hid.Npad.SetSupportedIdType(npadIds);
        npadState = new nn.hid.NpadState();
    }
コード例 #3
0
    void Start()
    {
        // textComponent = GameObject.Find("/Canvas/Text").GetComponent<UnityEngine.UI.Text>();

        nn.account.Account.Initialize();
        nn.account.UserHandle userHandle = new nn.account.UserHandle();

        nn.account.Account.OpenPreselectedUser(ref userHandle);
        nn.account.Account.GetUserId(ref userId, userHandle);

        nn.Result result = nn.fs.SaveData.Mount(mountName, userId);
        result.abortUnlessSuccess();

        filePath = string.Format("{0}:/{1}", mountName, fileName);
        Load();

        nn.hid.Npad.Initialize();
        nn.hid.Npad.SetSupportedStyleSet(nn.hid.NpadStyle.Handheld | nn.hid.NpadStyle.JoyDual);
        nn.hid.Npad.SetSupportedIdType(npadIds);
        npadState = new nn.hid.NpadState();
    }
コード例 #4
0
        public static extern Result GetControllerColor(ref NpadControllerColor pOutLeftColor, ref NpadControllerColor pOutRightColor, NpadId npadId); // 0x00A1A320-0x00A1A340

        public static void GetState(ref NpadState pOutValue, NpadId npadId, NpadStyle npadStyle)
        {
        }                                                                                                   // 0x00A1A340-0x00A1A3F0
コード例 #5
0
 public static extern void GetState(ref NpadState pOutValue, NpadId npadId);
コード例 #6
0
ファイル: NpadJoyLeft.cs プロジェクト: tech-ticks/RTDXTools
 public static extern void GetState(ref NpadJoyLeftState pOutValue, NpadId npadId);                 // 0x00A1BD40-0x00A1BD50
 public static extern void GetState(ref NpadState pOutValue, NpadId npadId);                        // 0x00A1A420-0x00A1A430