Example #1
0
        public void DispatchUserAction()
        {
            if (PauseEvent)
            {
                return;
            }
            for (int i = 0; i < inputs.Length; i++)
            {
                if (inputs[i] != null)
                {
#if DEBUG
                    try
                    {
#endif
                    if (inputs[i].IsActive)
                    {
                        inputs[i].Dispatch(model);
                    }
#if DEBUG
                }
                catch (Exception ex)
                {
                    Debug.Log(ex.StackTrace);
                }
#endif
                }
            }
            if (inputs.Length > 1)
            {
                GestureEvent.Dispatch(new List <UserAction>(inputs));
            }
        }
Example #2
0
        /// <summary>
        /// 派发用户输入指令信息
        /// </summary>
        public void DispatchUserAction()
        {
#if UNITY_STANDALONE_WIN
            DispatchWin(Input.touches);
#elif UNITY_EDITOR
            DispatchMouse();
#elif UNITY_IPHONE || UNITY_ANDROID
            DispatchTouch(Input.touches);
#else
            DispatchMouse();
#endif
            if (PauseEvent)
            {
                return;
            }
            PhysicalScale = UISystem.PhysicalScale;
            if (render != null)
            {
                if (render.renderMode == RenderMode.WorldSpace)
                {
                    PhysicalScale = 1;
                }
            }
            for (int i = 0; i < inputs.Length; i++)
            {
                if (inputs[i] != null)
                {
#if DEBUG
                    try
                    {
#endif
                    inputs[i].PhysicalScale = PhysicalScale;
                    if (inputs[i].IsActive)
                    {
                        inputs[i].Dispatch(PipeLine);
                    }
#if DEBUG
                }
                catch (Exception ex)
                {
                    Debug.LogError(ex.StackTrace);
                }
#endif
                }
            }
            if (inputs.Length > 0)
            {
                GestureEvent.Dispatch(inputs);
            }
        }
Example #3
0
        /// <summary>
        /// 派发用户输入指令信息
        /// </summary>
        void DispatchUserAction()
        {
#if UNITY_STANDALONE_WIN
            DispatchWin();
#elif UNITY_EDITOR
            DispatchMouse();
#elif UNITY_IPHONE || UNITY_ANDROID
            DispatchTouch();
#else
            DispatchMouse();
#endif
            if (PauseEvent)
            {
                return;
            }
            for (int i = 0; i < inputs.Length; i++)
            {
                if (inputs[i] != null)
                {
#if DEBUG
                    try
                    {
#endif
                    if (inputs[i].IsActive)
                    {
                        inputs[i].Dispatch(PipeLine);
                    }
#if DEBUG
                }
                catch (Exception ex)
                {
                    Debug.Log(ex.StackTrace);
                }
#endif
                }
            }
            if (inputs.Length > 0)
            {
                GestureEvent.Dispatch(new List <UserAction>(inputs));
            }
        }
Example #4
0
 public void DispatchUserAction(Touch[] touches)
 {
     DispatchTouch(touches);
     if (PauseEvent)
     {
         return;
     }
     PhysicalScale = UISystem.PhysicalScale;
     if (render != null)
     {
         if (render.renderMode == RenderMode.WorldSpace)
         {
             PhysicalScale = 1;
         }
     }
     for (int i = 0; i < inputs.Length; i++)
     {
         if (inputs[i] != null)
         {
             try
             {
                 inputs[i].PhysicalScale = PhysicalScale;
                 if (inputs[i].IsActive)
                 {
                     inputs[i].Dispatch(PipeLine);
                 }
             }
             catch (Exception ex)
             {
                 Debug.LogError(ex.StackTrace);
             }
         }
     }
     if (inputs.Length > 0)
     {
         GestureEvent.Dispatch(inputs);
     }
 }