Exemple #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);
        }
Exemple #2
0
 // get delta touch move.
 protected Vector2 GetDraggingDelta(int index)
 {
     return(JInputManager.GetButtonDelta(index));
 }
Exemple #3
0
 protected bool IsScaleInput()
 {
     return(JInputManager.IsResizing());
 }
Exemple #4
0
 protected bool IsMoveInput()
 {
     return(JInputManager.IsButtonDragging(0));
 }
Exemple #5
0
 // get delta touch scaled
 protected float GetScaleDelta( )
 {
     return(JInputManager.GetResizingDelta());
 }