LTRect Class
Animate GUI Elements by creating this object and passing the *.rect variable to the GUI method
Example Javascript:
var bRect:LTRect = new LTRect( 0, 0, 100, 50 );
LeanTween.scale( bRect, Vector2(bRect.rect.width, bRect.rect.height) * 1.3, 0.25 );
function OnGUI(){
if(GUI.Button(bRect.rect, "Scale")){ }
}
Example C#:
LTRect bRect = new LTRect( 0f, 0f, 100f, 50f );
LeanTween.scale( bRect, new Vector2(150f,75f), 0.25f );
void OnGUI(){
if(GUI.Button(bRect.rect, "Scale")){ }
}
Constructor
LTRect
-
x:float
-
y:float
-
width:float
-
height:float
-
alpha:float
-
rotation:float
Parameters:
-
x:float
FloatX location
-
y:float
FloatY location
-
width:float
FloatWidth
-
height:float
FloatHeight
-
alpha:float
Float(Optional) initial alpha amount (0-1)
-
rotation:float
Float(Optional) initial rotation in degrees (0-360)
Item Index
Properties
Properties
rect
Rect rect:Rect Rect object that controls the positioning and size
Pass this value to the GUI Methods