Пример #1
0
        public void FollowDrag()
        {
            if (surpressDragFollow)
            {
                return;
            }
            TouchCollider tc = TouchGuiSystem.Instance().GetTouch(fingerId);

            FollowDragInternal(tc);
        }
Пример #2
0
        public void FollowDrag()
        {
            if (surpressDragFollow)
            {
                return;
            }
            TouchCollider tc = TouchGuiSystem.Instance().GetTouch(fingerId);

            if (tc == null)
            {
                return;
            }
            FollowDragInternal(tc.touch.position);
        }
Пример #3
0
 // Use this for initialization
 public virtual void Start()
 {
     gameObject.layer = LayerMask.NameToLayer("UI");
     TouchGuiSystem.Instance();
     c2d = GetComponent <Collider2D>();
     //if(buttonImage == null) { buttonImage = GetComponent<Image>(); }
     if (c2d == null)
     {
         Debug.LogWarning("missing Collider2D, is this intentional?");
     }
     else if (!c2d.isTrigger)
     {
         Debug.LogWarning(name + " collider is not a trigger, is this intentional?");
     }
     if (image != null)
     {
         originalColor = image.color;
     }
     GenerateOutlineIfNeeded();
 }