本文整理汇总了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());
}
示例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);
}
}
示例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);
}
示例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());
}
示例5: UnregisterFriendlyGesture
internal void UnregisterFriendlyGesture(Gesture gesture)
{
friendlyGestureIds.Remove(gesture.GetInstanceID());
}
示例6: RegisterFriendlyGesture
internal void RegisterFriendlyGesture(Gesture gesture)
{
if (gesture == this || friendlyGestureIds.Contains(gesture.GetInstanceID())) return;
friendlyGestureIds.Add(gesture.GetInstanceID());
}
示例7: unregisterFriendlyGesture
private void unregisterFriendlyGesture(Gesture gesture)
{
if (gesture == null || gesture == this || friendlyGestureIds.Contains(gesture.GetInstanceID())) return;
friendlyGestureIds.Remove(gesture.GetInstanceID());
}
示例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>
示例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;