LTSeq Class
Internal Representation of a Sequence
Example:
var seq = LeanTween.sequence();seq.append(1f); // delay everything one second
seq.append( () => { // fire an event before start
Debug.Log("I have started");
});
seq.append( LeanTween.move(cube1, Vector3.one * 10f, 1f) ); // do a tween
seq.append( (object obj) => { // fire event after tween
var dict = obj as Dictionary<string,string>;
Debug.Log("We are done now obj value:"+dict["hi"]);
}, new Dictionary<string,string>(){ {"hi","sup"} } );
Constructor
LTSeq
()
Item Index
Methods
add (method(object))
-
callback:System.Action
Add a time delay to the sequence
Parameters:
-
callback:System.Action
System.Actionmethod you want to be called
Returns:
LTSeq an object that you can add tweens, methods and time on to
Example:
var seq = LeanTween.sequence();
seq.append( () => { // fire an event before start
Debug.Log("I have started");
});
seq.append( LeanTween.move(cube1, Vector3.one * 10f, 1f) ); // do a tween
seq.append((object obj) => { // fire event after tween
var dict = obj as Dictionary<string,string>;
Debug.Log("We are done now obj value:"+dict["hi"]);
}, new Dictionary<string,string>(){ {"hi","sup"} } );
add (tween)
()
LTSeq
Retrieve a sequencer object where you can easily chain together tweens and methods one after another
Returns:
LTSeq an object that you can add tweens, methods and time on to
Example:
var seq = LeanTween.sequence();
seq.append( LeanTween.move(cube1, Vector3.one * 10f, 1f) ); // do a move tween
seq.append( LeanTween.rotateAround( avatar1, Vector3.forward, 360f, 1f ) ); // then do a rotate tween
append (delay)
-
delay:float
Add a time delay to the sequence
Parameters:
-
delay:float
Floatamount of time to add to the sequence
Returns:
LTDescr an object that distinguishes the tween
var seq = LeanTween.sequence();
seq.append(1f); // delay everything one second
seq.append( LeanTween.move(cube1, Vector3.one * 10f, 1f) ); // do a tween
append (method)
-
callback:System.Action
Add a time delay to the sequence
Parameters:
-
callback:System.Action
System.Actionmethod you want to be called
Returns:
LTSeq an object that you can add tweens, methods and time on to
Example:
var seq = LeanTween.sequence();
seq.append( () => { // fire an event before start
Debug.Log("I have started");
});
seq.append( LeanTween.move(cube1, Vector3.one * 10f, 1f) ); // do a tween
seq.append( () => { // fire event after tween
Debug.Log("We are done now");
});;