當前位置: 首頁>>代碼示例>>C#>>正文


C# Gesture.GetInstanceID方法代碼示例

本文整理匯總了C#中TouchScript.Gestures.Gesture.GetInstanceID方法的典型用法代碼示例。如果您正苦於以下問題:C# Gesture.GetInstanceID方法的具體用法?C# Gesture.GetInstanceID怎麽用?C# Gesture.GetInstanceID使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在TouchScript.Gestures.Gesture的用法示例。


在下文中一共展示了Gesture.GetInstanceID方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: removeFriendlyGestureId

 // Gets also called by the custom inspector.
 private void removeFriendlyGestureId(Gesture gesture)
 {
     friendlyGestureIds.Remove(gesture.GetInstanceID());
 }
開發者ID:sloopidoopi,項目名稱:TouchScript,代碼行數:5,代碼來源:Gesture.cs

示例2: CanPreventGesture

 /// <summary>
 /// Determines whether this instance can prevent the specified gesture.
 /// </summary>
 /// <param name="gesture">The gesture.</param>
 /// <returns>
 ///   <c>true</c> if this instance can prevent the specified gesture; otherwise, <c>false</c>.
 /// </returns>
 public virtual bool CanPreventGesture(Gesture gesture)
 {
     if (Delegate == null)
     {
         if (gesture.CanBePreventedByGesture(this))
         {
             if (shouldRecognizeWith.Contains(gesture.GetInstanceID()))
             {
                 return false;
             } else
             {
                 return true;
             }
         } else
         {
             return false;
         }
     } else
     {
         return !Delegate.ShouldRecognizeSimultaneously(this, gesture);
     }
 }
開發者ID:NormLi,項目名稱:TouchScript,代碼行數:29,代碼來源:Gesture.cs

示例3: addFriendlyGestureId

 // Gets also called by the custom inspector.
 private void addFriendlyGestureId(Gesture gesture)
 {
     var id = gesture.GetInstanceID();
     if (!friendlyGestureIds.Contains(id)) friendlyGestureIds.Add(id);
 }
開發者ID:sloopidoopi,項目名稱:TouchScript,代碼行數:6,代碼來源:Gesture.cs

示例4: IsFriendly

 /// <summary>
 /// Checks if a gesture is friendly with this gesture.
 /// </summary>
 /// <param name="gesture">A gesture to check.</param>
 /// <returns>True if gestures are friendly; false otherwise.</returns>
 public bool IsFriendly(Gesture gesture)
 {
     return friendlyGestureIds.Contains(gesture.GetInstanceID());
 }
開發者ID:sloopidoopi,項目名稱:TouchScript,代碼行數:9,代碼來源:Gesture.cs

示例5: UnregisterFriendlyGesture

 internal void UnregisterFriendlyGesture(Gesture gesture)
 {
     friendlyGestureIds.Remove(gesture.GetInstanceID());
 }
開發者ID:keangame,項目名稱:TouchScript,代碼行數:4,代碼來源:Gesture.cs

示例6: RegisterFriendlyGesture

        internal void RegisterFriendlyGesture(Gesture gesture)
        {
            if (gesture == this || friendlyGestureIds.Contains(gesture.GetInstanceID())) return;

            friendlyGestureIds.Add(gesture.GetInstanceID());
        }
開發者ID:keangame,項目名稱:TouchScript,代碼行數:6,代碼來源:Gesture.cs

示例7: unregisterFriendlyGesture

        private void unregisterFriendlyGesture(Gesture gesture)
        {
            if (gesture == null || gesture == this || friendlyGestureIds.Contains(gesture.GetInstanceID())) return;

            friendlyGestureIds.Remove(gesture.GetInstanceID());
        }
開發者ID:ksmylz,項目名稱:TouchScript,代碼行數:6,代碼來源:Gesture.cs

示例8:

        {
            get; private set;
        }

        #endregion Properties

        #region Methods

        /// <summary>
        /// Determines whether this instance can prevent the specified gesture.
        /// </summary>
        /// <param name="gesture">The gesture.</param>
        /// <returns>
開發者ID:gijs,項目名稱:TouchScript,代碼行數:13,代碼來源:Gesture.cs

示例9: ShouldReceiveTouch

        /// <param name="touch">The touch.</param>
        /// <returns><c>true</c> if this touch should be received by the gesture; otherwise, <c>false</c>.</returns>
        public virtual bool ShouldReceiveTouch(TouchPoint touch)
        {
            if (Delegate == null) return true;
            return Delegate.ShouldReceiveTouch(this, touch);
        }

        /// <summary>
        /// Tells that the gesture should (or shouldn't) work simultaneously with this gesture.
        /// </summary>
        /// <param name="gesture">The gesture.</param>
        /// <param name="value">if set to <c>true</c> allows simultaneous recognition.</param>
        public void ShouldRecognizeSimultaneouslyWith(Gesture gesture, bool value = true)
        {
            if (gesture == this) return;
開發者ID:gijs,項目名稱:TouchScript,代碼行數:16,代碼來源:Gesture.cs


注:本文中的TouchScript.Gestures.Gesture.GetInstanceID方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。