Ejemplo n.º 1
0
    private void Start()
    {
        if (keyboard == null)
        {
            throw new System.Exception("You must set a keyboard!");
        }
        if (moneyPouch == null)
        {
            throw new System.Exception("You must set a money pouch!");
        }
        if (coinBag == null)
        {
            throw new System.Exception("You must set a coin bag!");
        }

        /* Get the keyboard display */
        keyboardDisplay = keyboard.GetComponentInChildren <KeyboardDisplay>();
        Debug.Assert(keyboardDisplay != null);

        /* Doesn't show keypad because we aren't withdrawing */
        isWithdrawing = false;

        /* Disable the keyboard for now */
        keyboard.gameObject.SetActive(false);
        /* Add our callback */
        keyboard.keyPressed += KeyPressed;
    }
 // Use this for initialization
 void Start()
 {
     GetComponent <VRTK_ControllerEvents>().TouchpadPressed += new ControllerInteractionEventHandler(DoTouchpadPressed);
     trackedObj          = GetComponent <SteamVR_TrackedObject>();
     speechDisplayWidget = speechToTextHolder.GetComponent(typeof(SpeechDisplayWidget)) as SpeechDisplayWidget;
     keyboardDisplay     = displayHolder.GetComponent(typeof(KeyboardDisplay)) as KeyboardDisplay;
     controllerKeyboard  = controllerKeyboardHolder.GetComponent(typeof(ControllerKeyboard)) as ControllerKeyboard;
 }