// Use this for initialization
    void Awake()
    {
        Application.SetStackTraceLogType(LogType.Log, StackTraceLogType.None);

        // Update the display text
        textResult.alignment = TextAnchor.UpperCenter;
        instruction.SetActive(false);
        ToggleGestureImage("");

        // Configure AirSig by specifying target
        playerGestureAdd = new AirSigManager.OnPlayerGestureAdd(HandleOnPlayerGestureAdd);
        airsigManager.onPlayerGestureAdd += playerGestureAdd;
        playerGestureMatch = new AirSigManager.OnPlayerGestureMatch(HandleOnPlayerGestureMatch);
        airsigManager.onPlayerGestureMatch += playerGestureMatch;

        EnterGesture(PLAYER_GESTURE_ONE);

        airsigManager.SetTriggerStartKeys(
            AirSigManager.Controller.RIGHT_HAND,
            SteamVR_Controller.ButtonMask.Trigger,
            AirSigManager.PressOrTouch.PRESS);


        airsigManager.SetTriggerStartKeys(
            AirSigManager.Controller.LEFT_HAND,
            SteamVR_Controller.ButtonMask.Touchpad,
            AirSigManager.PressOrTouch.PRESS);
    }
示例#2
0
    // Use this for initialization
    void Awake()
    {
        Application.SetStackTraceLogType(LogType.Log, StackTraceLogType.None);

        // Update the display text
        textResult.alignment = TextAnchor.UpperCenter;
        instruction.SetActive(false);
        ToggleGestureImage("");

        // Configure AirSig by specifying target
        playerGestureAdd = new AirSigManager.OnPlayerGestureAdd(HandleOnPlayerGestureAdd);
        airsigManager.onPlayerGestureAdd += playerGestureAdd;
        playerGestureMatch = new AirSigManager.OnPlayerGestureMatch(HandleOnPlayerGestureMatch);
        airsigManager.onPlayerGestureMatch += playerGestureMatch;

        EnterGesture(PLAYER_GESTURE_ONE);
    }
示例#3
0
    // Use this for initialization
    void Awake()
    {
        Application.SetStackTraceLogType(LogType.Log, StackTraceLogType.None);

        // Registering callback events
        playerSignatureMatch  = new AirSigManager.OnPlayerSignatureMatch(HandleOnPlayerSignatureMatch);
        signatureTrained      = new AirSigManager.OnPlayerSignatureTrained(HandleOnPlayerSignatureTrained);
        playerGestureMatch    = new AirSigManager.OnPlayerGestureMatch(HandleOnPlayerGestureMatch);
        playerGestureAdd      = new AirSigManager.OnPlayerGestureAdd(HandleOnPlayerGestureAdd);
        developerDefined      = new AirSigManager.OnDeveloperDefinedMatch(HandleOnDeveloperDefinedMatch);
        smartDeveloperDefined = new AirSigManager.OnSmartIdentifyDeveloperDefinedMatch(HandleOnSmartDeveloperDefinedMatch);

        airsigManager.onPlayerSignatureMatch               += playerSignatureMatch;
        airsigManager.onPlayerSignatureTrained             += signatureTrained;
        airsigManager.onPlayerGestureMatch                 += playerGestureMatch;
        airsigManager.onPlayerGestureAdd                   += playerGestureAdd;
        airsigManager.onDeveloperDefinedMatch              += developerDefined;
        airsigManager.onSmartIdentifyDeveloperDefinedMatch += smartDeveloperDefined;

        airsigManager.SetMode(availableMode[currentModeIndex]);
        textMode.text = availableMode[currentModeIndex].ToString();
        setModeNone();

        checkDbExist();

        airsigManager.SetTriggerStartKeys(
            AirSigManager.Controller.RIGHT_HAND,
            SteamVR_Controller.ButtonMask.Trigger,
            AirSigManager.PressOrTouch.PRESS);


        airsigManager.SetTriggerStartKeys(
            AirSigManager.Controller.LEFT_HAND,
            SteamVR_Controller.ButtonMask.Touchpad,
            AirSigManager.PressOrTouch.PRESS);
    }