Beispiel #1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            Console?.Log("Window loaded.");
            Config = LoadDefaultConfig();

            NotifyIcon             = new NotifyIcon();
            NotifyIcon.ShowWindow += NotifyIcon_ShowWindow;

            API         = new API();
            API.Output += Console.Log;

            Driver         = new Driver(API);
            Driver.Output += Console.Log;
            Driver.Status += StatusUpdate;

            Screen   = new Screen();
            Touchpad = new Touchpad(API);

            DesktopRes  = Screen.Bounds;
            TouchpadRes = Touchpad.Bounds;

            ScreenMapArea.BackgroundArea   = DesktopRes;
            TouchpadMapArea.BackgroundArea = TouchpadRes;
            ScreenMapArea.ForegroundArea   = Config.Screen;
            TouchpadMapArea.ForegroundArea = Config.Touchpad;

            StartButton.IsEnabled = API.IsAvailable;
            if (!API.IsAvailable)
            {
                Console.Log(API, "API is unavailable. Please install Synaptics Pointing Device drivers.");
            }
        }
    bool isFiring;                                                   //Is the player currently firing

    //Reset() defines the default values for properties in the inspector
    void Reset()
    {
        //Grab the needed component references
        playerMovement = GetComponent <PlayerMovement>();
        playerAttack   = GetComponent <PlayerAttack>();
        //Find an instance of the PauseMenu and Touchpad scripts in the scene
        pauseMenu = FindObjectOfType <PauseMenu>();
        touchPad  = FindObjectOfType <Touchpad>();
    }
Beispiel #3
0
 private void AddMovementComponents(VRLocomotionRig a_vrLR)
 {
     a_vrLR.s_head.gameObject.AddComponent <SteamVR_UpdatePoses>();
     m_headBob  = a_vrLR.s_head.gameObject.AddComponent <HeadBob>();  // Adds the HeadBob movement logic component
     m_armSwing = a_vrLR.s_head.gameObject.AddComponent <ArmSwing>(); // Adds the ArmSwing movement logic component
     m_pulley   = a_vrLR.s_head.gameObject.AddComponent <Pulley>();   // Adds the Pulley movement logic component
     m_tPad     = a_vrLR.s_head.gameObject.AddComponent <Touchpad>();
     // DEVELOPER: ADD YOUR OWN CUSTOM VR MOVEMENT COMPONENT HERE!
 }
Beispiel #4
0
        protected override void OnInit()
        {
            _btnSetting   = GetChildComponent <Button>("BtnSetting");
            _stage        = StageMgr.Ins.Switch <GameStage>();
            _moveJoystick = GetChildComponent <Joystick>("Joystick");
            //_moveJoystick.uiCamera = GameObject.Find("UICamera").GetComponent<Camera>();
            _signTouchpad = GetChildComponent <Touchpad>("Touchpad");

            _btnAtk = GetChildComponent <Button>("BtnAtk");
            _btnDef = GetChildComponent <Button>("BtnDef");
        }
Beispiel #5
0
        private static void Main(string[] args)
        {
            Mouse mouse = new Mouse();

            mouse.PointerScreenPosition();

            Touchpad touchpad = new Touchpad();

            touchpad.PointerScreenPosition();

            WebCamera webCamera = new WebCamera();
            WebCameraToIPointerDeviceAdapter cameraAdapter = new WebCameraToIPointerDeviceAdapter(webCamera);

            cameraAdapter.PointerScreenPosition();
        }
Beispiel #6
0
 public Driver(API api, Area screen, Area touchpad, Touchpad device) : this(api, screen, touchpad)
 {
     TouchpadDevice = device;
 }
Beispiel #7
0
 public static bool GetUp(AirVRCameraRig cameraRig, Touchpad.Button button)
 {
     return(GetButtonUp(cameraRig, AirVRInputDeviceName.Touchpad, Touchpad.ParseControlID(button)));
 }
Beispiel #8
0
 public static Vector2 Get(AirVRCameraRig cameraRig, Touchpad.Axis2D axis)
 {
     return(GetAxis2D(cameraRig, AirVRInputDeviceName.Touchpad, Touchpad.ParseControlID(axis)));
 }