/** Main
         */
        public static bool Main()
        {
            UnityEngine.InputSystem.Mouse t_device = UnityEngine.InputSystem.Mouse.current;
            if (t_device != null)
            {
                //is_focus
                bool t_is_focus = Fee.Input.Input.GetInstance().is_focus;

                //デバイス。
                int t_x = (int)t_device.scroll.ReadValue().x;
                int t_y = (int)t_device.scroll.ReadValue().y;

                //設定。
                if (t_is_focus == true)
                {
                    Fee.Input.Input.GetInstance().mouse.mouse_wheel.Set(t_x, t_y);
                }
                else
                {
                    Fee.Input.Input.GetInstance().mouse.mouse_wheel.Set(0, 0);
                }

                //debugview
                                #if (UNITY_EDITOR) || (DEVELOPMENT_BUILD) || (USE_DEF_FEE_DEBUGTOOL)
                {
                    Fee.Input.Input.GetInstance().debugview.mouse_wheel = "Mouse_MouseWheel_InputSystem_Mouse";
                }
                                #endif

                return(true);
            }

            return(false);
        }
Exemple #2
0
        /** Main
         */
        public static bool Main()
        {
            UnityEngine.InputSystem.Mouse t_device = UnityEngine.InputSystem.Mouse.current;
            if (t_device != null)
            {
                //is_focus
                bool t_is_focus = Fee.Input.Input.GetInstance().is_focus;

                //デバイス。
                bool t_l_on = t_device.leftButton.isPressed;
                bool t_r_on = t_device.rightButton.isPressed;
                bool t_m_on = t_device.middleButton.isPressed;

                //設定。
                Fee.Input.Input.GetInstance().mouse.left.Set(t_l_on & t_is_focus);
                Fee.Input.Input.GetInstance().mouse.right.Set(t_r_on & t_is_focus);
                Fee.Input.Input.GetInstance().mouse.middle.Set(t_m_on & t_is_focus);

                //debugview
                                #if (UNITY_EDITOR) || (DEVELOPMENT_BUILD) || (USE_DEF_FEE_DEBUGTOOL)
                {
                    Fee.Input.Input.GetInstance().debugview.mouse_button = "Mouse_MouseButton_InputSystem_Mouse";
                }
                                #endif

                return(true);
            }

            return(false);
        }
Exemple #3
0
        /** Main
         */
        public static bool Main()
        {
            UnityEngine.InputSystem.Mouse t_device = UnityEngine.InputSystem.Mouse.current;
            if (t_device != null)
            {
                //デバイス。
                int t_x;
                int t_y;
                {
                    int t_pos_x = (int)t_device.position.x.ReadValue();
                    int t_pos_y = (int)(UnityEngine.Screen.height - t_device.position.y.ReadValue());

                    //(GUIスクリーン座標)=>(仮想スクリーン座標)。
                    Fee.Render2D.Render2D.GetInstance().GuiScreenToVirtualScreen(t_pos_x, t_pos_y, out t_x, out t_y);
                }

                //設定。
                Fee.Input.Input.GetInstance().mouse.cursor.Set(t_x, t_y);

                //debugview
                                #if (UNITY_EDITOR) || (DEVELOPMENT_BUILD) || (USE_DEF_FEE_DEBUGTOOL)
                {
                    Fee.Input.Input.GetInstance().debugview.mouse_position = "Mouse_Position_InputSystem_Mouse";
                }
                                #endif

                return(true);
            }
            return(false);
        }
        /** Main
         */
        public static bool Main()
        {
            UnityEngine.InputSystem.Mouse t_device = UnityEngine.InputSystem.Mouse.current;
            if (t_device != null)
            {
                //リスト作成。
                if (Fee.Input.Input.GetInstance().touch.device_item_list.Length < 1)
                {
                    Fee.Input.Input.GetInstance().touch.device_item_list = new Touch.Touch_Device_Item[1];
                }

                Touch.Touch_Device_Item[] t_list = Fee.Input.Input.GetInstance().touch.device_item_list;
                int t_list_count = 0;

                if (t_device.leftButton.isPressed == true)
                {
                    //デバイス。
                    int t_x;
                    int t_y;
                    {
                        int t_pos_x = (int)t_device.position.x.ReadValue();
                        int t_pos_y = (int)(UnityEngine.Screen.height - t_device.position.y.ReadValue());

                        //(GUIスクリーン座標)=>(仮想スクリーン座標)。
                        Fee.Render2D.Render2D.GetInstance().GuiScreenToVirtualScreen(t_pos_x, t_pos_y, out t_x, out t_y);
                    }

                    //位置。
                    t_list[t_list_count].x = t_x;
                    t_list[t_list_count].y = t_y;

                    //フェーズ。
                    t_list[t_list_count].phasetype = Touch_Phase.PhaseType.Moved;

                    //フラグ。
                    t_list[t_list_count].link = false;

                    //追加情報。
                    t_list[t_list_count].touch_raw_id = Touch.INVALID_TOUCH_RAW_ID;

                    t_list_count++;
                }

                Fee.Input.Input.GetInstance().touch.device_item_list_count = t_list_count;

                //debugview
                                #if (UNITY_EDITOR) || (DEVELOPMENT_BUILD) || (USE_DEF_FEE_DEBUGTOOL)
                {
                    Fee.Input.Input.GetInstance().debugview.touch = "Touch_Phase_InputSystem_Mouse";
                }
                                #endif

                return(true);
            }

            return(false);
        }