本文整理汇总了C#中Tween.allTweenProperties方法的典型用法代码示例。如果您正苦于以下问题:C# Tween.allTweenProperties方法的具体用法?C# Tween.allTweenProperties怎么用?C# Tween.allTweenProperties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tween
的用法示例。
在下文中一共展示了Tween.allTweenProperties方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: handleDuplicatePropertiesInTween
/// <summary>
/// checks for duplicate properties. if one is found and the DuplicatePropertyRuleType is set to
/// DontAddCurrentProperty it will return true indicating that the tween should not be added.
/// this only checks tweens that are not part of an AbstractTweenCollection
/// </summary>
private static bool handleDuplicatePropertiesInTween( Tween tween )
{
// first fetch all the current tweens with the same target object as this one
var allTweensWithTarget = tweensWithTarget( tween.target );
// store a list of all the properties in the tween
var allProperties = tween.allTweenProperties();
// TODO: perhaps only perform the check on running Tweens?
// loop through all the tweens with the same target
foreach( var tweenWithTarget in allTweensWithTarget )
{
// loop through all the properties in the tween and see if there are any dupes
foreach( var tweenProp in allProperties )
{
warn( "found duplicate TweenProperty {0} in tween {1}", tweenProp, tween );
// check for a matched property
if( tweenWithTarget.containsTweenProperty( tweenProp ) )
{
// handle the different duplicate property rules
if( duplicatePropertyRule == DuplicatePropertyRuleType.DontAddCurrentProperty )
{
return true;
}
else if( duplicatePropertyRule == DuplicatePropertyRuleType.RemoveRunningProperty )
{
// TODO: perhaps check if the Tween has any properties left and remove it if it doesnt?
tweenWithTarget.removeTweenProperty( tweenProp );
}
return false;
}
}
}
return false;
}