Beispiel #1
0
        // Use this for initialization
        void Awake()
        {
            keyPool = transform.Find("KeyPool").GetComponent <ObjectPool>();
            keys    = new Deque <Key>(HalfKeys * 2 + 1);

            selectedTransform = transform.Find("SelectedTransform");
            clipTop           = transform.Find("ClipTop");
            clipBottom        = transform.Find("ClipBottom");

            selectorHandle = transform.Find("SelectorHandle").GetComponent <VRTK_InteractableObject>();
            selectorHandle.InteractableObjectUngrabbed += OnHandleUngrabbed;

            selectorFrame = transform.Find("NoteSelectorFrame");
            noteDisplay   = selectorFrame.Find("Canvas").Find("NoteDisplay").GetComponent <Text>();

            leftHandFrame  = transform.Find("LeftHandFrame");
            rightHandFrame = transform.Find("RightHandFrame");

            targetHand = SDK_BaseController.ControllerHand.None;

            noteArgs = new NoteSelectionEventArgs(60);
        }
Beispiel #2
0
 private void OnNoteSelectionChanged(object sender, NoteSelectionEventArgs args)
 {
     SetRootNote(args.Note);
     StartCoroutine(PreviewSelection());
 }