Пример #1
0
        // process input
        public bool ProcessInput()
        {
            // if up
            if (JInputManager.ButtonUp(0))
            {
                Vector2      wp  = Camera.main.ScreenToWorldPoint(JInputManager.GetScreenPosition(0));
                Ray2D        ray = new Ray2D(wp, Vector2.zero);
                RaycastHit2D hit = Physics2D.Raycast(ray.origin, ray.direction);

                if (hit.collider != null)
                {
                    SetSelectedObject(hit.collider.gameObject);
                }

                return(true);
            }

            return(false);
        }
Пример #2
0
 // get delta touch move.
 protected Vector2 GetDraggingDelta(int index)
 {
     return(JInputManager.GetButtonDelta(index));
 }
Пример #3
0
 protected bool IsScaleInput()
 {
     return(JInputManager.IsResizing());
 }
Пример #4
0
 protected bool IsMoveInput()
 {
     return(JInputManager.IsButtonDragging(0));
 }
Пример #5
0
 // get delta touch scaled
 protected float GetScaleDelta( )
 {
     return(JInputManager.GetResizingDelta());
 }