Assets/Watson/Scripts/Utilities/TouchEventManager.cs
/// <summary>
/// Determines whether this instance has touched on the specified hitTransform.
/// </summary>
/// <returns><c>true</c> if this instance has touched on the specified hitTransform; otherwise, <c>false</c>.</returns>
/// <param name="hitTransform">Hit transform.</param>
Determines whether this instance has touched on the specified hitTransform.
Determines whether this instance has touched on the specified hitTransform .
public bool HasTouchedOn(Transform hitTransform)
            {
                bool hasTouchedOn = false;
                if (ColliderList != null)
                {
                    foreach (Collider itemCollider in ColliderList)
                    {
                        if (itemCollider.transform == hitTransform && itemCollider.gameObject.activeSelf)
                        {
                            hasTouchedOn = true;
                            break;
                        }
                    }
                }
                if (!hasTouchedOn && ColliderList2D != null)
                {
                    foreach (Collider2D itemCollider in ColliderList2D)
                    {
                        if (itemCollider.transform == hitTransform && itemCollider.gameObject.activeSelf)
                        {
                            hasTouchedOn = true;
                            break;
                        }
                    }
                }
                if (!hasTouchedOn && RectTransformList != null)
                {
                    foreach (RectTransform itemRectTransform in RectTransformList)
                    {
                        if (itemRectTransform.transform == hitTransform && itemRectTransform.gameObject.activeSelf)
                        {
                            hasTouchedOn = true;
                            break;
                        }
                    }
                }
                return hasTouchedOn;
            }
public bool HasTouchedOn ( Transform hitTransform ) { bool hasTouchedOn = false ; if ( ColliderList != null ) { foreach ( Collider itemCollider in ColliderList ) { if ( itemCollider . transform == hitTransform && itemCollider . gameObject . activeSelf ) { hasTouchedOn = true ; break ; } } } if ( ! hasTouchedOn && ColliderList2D != null ) { foreach ( Collider2D itemCollider in ColliderList2D ) { if ( itemCollider . transform == hitTransform && itemCollider . gameObject . activeSelf ) { hasTouchedOn = true ; break ; } } } if ( ! hasTouchedOn && RectTransformList != null ) { foreach ( RectTransform itemRectTransform in RectTransformList ) { if ( itemRectTransform . transform == hitTransform && itemRectTransform . gameObject . activeSelf ) { hasTouchedOn = true ; break ; } } } return hasTouchedOn ; }
Determines whether this instance has touched on the specified hitTransform.
Determines whether this instance has touched on the specified hitTransform .
None
hitTransform
Transform
None