Exemplo n.º 1
0
    /// <summary>
    /// Check if all the touches in the list started recently
    /// </summary>
    /// <param name="touches">The touches to evaluate</param>
    /// <returns>True if the age of each touch in the list is under a set threshold</returns>
    protected bool Young( FingerGestures.IFingerList touches )
    {
        FingerGestures.Finger oldestTouch = touches.GetOldest();

        if( oldestTouch == null )
            return false;

        float elapsedTimeSinceFirstTouch = Time.time - oldestTouch.StarTime;

        return elapsedTimeSinceFirstTouch < 0.25f;
    }