LTDescr.setId C# (CSharp) Method

setId() public method

public setId ( uint id ) : LTDescr
id uint
return LTDescr
    public LTDescr setId( uint id )
    {
        this._id = id;
        this.counter = global_counter;
        // Debug.Log("Global counter:"+global_counter);
        return this;
    }

Usage Example

Beispiel #1
0
    IEnumerator CO_TestLTCompleteBy(bool byTarget, bool tweenFloatValue)
    {
        Debug.Log(string.Format("{0} :: Create {1} tweens on {2}", Time.realtimeSinceStartup, totTweens, (tweenFloatValue ? "float" : "transform")));
        for (int i = 0; i < totTweens; ++i)
        {
            LTDescr lt = tweenFloatValue ? LeanTween.value(floatValue, 2.0f, 10.0f) : LeanTween.moveLocalX(go, 2.0f, 10.0f);

            if (!byTarget)
            {
                lt.setId((uint)i, 0);
            }
        }
        yield return(new WaitForSeconds(2f));

        Debug.Log(string.Format("{0} :: Complete {1} tweens by {2}", Time.realtimeSinceStartup, totTweens, (byTarget ? "target" : "id")));

        float time = Time.realtimeSinceStartup;

        LeanTween.cancelAll();

        float elapsed = Time.realtimeSinceStartup - time;

        Debug.Log(string.Format("{0} :: Completed {1} tweens in {2} [ms]", Time.realtimeSinceStartup, totTweens, elapsed * 1000.0f));
    }
All Usage Examples Of LTDescr::setId
LTDescr