GoTween.addTweenProperty C# (CSharp) Méthode

addTweenProperty() public méthode

adds the tween property if it passes validation and initializes the property
public addTweenProperty ( AbstractTweenProperty, tweenProp ) : void
tweenProp AbstractTweenProperty,
Résultat void
    public void addTweenProperty( AbstractTweenProperty tweenProp )
    {
        // make sure the target is valid for this tween before adding
        if( tweenProp.validateTarget( target ) )
        {
            // ensure we dont add two tweens of the same property so they dont fight
            if( _tweenPropertyList.Contains( tweenProp ) )
            {
                Debug.Log( "not adding tween property because one already exists: " + tweenProp );
                return;
            }

            _tweenPropertyList.Add( tweenProp );
            tweenProp.init( this );
        }
        else
        {
            Debug.Log( "tween failed to validate target: " + tweenProp );
        }
    }

Usage Example

Exemple #1
0
 static public int addTweenProperty(IntPtr l)
 {
     try {
         GoTween self = (GoTween)checkSelf(l);
         AbstractTweenProperty a1;
         checkType(l, 2, out a1);
         self.addTweenProperty(a1);
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }