コード例 #1
0
ファイル: Go.cs プロジェクト: huylu/AngryBirdsClone
	/// <summary>
	/// loops through all the Tweens and updates any that are of updateType. If any Tweens are complete
	/// (the update call will return true) they are removed.
	/// </summary>
	private void handleUpdateOfType( GoUpdateType updateType, float deltaTime )
	{
		// loop backwards so we can remove completed tweens
		for( var i = _tweens.Count - 1; i >= 0; --i )
		{
			var t = _tweens[i];

			if( t.state == GoTweenState.Destroyed )
			{
				// destroy method has been called
				removeTween( t );
			}
			else
			{
				// only process tweens with our update type that are running
				if( t.updateType == updateType && t.state == GoTweenState.Running && t.update( deltaTime * t.timeScale ) )
				{
					// tween is complete if we get here. if destroyed or set to auto remove kill it
					if( t.state == GoTweenState.Destroyed || t.autoRemoveOnComplete )
					{
						removeTween( t );
						t.destroy();
					}
				}
			}
		}
	}
コード例 #2
0
 /// <summary>
 /// sets the update type for the Tween
 /// </summary>
 public GoTweenCollectionConfig setUpdateType( GoUpdateType setUpdateType )
 {
     this.propertyUpdateType = setUpdateType;
     return this;
 }
コード例 #3
0
ファイル: GoTweenConfig.cs プロジェクト: Grogal/dotween
	/// <summary>
	/// sets the update type for the Tween
	/// </summary>
	public GoTweenConfig setUpdateType( GoUpdateType setUpdateType )
	{
		propertyUpdateType = setUpdateType;

		return this;
	}
コード例 #4
0
    /// <summary>
    /// sets the update type for the Tween
    /// </summary>
    public GoTweenConfig setUpdateType(GoUpdateType setUpdateType)
    {
        propertyUpdateType = setUpdateType;

        return(this);
    }
コード例 #5
0
ファイル: GoTweenMethods.cs プロジェクト: apautrot/gdp9
 internal static AbstractGoTween updateTypeIs( this AbstractGoTween tween, GoUpdateType updateType )
 {
     tween.updateType = updateType;
     return tween;
 }
コード例 #6
0
ファイル: GoTweenFlow.cs プロジェクト: yubingxing/GoKit
 public GoTweenFlow setUpdateType( GoUpdateType updateType )
 {
     this.updateType = updateType;
     return this;
 }
コード例 #7
0
    public static GoTween alphaTo(this CanvasGroup self, float duration, float endValue, bool isRelative = false, GoUpdateType goUpdateType = GoUpdateType.Update)
    {
        if (duration == 0)
        {
            self.alpha = isRelative ? self.alpha + endValue : endValue;
            return(Go.to(self, 0.0001f, new GoTweenConfig()));
        }
        GoTweenConfig gtc = new GoTweenConfig();

        gtc.setUpdateType(goUpdateType);
        gtc.floatProp(() => self.alpha, a => self.alpha = a, endValue, isRelative);
        return(Go.to(self, duration, gtc));
    }