示例#1
0
        public override bool Initialize()
        {
            //Buttons
            _backButton = new MorphControllerButton("Back");

            _primaryIndexTrigger = new MorphControllerTriggerButton("PrimaryIndexTrigger");
            _primaryIndexTrigger.TriggerValueChanged += ListenTriggerValue; //Listen for select & grab

            _buttons = new MorphFeatureButtons(
                new IMorphControllerButton[]
            {
                _backButton
            },
                new IMorphControllerTriggerButton[]
            {
                _primaryIndexTrigger
            });

            //Touchpad
            _primaryTouchpad = new MorphTouchpad();
            _primaryTouchpad.TouchpadClicked += ListenTouchpadClicked; //Listen touchpad for select & grab

            _touchpads = new MorphFeatureTouchpads(new IMorphTouchpad[]
            {
                _primaryTouchpad
            });

            //Gestures
            SwipeGesture = new MorphOculusControllerGestureSwipe(TrackedRemote.m_controller);

            _gestures = new MorphFeatureGestures(new IMorphControllerGesture[] { SwipeGesture });

            return(base.Initialize());
        }
示例#2
0
        public override bool Initialize()
        {
            _leftButton   = new MorphControllerButton("Left button");
            _rightButton  = new MorphControllerButton("Right button");
            _middleButton = new MorphControllerButton("Middle button");

            _buttons = new MorphFeatureButtons(new IMorphControllerButton[]
            {
                _leftButton,
                _rightButton,
                _middleButton
            });

            return(base.Initialize());
        }