8124 lines
572 KiB
HTML
8124 lines
572 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<title>LeanTween</title>
|
||
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0pr2/build/cssgrids/cssgrids-min.css">
|
||
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
||
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
|
||
<script>
|
||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||
|
||
ga('create', 'UA-23694672-1', 'dentedpixel.com');
|
||
ga('send', 'pageview');
|
||
|
||
</script>
|
||
<script src="../assets/js/leantween.js"></script>
|
||
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
|
||
<script src="http://yui.yahooapis.com/combo?3.8.0pr2/build/yui/yui-min.js"></script>
|
||
</head>
|
||
<body class="yui3-skin-sam">
|
||
|
||
<div id="doc">
|
||
<div id="hd" class="yui3-g header">
|
||
<div class="yui3-u-3-4">
|
||
<h1><a href="http://dentedpixel.com/developer-diary/leantween-speed-comparison-to-itween/"><img src="http://s3.amazonaws.com/dentedpixel.com/LeanTween/leantween-logo.png" title=""></a></h1> <div style="position:absolute; left:146px; top:90px;">- Developed by <a href="http://www.dentedpixel.com">Dented Pixel</a></div>
|
||
</div>
|
||
<div class="yui3-u-1-4 version">
|
||
<em style="margin-top:2px">API Docs for: LeanTween 2.50</em><br>
|
||
<table id="support">
|
||
<tr>
|
||
<td>
|
||
<h3 style="margin:7px 0 3px 0; width: 200px;">Support LeanTween!</h3>
|
||
<!--<a href="http://www.amazon.com/?tag=carbcutt-20&camp=1&creative=4365&linkCode=ez&ref-refURL=" target="_blank">Click this link</a> before your<br>next Amazon shopping spree!<br>
|
||
-->
|
||
</td>
|
||
<td><!--
|
||
<a href="http://www.amazon.com/?tag=carbcutt-20&camp=1&creative=4365&linkCode=ez&ref-refURL=" target="_blank"><img src="http://dentedpixel.com/LeanTweenDocumentation/assets/img/amz.gif" width="148" height="40" title="shop amazon" /></a>-->
|
||
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="margin-top:5px;">
|
||
<!--<div style="margin:2px 0px 6px 24px; float:left;">or </div>-->
|
||
<input type="hidden" name="cmd" value="_s-xclick">
|
||
<input type="hidden" name="hosted_button_id" value="YJPUT3RAK5VL8">
|
||
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
||
|
||
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
||
|
||
</form>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
|
||
<h4 style="position:absolute; top:80px; right:7px; width:500px; letter-spacing:normal; word-spacing:normal; font-size:9pt; text-align:right; font-style: italic;">Maintaining and adding new features takes time, your support is appreciated.</h4>
|
||
</div>
|
||
<div id="bd" class="yui3-g">
|
||
|
||
<div class="yui3-u-1-4">
|
||
<div id="docs-sidebar" class="sidebar apidocs">
|
||
<div id="api-list">
|
||
<h2 class="off-left">APIs</h2>
|
||
<div id="api-tabview" class="tabview">
|
||
<ul class="tabs">
|
||
<li><a href="#api-classes">Classes</a></li>
|
||
<li><a href="#api-modules">Modules</a></li>
|
||
</ul>
|
||
|
||
<div id="api-tabview-filter">
|
||
<input type="search" id="api-filter" placeholder="Type to filter APIs">
|
||
</div>
|
||
|
||
<div id="api-tabview-panel">
|
||
<ul id="api-classes" class="apis classes">
|
||
<li><a href="../classes/LeanAudio.html">LeanAudio</a></li>
|
||
<li><a href="../classes/LeanAudioOptions.html">LeanAudioOptions</a></li>
|
||
<li><a href="../classes/LeanSmooth.html">LeanSmooth</a></li>
|
||
<li><a href="../classes/LeanTween.html">LeanTween</a></li>
|
||
<li><a href="../classes/LeanTweenType.html">LeanTweenType</a></li>
|
||
<li><a href="../classes/LTBezierPath.html">LTBezierPath</a></li>
|
||
<li><a href="../classes/LTDescr.html">LTDescr</a></li>
|
||
<li><a href="../classes/LTEvent.html">LTEvent</a></li>
|
||
<li><a href="../classes/LTRect.html">LTRect</a></li>
|
||
<li><a href="../classes/LTSeq.html">LTSeq</a></li>
|
||
<li><a href="../classes/LTSpline.html">LTSpline</a></li>
|
||
</ul>
|
||
|
||
<ul id="api-modules" class="apis modules">
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="advertising">
|
||
<h2>More From<br><a href="http://www.dentedpixel.com">Dented Pixel</a></h2><br>
|
||
<a href="https://www.assetstore.unity3d.com/en/#!/content/9455" target="_blank"><img src="http://dentedpixel.com/assets/LTEditor-doc-icon.jpg" width="175" height="175" /><br>Create tweens with: Visual Editor. Sculpt complex spline paths.</a>
|
||
<br>
|
||
<a href="https://itunes.apple.com/us/app/monkeyshines/id530998075?mt=8" target="_blank"><img src="http://a1.mzstatic.com/us/r30/Purple3/v4/d4/2b/ce/d42bce69-b3d3-d7f8-88e9-caa92664b5b1/icon350x350.jpeg" width="175" height="175" /><br>RIN - A swinging good time!</a>
|
||
<br>
|
||
<a href="https://itunes.apple.com/us/app/princess-piano/id445283531?mt=8" target="_blank"><img src="http://a3.mzstatic.com/us/r1000/096/Purple/v4/8c/1e/05/8c1e0590-db82-1d72-2956-2b6470f37ed0/mza_4230031260893485317.175x175-75.jpg" width="175" height="175" /><br>Princess Piano - Learn musical notation<br>in this melodious adventure!</a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="yui3-u-3-4">
|
||
<div id="api-options">
|
||
Show:
|
||
<label for="api-show-inherited">
|
||
<input type="checkbox" id="api-show-inherited" checked>
|
||
Inherited
|
||
</label>
|
||
|
||
<label for="api-show-protected">
|
||
<input type="checkbox" id="api-show-protected">
|
||
Protected
|
||
</label>
|
||
|
||
<label for="api-show-private">
|
||
<input type="checkbox" id="api-show-private">
|
||
Private
|
||
</label>
|
||
<label for="api-show-deprecated">
|
||
<input type="checkbox" id="api-show-deprecated">
|
||
Deprecated
|
||
</label>
|
||
|
||
</div>
|
||
|
||
<div class="apidocs">
|
||
<div id="docs-main">
|
||
<div class="content">
|
||
<h1>LeanTween Class</h1>
|
||
<div class="box meta">
|
||
|
||
|
||
<div class="foundat">
|
||
Defined in: <a href="../files/LeanTween.cs.html#l223"><code>LeanTween.cs:223</code></a>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
|
||
|
||
<div class="box intro">
|
||
<p>LeanTween is an efficient tweening engine for Unity3d<br /><br />
|
||
<a href="#index">Index of All Methods</a> | <a href="LTDescr.html">Optional Paramaters that can be passed</a><br /><br />
|
||
<strong id='optional'>Optional Parameters</strong> are passed at the end of every method<br />
|
||
<br />
|
||
<i>Example:</i><br />
|
||
LeanTween.moveX( gameObject, 1f, 1f).setEase( <a href="LeanTweenType.html">LeanTweenType</a>.easeInQuad ).setDelay(1f);<br />
|
||
<br />
|
||
You can pass the optional parameters in any order, and chain on as many as you wish!<br /><br />
|
||
You can also modify this tween later, just save the unique id of the tween.<br />
|
||
<h4>Example:</h4>
|
||
int id = LeanTween.moveX(gameObject, 1f, 1f).id;<br />
|
||
<a href="LTDescr.html">LTDescr</a> d = LeanTween.<a href="#method_LeanTween.descr">descr</a>( id );<br /><br />
|
||
if(d!=null){ <span style="color:gray">// if the tween has already finished it will return null</span><br />
|
||
<span style="color:gray"> // change some parameters</span><br />
|
||
d.setOnComplete( onCompleteFunc ).setEase( <a href="LeanTweenType.html">LeanTweenType</a>.easeInOutBack );<br />
|
||
}</p>
|
||
|
||
</div>
|
||
|
||
|
||
<div id="classdocs" class="tabview">
|
||
<ul class="api-class-tabs">
|
||
<li class="api-class-tab index"><a href="#index">Index</a></li>
|
||
|
||
<li class="api-class-tab methods"><a href="#methods">Methods</a></li>
|
||
</ul>
|
||
|
||
<div>
|
||
<div id="index" class="api-class-tabpanel index">
|
||
<h2 class="off-left">Item Index</h2>
|
||
|
||
<div class="index-section methods">
|
||
<h3>Methods</h3>
|
||
|
||
<ul class="index-list methods">
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.addListener">LeanTween.addListener</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.alpha">LeanTween.alpha</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.alpha">LeanTween.alpha</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.alpha (RectTransform)">LeanTween.alpha (RectTransform)</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.alpha (RectTransform)">LeanTween.alpha (RectTransform)</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.alphaCanvas">LeanTween.alphaCanvas</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.alphaText">LeanTween.alphaText</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.alphaVertex">LeanTween.alphaVertex</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.cancel">LeanTween.cancel</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.cancel">LeanTween.cancel</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.cancelAll">LeanTween.cancelAll</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.color">LeanTween.color</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.colorText">LeanTween.colorText</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.delayedCall">LeanTween.delayedCall</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.descr">LeanTween.descr</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.descriptions">LeanTween.descriptions</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.dispatchEvent">LeanTween.dispatchEvent</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.dispatchEvent">LeanTween.dispatchEvent</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.followBounceOut">LeanTween.followBounceOut</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.followDamp">LeanTween.followDamp</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.followLinear">LeanTween.followLinear</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.followSpring">LeanTween.followSpring</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.init">LeanTween.init</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.isPaused">LeanTween.isPaused</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.isPaused">LeanTween.isPaused</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.isTweening">LeanTween.isTweening</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.isTweening">LeanTween.isTweening</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.move">LeanTween.move</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.move">LeanTween.move</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.move">LeanTween.move</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.move (GUI)">LeanTween.move (GUI)</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.move (RectTransform)">LeanTween.move (RectTransform)</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.moveLocal">LeanTween.moveLocal</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.moveLocal">LeanTween.moveLocal</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.moveSpline">LeanTween.moveSpline</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.moveSpline">LeanTween.moveSpline</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.moveSplineLocal">LeanTween.moveSplineLocal</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.moveX">LeanTween.moveX</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.moveX (RectTransform)">LeanTween.moveX (RectTransform)</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.moveY">LeanTween.moveY</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.moveY (RectTransform)">LeanTween.moveY (RectTransform)</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.moveZ">LeanTween.moveZ</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.moveZ (RectTransform)">LeanTween.moveZ (RectTransform)</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.pause">LeanTween.pause</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.pause">LeanTween.pause</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.pauseAll">LeanTween.pauseAll</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.play">LeanTween.play</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.removeListener">LeanTween.removeListener</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.resume">LeanTween.resume</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.resume">LeanTween.resume</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.resumeAll">LeanTween.resumeAll</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.rotate">LeanTween.rotate</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.rotate">LeanTween.rotate</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.rotate (RectTransform)">LeanTween.rotate (RectTransform)</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.rotateAround">LeanTween.rotateAround</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.rotateAround (RectTransform)">LeanTween.rotateAround (RectTransform)</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.rotateAroundLocal">LeanTween.rotateAroundLocal</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.rotateAroundLocal (RectTransform)">LeanTween.rotateAroundLocal (RectTransform)</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.rotateLocal">LeanTween.rotateLocal</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.rotateX">LeanTween.rotateX</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.rotateY">LeanTween.rotateY</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.rotateZ">LeanTween.rotateZ</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.scale">LeanTween.scale</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.scale (GUI)">LeanTween.scale (GUI)</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.scale (RectTransform)">LeanTween.scale (RectTransform)</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.scaleX">LeanTween.scaleX</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.scaleY">LeanTween.scaleY</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.scaleZ">LeanTween.scaleZ</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.sequence">LeanTween.sequence</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.size (RectTransform)">LeanTween.size (RectTransform)</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.tweensRunning">LeanTween.tweensRunning</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.value (Color)">LeanTween.value (Color)</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.value (Color)">LeanTween.value (Color)</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.value (float)">LeanTween.value (float)</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.value (float)">LeanTween.value (float)</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.value (float)">LeanTween.value (float)</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.value (float,object)">LeanTween.value (float,object)</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.value (Vector2)">LeanTween.value (Vector2)</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.value (Vector2)">LeanTween.value (Vector2)</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.value (Vector3)">LeanTween.value (Vector3)</a>
|
||
|
||
</li>
|
||
<li class="index-item method">
|
||
<a href="#method_LeanTween.value (Vector3)">LeanTween.value (Vector3)</a>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div id="methods" class="api-class-tabpanel">
|
||
<h2 class="off-left">Methods</h2>
|
||
|
||
<div id="method_LeanTween.addListener" class="method item">
|
||
<h3 class="name"><code>LeanTween.addListener</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>caller:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>eventId:int</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>callback:System.Action<LTEvent></code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l2743"><code>LeanTween.cs:2743</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<p>Add a listener method to be called when the appropriate LeanTween.dispatchEvent is called</p>
|
||
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">caller:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>the gameObject the listener is attached to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">eventId:int</code>
|
||
<span class="type">Int</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>a unique int that describes the event (best to use an enum)</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">callback:System.Action<LTEvent></code>
|
||
<span class="type">System.Action<LTEvent></span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>the method to call when the event has been dispatched</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.addListener(gameObject, (int)MyEvents.JUMP, jumpUp);<br />
|
||
<br />
|
||
void jumpUp( LTEvent e ){ Debug.Log("jump!"); }<br /></p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.alpha" class="method item">
|
||
<h3 class="name"><code>LeanTween.alpha</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1090"><code>LeanTween.cs:1090</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Fade a gameobject's material to a certain alpha value.</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Gameobject that you wish to fade</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>the final alpha value (0-1)</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time with which to fade the object</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.alpha(gameObject, 1f, 1f) .setDelay(1f);</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.alpha" class="method item">
|
||
<h3 class="name"><code>LeanTween.alpha</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>ltRect:LTRect</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1111"><code>LeanTween.cs:1111</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Fade a GUI Object</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">ltRect:LTRect</code>
|
||
<span class="type"><a href="../classes/LTRect.html" class="crosslink">LTRect</a></span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>LTRect that you wish to fade</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>the final alpha value (0-1)</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time with which to fade the object</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.alpha(ltRect, 1f, 1f) .setEase(LeanTweenType.easeInCirc);</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.alpha (RectTransform)" class="method item">
|
||
<h3 class="name"><code>LeanTween.alpha (RectTransform)</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>rectTrans:RectTransform</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l2089"><code>LeanTween.cs:2089</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Alpha an Image Component attached to a RectTransform (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">rectTrans:RectTransform</code>
|
||
<span class="type">RectTransform</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>RectTransform that you wish to attach the tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The final Vector3 with which to tween to (localScale)</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.alpha(gameObject.GetComponent<RectTransform>(), 0.5f, 1f).setDelay(1f);</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.alpha (RectTransform)" class="method item">
|
||
<h3 class="name"><code>LeanTween.alpha (RectTransform)</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>rectTrans:RectTransform</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l2103"><code>LeanTween.cs:2103</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Change the Color of an Image Component attached to a RectTransform (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">rectTrans:RectTransform</code>
|
||
<span class="type">RectTransform</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>RectTransform that you wish to attach the tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The final Vector3 with which to tween to (localScale)</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.color(gameObject.GetComponent<RectTransform>(), 0.5f, 1f).setDelay(1f);</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.alphaCanvas" class="method item">
|
||
<h3 class="name"><code>LeanTween.alphaCanvas</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>rectTransform:RectTransform</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1147"><code>LeanTween.cs:1147</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Fade a Unity UI Canvas Group</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">rectTransform:RectTransform</code>
|
||
<span class="type">RectTransform</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>RectTransform that the CanvasGroup is attached to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>the final alpha value (0-1)</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time with which to fade the object</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.alphaCanvas(gameObject.GetComponent<RectTransform>(), 0f, 1f) .setLoopPingPong();</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.alphaText" class="method item">
|
||
<h3 class="name"><code>LeanTween.alphaText</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>rectTransform:RectTransform</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1129"><code>LeanTween.cs:1129</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Fade a Unity UI Object</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">rectTransform:RectTransform</code>
|
||
<span class="type">RectTransform</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>RectTransform associated with the Text Component you wish to fade</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>the final alpha value (0-1)</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time with which to fade the object</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.alphaText(gameObject.GetComponent<RectTransform>(), 1f, 1f) .setEase(LeanTweenType.easeInCirc);</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.alphaVertex" class="method item">
|
||
<h3 class="name"><code>LeanTween.alphaVertex</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1163"><code>LeanTween.cs:1163</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>This works by tweening the vertex colors directly</summary>
|
||
<br />
|
||
Vertex-based coloring is useful because you avoid making a copy of your
|
||
object's material for each instance that needs a different color.<br />
|
||
<br />
|
||
A shader that supports vertex colors is required for it to work
|
||
(for example the shaders in Mobile/Particles/)
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Gameobject that you wish to alpha</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The alpha value you wish to tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time with which to delay before calling the function</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div id="method_LeanTween.cancel" class="method item">
|
||
<h3 class="name"><code>LeanTween.cancel</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>id:int</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>callOnComplete:bool</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l588"><code>LeanTween.cs:588</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Cancel a specific tween with the provided id</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">id:int</code>
|
||
<span class="type">Int</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>unique id that represents that tween</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">callOnComplete:bool</code>
|
||
<span class="type">Bool</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>(optional) whether to call the onComplete method before canceling</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>int id = LeanTween.move( gameObject, new Vector3(0f,1f,2f), 1f).id; <br />
|
||
LeanTween.cancel( id );</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.cancel" class="method item">
|
||
<h3 class="name"><code>LeanTween.cancel</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>callOnComplete:bool</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l523"><code>LeanTween.cs:523</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Cancel all tweens that are currently targeting the gameObject</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>gameObject whose tweens you wish to cancel</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">callOnComplete:bool</code>
|
||
<span class="type">Bool</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>(optional) whether to call the onComplete method before canceling</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.move( gameObject, new Vector3(0f,1f,2f), 1f); <br />
|
||
LeanTween.cancel( gameObject );</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.cancelAll" class="method item">
|
||
<h3 class="name"><code>LeanTween.cancelAll</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>callComplete:bool</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l501"><code>LeanTween.cs:501</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Cancels all tweens</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">callComplete:bool</code>
|
||
<span class="type">Bool</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>(optional) if true, then the all onCompletes will run before canceling</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.cancelAll(true); <br /></p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.color" class="method item">
|
||
<h3 class="name"><code>LeanTween.color</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:Color</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1182"><code>LeanTween.cs:1182</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Change a gameobject's material to a certain color value</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Gameobject that you wish to change the color</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:Color</code>
|
||
<span class="type">Color</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>the final color value ex: Color.Red, new Color(1.0f,1.0f,0.0f,0.8f)</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time with which to fade the object</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.color(gameObject, Color.yellow, 1f) .setDelay(1f);</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.colorText" class="method item">
|
||
<h3 class="name"><code>LeanTween.colorText</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>rectTransform:RectTransform</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:Color</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1203"><code>LeanTween.cs:1203</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Change the color a Unity UI Object</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">rectTransform:RectTransform</code>
|
||
<span class="type">RectTransform</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>RectTransform attached to the Text Component whose color you want to change</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:Color</code>
|
||
<span class="type">Color</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>the final alpha value ex: Color.Red, new Color(1.0f,1.0f,0.0f,0.8f)</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time with which to fade the object</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.colorText(gameObject.GetComponent<RectTransform>(), Color.yellow, 1f) .setDelay(1f);</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.delayedCall" class="method item">
|
||
<h3 class="name"><code>LeanTween.delayedCall</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1222"><code>LeanTween.cs:1222</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Call a method after a specified amount of time</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Gameobject that you wish to associate with this delayed call</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>delay The time you wish to pass before the method is called</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.delayedCall(gameObject, 1f, ()=>{ <br />Debug.Log("I am called one second later!");<br /> }));</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.descr" class="method item">
|
||
<h3 class="name"><code>LeanTween.descr</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>id:int</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l631"><code>LeanTween.cs:631</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Retrieve a tweens LTDescr object to modify</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">id:int</code>
|
||
<span class="type">Int</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>unique id that represents that tween</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>int id = LeanTween.move( gameObject, new Vector3(0f,1f,2f), 1f).setOnComplete( oldMethod ).id; <br /><br /></p>
|
||
<div style="color:gray">// later I want decide I want to change onComplete method </div>
|
||
LTDescr descr = LeanTween.descr( id );<br />
|
||
if(descr!=null) <span style="color:gray">// if the tween has already finished it will come back null</span><br />
|
||
  descr.setOnComplete( newMethod );<br />
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.descriptions" class="method item">
|
||
<h3 class="name"><code>LeanTween.descriptions</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>id:GameObject</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l665"><code>LeanTween.cs:665</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Retrieve a tweens LTDescr object(s) to modify</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">id:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>object whose tween descriptions you want to retrieve</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.move( gameObject, new Vector3(0f,1f,2f), 1f).setOnComplete( oldMethod ); <br /><br /></p>
|
||
<div style="color:gray">// later I want decide I want to change onComplete method </div>
|
||
LTDescr[] descr = LeanTween.descriptions( gameObject );<br />
|
||
if(descr.Length>0) <span style="color:gray">// make sure there is a valid description for this target</span><br />
|
||
  descr[0].setOnComplete( newMethod );<span style="color:gray">// in this case we only ever expect there to be one tween on this object</span><br />
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.dispatchEvent" class="method item">
|
||
<h3 class="name"><code>LeanTween.dispatchEvent</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>eventId:int</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>data:object</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l2838"><code>LeanTween.cs:2838</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<p>Tell the added listeners that you are dispatching the event</p>
|
||
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">eventId:int</code>
|
||
<span class="type">Int</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>a unique int that describes the event (best to use an enum)</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">data:object</code>
|
||
<span class="type">Object</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Pass data to the listener, access it from the listener with *.data on the LTEvent object</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.dispatchEvent( (int)MyEvents.JUMP, transform );<br />
|
||
<br />
|
||
void jumpUp( LTEvent e ){<br />
|
||
Transform tran = (Transform)e.data;<br />
|
||
}<br /></p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.dispatchEvent" class="method item">
|
||
<h3 class="name"><code>LeanTween.dispatchEvent</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>eventId:int</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l2827"><code>LeanTween.cs:2827</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<p>Tell the added listeners that you are dispatching the event</p>
|
||
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">eventId:int</code>
|
||
<span class="type">Int</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>a unique int that describes the event (best to use an enum)</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.dispatchEvent( (int)MyEvents.JUMP );<br /></p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.followBounceOut" class="method item">
|
||
<h3 class="name"><code>LeanTween.followBounceOut</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>transform:Transform</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>transform:Transform</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>leanProp:LeanProp</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>smoothTime:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code class="optional">[maxSpeed]</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code class="optional">[friction]</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code class="optional">[accelRate]</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code class="optional">[hitDamp]</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l2597"><code>LeanTween.cs:2597</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Follow another transforms position/scale/color (with an ease that bounces back some when it reaches it's destination)</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">transform:Transform</code>
|
||
<span class="type">Transform</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>the transform you wish to be the follower</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">transform:Transform</code>
|
||
<span class="type">Transform</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>the transform you wish to follow</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">leanProp:LeanProp</code>
|
||
<span class="type">LeanProp</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>enum of the type of following you wish to do position, scale, color, etc.</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">smoothTime:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>roughly the time it takes to reach the destination</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name optional">[maxSpeed]</code>
|
||
<span class="type">Float</span>
|
||
<span class="flag optional" title="This parameter is optional.">optional</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>:float maximum speed at which it moves towards the destination</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name optional">[friction]</code>
|
||
<span class="type">Float</span>
|
||
<span class="flag optional" title="This parameter is optional.">optional</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>:float rate at which the spring is slowed down once it reaches it's destination</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name optional">[accelRate]</code>
|
||
<span class="type">Float</span>
|
||
<span class="flag optional" title="This parameter is optional.">optional</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>:float the rate it accelerates from it's initial position</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name optional">[hitDamp]</code>
|
||
<span class="type">Float</span>
|
||
<span class="flag optional" title="This parameter is optional.">optional</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>:float the rate at which to dampen the bounciness of when it reaches it's destination</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.followBounceOut(transform, followTransform, LeanProp.localY, 1.1f);</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.followDamp" class="method item">
|
||
<h3 class="name"><code>LeanTween.followDamp</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>transform:Transform</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>transform:Transform</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>leanProp:LeanProp</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>smoothTime:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code class="optional">[maxSpeed]</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l2461"><code>LeanTween.cs:2461</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Follow another transforms position/scale/color with a damp transition (eases in and out to destination with no overshoot)</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">transform:Transform</code>
|
||
<span class="type">Transform</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>the transform you wish to be the follower</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">transform:Transform</code>
|
||
<span class="type">Transform</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>the transform you wish to follow</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">leanProp:LeanProp</code>
|
||
<span class="type">LeanProp</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>enum of the type of following you wish to do position, scale, color, etc.</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">smoothTime:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>roughly the time it takes to reach the destination</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name optional">[maxSpeed]</code>
|
||
<span class="type">Float</span>
|
||
<span class="flag optional" title="This parameter is optional.">optional</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>:float maximum speed at which it moves towards the destination</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.followDamp(transform, followTransform, LeanProp.localY, 1.1f);</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.followLinear" class="method item">
|
||
<h3 class="name"><code>LeanTween.followLinear</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>transform:Transform</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>transform:Transform</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>leanProp:LeanProp</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>moveSpeed:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l2666"><code>LeanTween.cs:2666</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Follow another transforms position/scale/color with a constant speed</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">transform:Transform</code>
|
||
<span class="type">Transform</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>the transform you wish to be the follower</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">transform:Transform</code>
|
||
<span class="type">Transform</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>the transform you wish to follow</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">leanProp:LeanProp</code>
|
||
<span class="type">LeanProp</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>enum of the type of following you wish to do position, scale, color, etc.</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">moveSpeed:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>roughly the time it takes to reach the destination</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.followLinear(transform, followTransform, LeanProp.localY, 50f);</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.followSpring" class="method item">
|
||
<h3 class="name"><code>LeanTween.followSpring</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>transform:Transform</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>transform:Transform</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>leanProp:LeanProp</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>smoothTime:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code class="optional">[maxSpeed]</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code class="optional">[friction]</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code class="optional">[accelRate]</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l2528"><code>LeanTween.cs:2528</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Follow another transforms position/scale/color with a springy transition (eases in and out to destination with possible overshoot bounciness)</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">transform:Transform</code>
|
||
<span class="type">Transform</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>the transform you wish to be the follower</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">transform:Transform</code>
|
||
<span class="type">Transform</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>the transform you wish to follow</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">leanProp:LeanProp</code>
|
||
<span class="type">LeanProp</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>enum of the type of following you wish to do position, scale, color, etc.</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">smoothTime:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>roughly the time it takes to reach the destination</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name optional">[maxSpeed]</code>
|
||
<span class="type">Float</span>
|
||
<span class="flag optional" title="This parameter is optional.">optional</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>:float maximum speed at which it moves towards the destination</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name optional">[friction]</code>
|
||
<span class="type">Float</span>
|
||
<span class="flag optional" title="This parameter is optional.">optional</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>:float rate at which the spring is slowed down once it reaches it's destination</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name optional">[accelRate]</code>
|
||
<span class="type">Float</span>
|
||
<span class="flag optional" title="This parameter is optional.">optional</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>:float the rate it accelerates from it's initial position</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.followSpring(transform, followTransform, LeanProp.localY);</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.init" class="method item">
|
||
<h3 class="name"><code>LeanTween.init</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>maxSimultaneousTweens:int</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l309"><code>LeanTween.cs:309</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<p>This line is optional. Here you can specify the maximum number of tweens you will use (the default is 400). This must be called before any use of LeanTween is made for it to be effective. <summary>This line is optional. Here you can specify the maximum number of tweens you will use (the default is 400). This must be called before any use of LeanTween is made for it to be effective. </summary></p>
|
||
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">maxSimultaneousTweens:int</code>
|
||
<span class="type">Integer</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The maximum number of tweens you will use, make sure you don't go over this limit, otherwise the code will throw an error</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.init( 800 );</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.isPaused" class="method item">
|
||
<h3 class="name"><code>LeanTween.isPaused</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l789"><code>LeanTween.cs:789</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Test whether or not a tween is paused on a GameObject</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>GameObject that you want to test if it is paused</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
<div id="method_LeanTween.isPaused" class="method item">
|
||
<h3 class="name"><code>LeanTween.isPaused</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>id:int</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l820"><code>LeanTween.cs:820</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Test whether or not a tween is paused or not</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">id:int</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>id of the tween that you want to test if it is paused</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>int id = LeanTween.moveX(gameObject, 1f, 3f).id;<br />
|
||
LeanTween.pause(gameObject);<br />
|
||
if(LeanTween.isPaused( id ))<br />
|
||
Debug.Log("I am paused!");<br /></p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.isTweening" class="method item">
|
||
<h3 class="name"><code>LeanTween.isTweening</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l844"><code>LeanTween.cs:844</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Test whether or not a tween is active on a GameObject</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>GameObject that you want to test if it is tweening</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
<div id="method_LeanTween.isTweening" class="method item">
|
||
<h3 class="name"><code>LeanTween.isTweening</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>id:int</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l870"><code>LeanTween.cs:870</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Test whether or not a tween is active or not</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">id:int</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>id of the tween that you want to test if it is tweening</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>int id = LeanTween.moveX(gameObject, 1f, 3f).id;<br />
|
||
if(LeanTween.isTweening( id ))<br />
|
||
Debug.Log("I am tweening!");<br /></p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.move" class="method item">
|
||
<h3 class="name"><code>LeanTween.move</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>destination:Transform</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1493"><code>LeanTween.cs:1493</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Move a GameObject to another transform</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Gameobject that you wish to move</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">destination:Transform</code>
|
||
<span class="type">Transform</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Transform whose position the tween will finally end on</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>time The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.move(gameObject, anotherTransform, 2.0f) .setEase( LeanTweenType.easeOutQuad );</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.move" class="method item">
|
||
<h3 class="name"><code>LeanTween.move</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>path:Vector3[]</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1274"><code>LeanTween.cs:1274</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Move a GameObject along a set of bezier curves</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Gameobject that you wish to move</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">path:Vector3[]</code>
|
||
<span class="type">Vector3</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>A set of points that define the curve(s) ex: Point1,Handle2,Handle1,Point2,...</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p><i>Javascript:</i><br />
|
||
LeanTween.move(gameObject, [Vector3(0,0,0),Vector3(1,0,0),Vector3(1,0,0),Vector3(1,0,1)], 2.0) .setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);<br /><br />
|
||
<i>C#:</i><br />
|
||
LeanTween.move(gameObject, new Vector3[]{new Vector3(0f,0f,0f),new Vector3(1f,0f,0f),new Vector3(1f,0f,0f),new Vector3(1f,0f,1f)}, 1.5f).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);;<br /></p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.move" class="method item">
|
||
<h3 class="name"><code>LeanTween.move</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>vec:Vector3</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1256"><code>LeanTween.cs:1256</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Move a GameObject to a certain location</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Gameobject that you wish to move</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">vec:Vector3</code>
|
||
<span class="type">Vector3</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>to The final positin with which to move to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>time The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.move(gameObject, new Vector3(0f,-3f,5f), 2.0f) .setEase( LeanTweenType.easeOutQuad );</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.move (GUI)" class="method item">
|
||
<h3 class="name"><code>LeanTween.move (GUI)</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>ltRect:LTRect</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>vec:Vector2</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1375"><code>LeanTween.cs:1375</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Move a GUI Element to a certain location</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">ltRect:LTRect</code>
|
||
<span class="type"><a href="../classes/LTRect.html" class="crosslink">LTRect</a></span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>ltRect LTRect object that you wish to move</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">vec:Vector2</code>
|
||
<span class="type">Vector2</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>to The final position with which to move to (pixel coordinates)</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>time The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div id="method_LeanTween.move (RectTransform)" class="method item">
|
||
<h3 class="name"><code>LeanTween.move (RectTransform)</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>rectTrans:RectTransform</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:Vector3</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1957"><code>LeanTween.cs:1957</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Move a RectTransform object (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">rectTrans:RectTransform</code>
|
||
<span class="type">RectTransform</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>RectTransform that you wish to attach the tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:Vector3</code>
|
||
<span class="type">Vector3</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The final Vector3 with which to tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.move(gameObject.GetComponent<RectTransform>(), new Vector3(200f,-100f,0f), 1f).setDelay(1f);</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.moveLocal" class="method item">
|
||
<h3 class="name"><code>LeanTween.moveLocal</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>Vector3</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1431"><code>LeanTween.cs:1431</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Move a GameObject to a certain location relative to the parent transform.</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>gameObject Gameobject that you wish to rotate</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">Vector3</code>
|
||
<span class="type">Vector3</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>to The final positin with which to move to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>time The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div id="method_LeanTween.moveLocal" class="method item">
|
||
<h3 class="name"><code>LeanTween.moveLocal</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>path:Vector3[]</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1444"><code>LeanTween.cs:1444</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Move a GameObject along a set of bezier curves, in local space</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Gameobject that you wish to move</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">path:Vector3[]</code>
|
||
<span class="type">Vector3</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>A set of points that define the curve(s) ex: Point1,Handle1,Handle2,Point2,...</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p><i>Javascript:</i><br />
|
||
LeanTween.moveLocal(gameObject, [Vector3(0,0,0),Vector3(1,0,0),Vector3(1,0,0),Vector3(1,0,1)], 2.0).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);<br /><br />
|
||
<i>C#:</i><br />
|
||
LeanTween.moveLocal(gameObject, new Vector3[]{Vector3(0f,0f,0f),Vector3(1f,0f,0f),Vector3(1f,0f,0f),Vector3(1f,0f,1f)}).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);<br /></p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.moveSpline" class="method item">
|
||
<h3 class="name"><code>LeanTween.moveSpline</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>spline:LTSpline</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1333"><code>LeanTween.cs:1333</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Move a GameObject through a set of points</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Gameobject that you wish to move</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">spline:LTSpline</code>
|
||
<span class="type"><a href="../classes/LTSpline.html" class="crosslink">LTSpline</a></span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>pass a pre-existing LTSpline for the object to move along</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p><i>Javascript:</i><br />
|
||
LeanTween.moveSpline(gameObject, ltSpline, 2.0) .setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);<br /><br />
|
||
<i>C#:</i><br />
|
||
LeanTween.moveSpline(gameObject, ltSpline, 1.5f).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);<br /></p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.moveSpline" class="method item">
|
||
<h3 class="name"><code>LeanTween.moveSpline</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>path:Vector3[]</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1312"><code>LeanTween.cs:1312</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Move a GameObject through a set of points</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Gameobject that you wish to move</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">path:Vector3[]</code>
|
||
<span class="type">Vector3</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>A set of points that define the curve(s) ex: ControlStart,Pt1,Pt2,Pt3,.. ..ControlEnd<br />Note: The first and last item just define the angle of the end points, they are not actually used in the spline path itself. If you do not care about the angle you can jus set the first two items and last two items as the same value.</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p><i>Javascript:</i><br />
|
||
LeanTween.moveSpline(gameObject, [Vector3(0,0,0),Vector3(1,0,0),Vector3(1,0,0),Vector3(1,0,1)], 2.0) .setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);<br /><br />
|
||
<i>C#:</i><br />
|
||
LeanTween.moveSpline(gameObject, new Vector3[]{new Vector3(0f,0f,0f),new Vector3(1f,0f,0f),new Vector3(1f,0f,0f),new Vector3(1f,0f,1f)}, 1.5f).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);<br /></p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.moveSplineLocal" class="method item">
|
||
<h3 class="name"><code>LeanTween.moveSplineLocal</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>path:Vector3[]</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1354"><code>LeanTween.cs:1354</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Move a GameObject through a set of points, in local space</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Gameobject that you wish to move</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">path:Vector3[]</code>
|
||
<span class="type">Vector3</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>A set of points that define the curve(s) ex: ControlStart,Pt1,Pt2,Pt3,.. ..ControlEnd</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p><i>Javascript:</i><br />
|
||
LeanTween.moveSpline(gameObject, [Vector3(0,0,0),Vector3(1,0,0),Vector3(1,0,0),Vector3(1,0,1)], 2.0) .setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);<br /><br />
|
||
<i>C#:</i><br />
|
||
LeanTween.moveSpline(gameObject, new Vector3[]{new Vector3(0f,0f,0f),new Vector3(1f,0f,0f),new Vector3(1f,0f,0f),new Vector3(1f,0f,1f)}, 1.5f).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true);<br /></p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.moveX" class="method item">
|
||
<h3 class="name"><code>LeanTween.moveX</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1392"><code>LeanTween.cs:1392</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Move a GameObject along the x-axis</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>gameObject Gameobject that you wish to move</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>to The final position with which to move to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>time The time to complete the move in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div id="method_LeanTween.moveX (RectTransform)" class="method item">
|
||
<h3 class="name"><code>LeanTween.moveX (RectTransform)</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>rectTrans:RectTransform</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1971"><code>LeanTween.cs:1971</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Move a RectTransform object affecting x-axis only (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">rectTrans:RectTransform</code>
|
||
<span class="type">RectTransform</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>RectTransform that you wish to attach the tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The final x location with which to tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.moveX(gameObject.GetComponent<RectTransform>(), 200f, 1f).setDelay(1f);</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.moveY" class="method item">
|
||
<h3 class="name"><code>LeanTween.moveY</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1405"><code>LeanTween.cs:1405</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Move a GameObject along the y-axis</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>gameObject Gameobject that you wish to move</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>to The final position with which to move to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>time The time to complete the move in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div id="method_LeanTween.moveY (RectTransform)" class="method item">
|
||
<h3 class="name"><code>LeanTween.moveY (RectTransform)</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>rectTrans:RectTransform</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1985"><code>LeanTween.cs:1985</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Move a RectTransform object affecting y-axis only (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">rectTrans:RectTransform</code>
|
||
<span class="type">RectTransform</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>RectTransform that you wish to attach the tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The final y location with which to tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.moveY(gameObject.GetComponent<RectTransform>(), 200f, 1f).setDelay(1f);</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.moveZ" class="method item">
|
||
<h3 class="name"><code>LeanTween.moveZ</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1418"><code>LeanTween.cs:1418</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Move a GameObject along the z-axis</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>gameObject Gameobject that you wish to move</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>to The final position with which to move to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>time The time to complete the move in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div id="method_LeanTween.moveZ (RectTransform)" class="method item">
|
||
<h3 class="name"><code>LeanTween.moveZ (RectTransform)</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>rectTrans:RectTransform</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1999"><code>LeanTween.cs:1999</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Move a RectTransform object affecting z-axis only (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)n</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">rectTrans:RectTransform</code>
|
||
<span class="type">RectTransform</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>RectTransform that you wish to attach the tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The final x location with which to tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.moveZ(gameObject.GetComponent<RectTransform>(), 200f, 1f).setDelay(1f);</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.pause" class="method item">
|
||
<h3 class="name"><code>LeanTween.pause</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l712"><code>LeanTween.cs:712</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Pause all tweens for a GameObject</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>GameObject whose tweens you want to pause</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
<div id="method_LeanTween.pause" class="method item">
|
||
<h3 class="name"><code>LeanTween.pause</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>id:int</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l693"><code>LeanTween.cs:693</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Pause all tweens for a GameObject</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">id:int</code>
|
||
<span class="type">Int</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Id of the tween you want to pause</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>int id = LeanTween.moveX(gameObject, 5, 1.0).id<br />
|
||
LeanTween.pause( id );<br />
|
||
// Later....<br />
|
||
LeanTween.resume( id );</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.pauseAll" class="method item">
|
||
<h3 class="name"><code>LeanTween.pauseAll</code></h3>
|
||
|
||
<span class="paren">()</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l727"><code>LeanTween.cs:727</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Pause all active tweens</summary>
|
||
</div>
|
||
|
||
|
||
|
||
</div>
|
||
<div id="method_LeanTween.play" class="method item">
|
||
<h3 class="name"><code>LeanTween.play</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>rectTransform:RectTransform</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>sprites:Sprite[]</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1023"><code>LeanTween.cs:1023</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Play a sequence of images on a Unity UI Object</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">rectTransform:RectTransform</code>
|
||
<span class="type">RectTransform</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>RectTransform that you want to play the sequence of sprites on</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">sprites:Sprite[]</code>
|
||
<span class="type">Sprite</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Sequence of sprites to be played</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween <br /></p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.play(gameObject.GetComponent<RectTransform>(), sprites).setLoopPingPong();</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.removeListener" class="method item">
|
||
<h3 class="name"><code>LeanTween.removeListener</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>caller:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>eventId:int</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>callback:System.Action<LTEvent></code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l2800"><code>LeanTween.cs:2800</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<p>Remove an event listener you have added</p>
|
||
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">caller:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>the gameObject the listener is attached to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">eventId:int</code>
|
||
<span class="type">Int</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>a unique int that describes the event (best to use an enum)</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">callback:System.Action<LTEvent></code>
|
||
<span class="type">System.Action<LTEvent></span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>the method that was specified to call when the event has been dispatched</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.removeListener(gameObject, (int)MyEvents.JUMP, jumpUp);<br />
|
||
<br />
|
||
void jumpUp( LTEvent e ){ }<br /></p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.resume" class="method item">
|
||
<h3 class="name"><code>LeanTween.resume</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>id:int</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l756"><code>LeanTween.cs:756</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Resume a specific tween</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">id:int</code>
|
||
<span class="type">Int</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Id of the tween you want to resume</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>int id = LeanTween.moveX(gameObject, 5, 1.0).id<br />
|
||
LeanTween.pause( id );<br />
|
||
// Later....<br />
|
||
LeanTween.resume( id );</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.resume" class="method item">
|
||
<h3 class="name"><code>LeanTween.resume</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l775"><code>LeanTween.cs:775</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Resume all the tweens on a GameObject</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>GameObject whose tweens you want to resume</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
<div id="method_LeanTween.resumeAll" class="method item">
|
||
<h3 class="name"><code>LeanTween.resumeAll</code></h3>
|
||
|
||
<span class="paren">()</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l739"><code>LeanTween.cs:739</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Resume all active tweens</summary>
|
||
</div>
|
||
|
||
|
||
|
||
</div>
|
||
<div id="method_LeanTween.rotate" class="method item">
|
||
<h3 class="name"><code>LeanTween.rotate</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>Vector3</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1507"><code>LeanTween.cs:1507</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Rotate a GameObject, to values are in passed in degrees</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>gameObject Gameobject that you wish to rotate</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">Vector3</code>
|
||
<span class="type">Vector3</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>to The final rotation with which to rotate to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>time The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.rotate(cube, new Vector3(180f,30f,0f), 1.5f);</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.rotate" class="method item">
|
||
<h3 class="name"><code>LeanTween.rotate</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>ltRect:LTRect</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>optional:Array</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1522"><code>LeanTween.cs:1522</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Rotate a GUI element (using an LTRect object), to a value that is in degrees</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">ltRect:LTRect</code>
|
||
<span class="type"><a href="../classes/LTRect.html" class="crosslink">LTRect</a></span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>LTRect that you wish to rotate</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The final rotation with which to rotate to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">optional:Array</code>
|
||
<span class="type">Array</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Object Array where you can pass <a href="#optional">optional items</a>.</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>if(GUI.Button(buttonRect.rect, "Rotate"))<br />
|
||
LeanTween.rotate( buttonRect4, 150.0f, 1.0f).setEase(LeanTweenType.easeOutElastic);<br />
|
||
GUI.matrix = Matrix4x4.identity;<br /></p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.rotate (RectTransform)" class="method item">
|
||
<h3 class="name"><code>LeanTween.rotate (RectTransform)</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>rectTrans:RectTransform</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l2013"><code>LeanTween.cs:2013</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Rotate a RectTransform object (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">rectTrans:RectTransform</code>
|
||
<span class="type">RectTransform</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>RectTransform that you wish to attach the tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The degree with which to rotate the RectTransform</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.rotate(gameObject.GetComponent<RectTransform>(), 90f, 1f).setDelay(1f);</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.rotateAround" class="method item">
|
||
<h3 class="name"><code>LeanTween.rotateAround</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>vec:Vector3</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>degrees:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1592"><code>LeanTween.cs:1592</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Rotate a GameObject around a certain Axis (the best method to use when you want to rotate beyond 180 degrees)</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Gameobject that you wish to rotate</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">vec:Vector3</code>
|
||
<span class="type">Vector3</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>axis in which to rotate around ex: Vector3.up</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">degrees:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>the degrees in which to rotate</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>time The time to complete the rotation in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p><i>Example:</i><br />
|
||
LeanTween.rotateAround ( gameObject, Vector3.left, 90f, 1f );</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.rotateAround (RectTransform)" class="method item">
|
||
<h3 class="name"><code>LeanTween.rotateAround (RectTransform)</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>rectTrans:RectTransform</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>axis:Vector3</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l2031"><code>LeanTween.cs:2031</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Rotate a RectTransform object (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">rectTrans:RectTransform</code>
|
||
<span class="type">RectTransform</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>RectTransform that you wish to attach the tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">axis:Vector3</code>
|
||
<span class="type">Vector3</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The axis in which to rotate the RectTransform (Vector3.forward is most commonly used)</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The degree with which to rotate the RectTransform</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.rotateAround(gameObject.GetComponent<RectTransform>(), Vector3.forward, 90f, 1f).setDelay(1f);</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.rotateAroundLocal" class="method item">
|
||
<h3 class="name"><code>LeanTween.rotateAroundLocal</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>vec:Vector3</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>degrees:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1609"><code>LeanTween.cs:1609</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Rotate a GameObject around a certain Axis in Local Space (the best method to use when you want to rotate beyond 180 degrees) </summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Gameobject that you wish to rotate</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">vec:Vector3</code>
|
||
<span class="type">Vector3</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>axis in which to rotate around ex: Vector3.up</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">degrees:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>the degrees in which to rotate</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>time The time to complete the rotation in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p><i>Example:</i><br />
|
||
LeanTween.rotateAround ( gameObject, Vector3.left, 90f, 1f );</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.rotateAroundLocal (RectTransform)" class="method item">
|
||
<h3 class="name"><code>LeanTween.rotateAroundLocal (RectTransform)</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>rectTrans:RectTransform</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>axis:Vector3</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l2046"><code>LeanTween.cs:2046</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Rotate a RectTransform object around it's local axis (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">rectTrans:RectTransform</code>
|
||
<span class="type">RectTransform</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>RectTransform that you wish to attach the tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">axis:Vector3</code>
|
||
<span class="type">Vector3</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The local axis in which to rotate the RectTransform (Vector3.forward is most commonly used)</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The degree with which to rotate the RectTransform</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.rotateAroundLocal(gameObject.GetComponent<RectTransform>(), Vector3.forward, 90f, 1f).setDelay(1f);</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.rotateLocal" class="method item">
|
||
<h3 class="name"><code>LeanTween.rotateLocal</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:Vector3</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1540"><code>LeanTween.cs:1540</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Rotate a GameObject in the objects local space (on the transforms localEulerAngles object)</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Gameobject that you wish to rotate</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:Vector3</code>
|
||
<span class="type">Vector3</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The final rotation with which to rotate to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the rotation in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div id="method_LeanTween.rotateX" class="method item">
|
||
<h3 class="name"><code>LeanTween.rotateX</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1553"><code>LeanTween.cs:1553</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<p>Rotate a GameObject only on the X axis <summary>Rotate a GameObject only on the X axis</summary></p>
|
||
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Gameobject that you wish to rotate</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The final x-axis rotation with which to rotate</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the rotation in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div id="method_LeanTween.rotateY" class="method item">
|
||
<h3 class="name"><code>LeanTween.rotateY</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1566"><code>LeanTween.cs:1566</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Rotate a GameObject only on the Y axis</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Gameobject that you wish to rotate</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The final y-axis rotation with which to rotate</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the rotation in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div id="method_LeanTween.rotateZ" class="method item">
|
||
<h3 class="name"><code>LeanTween.rotateZ</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1579"><code>LeanTween.cs:1579</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Rotate a GameObject only on the Z axis</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Gameobject that you wish to rotate</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The final z-axis rotation with which to rotate</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the rotation in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div id="method_LeanTween.scale" class="method item">
|
||
<h3 class="name"><code>LeanTween.scale</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>vec:Vector3</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1626"><code>LeanTween.cs:1626</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Scale a GameObject to a certain size</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>gameObject Gameobject that you wish to scale</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">vec:Vector3</code>
|
||
<span class="type">Vector3</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>to The size with which to tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>time The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div id="method_LeanTween.scale (GUI)" class="method item">
|
||
<h3 class="name"><code>LeanTween.scale (GUI)</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>LTRect</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>Vector2</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1639"><code>LeanTween.cs:1639</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Scale a GUI Element to a certain width and height</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">LTRect</code>
|
||
<span class="type"><a href="../classes/LTRect.html" class="crosslink">LTRect</a></span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>ltRect LTRect object that you wish to move</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">Vector2</code>
|
||
<span class="type">Vector2</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>to The final width and height to scale to (pixel based)</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>time The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p><i>Example Javascript: </i><br />
|
||
var bRect:LTRect = new LTRect( 0, 0, 100, 50 );<br />
|
||
LeanTween.scale( bRect, Vector2(bRect.rect.width, bRect.rect.height) * 1.3, 0.25 ).setEase(LeanTweenType.easeOutBounce);<br />
|
||
function OnGUI(){<br />
|
||
if(GUI.Button(bRect.rect, "Scale")){ }<br />
|
||
}<br />
|
||
<br />
|
||
<i>Example C#: </i> <br />
|
||
LTRect bRect = new LTRect( 0f, 0f, 100f, 50f );<br />
|
||
LeanTween.scale( bRect, new Vector2(150f,75f), 0.25f ).setEase(LeanTweenType.easeOutBounce);<br />
|
||
void OnGUI(){<br />
|
||
if(GUI.Button(bRect.rect, "Scale")){ }<br />
|
||
}<br /></p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.scale (RectTransform)" class="method item">
|
||
<h3 class="name"><code>LeanTween.scale (RectTransform)</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>rectTrans:RectTransform</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:Vector3</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l2061"><code>LeanTween.cs:2061</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Scale a RectTransform object (used in Unity GUI in 4.6+, for Buttons, Panel, Scrollbar, etc...)</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">rectTrans:RectTransform</code>
|
||
<span class="type">RectTransform</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>RectTransform that you wish to attach the tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:Vector3</code>
|
||
<span class="type">Vector3</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The final Vector3 with which to tween to (localScale)</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.scale(gameObject.GetComponent<RectTransform>(), gameObject.GetComponent<RectTransform>().localScale*2f, 1f).setDelay(1f);</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.scaleX" class="method item">
|
||
<h3 class="name"><code>LeanTween.scaleX</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>scaleTo:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1666"><code>LeanTween.cs:1666</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Scale a GameObject to a certain size along the x-axis only</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Gameobject that you wish to scale</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">scaleTo:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>the size with which to scale to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>the time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div id="method_LeanTween.scaleY" class="method item">
|
||
<h3 class="name"><code>LeanTween.scaleY</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>scaleTo:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1679"><code>LeanTween.cs:1679</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Scale a GameObject to a certain size along the y-axis only</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Gameobject that you wish to scale</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">scaleTo:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>the size with which to scale to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>the time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div id="method_LeanTween.scaleZ" class="method item">
|
||
<h3 class="name"><code>LeanTween.scaleZ</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>scaleTo:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1692"><code>LeanTween.cs:1692</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Scale a GameObject to a certain size along the z-axis only</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Gameobject that you wish to scale</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">scaleTo:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>the size with which to scale to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>the time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div id="method_LeanTween.sequence" class="method item">
|
||
<h3 class="name"><code>LeanTween.sequence</code></h3>
|
||
|
||
<span class="paren">()</span>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTSeq.html" class="crosslink">LTSeq</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1041"><code>LeanTween.cs:1041</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Retrieve a sequencer object where you can easily chain together tweens and methods one after another</summary>
|
||
</div>
|
||
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTSeq.html" class="crosslink">LTSeq</a></span>:
|
||
<p>LTSeq an object that you can add tweens, methods and time on to</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>var seq = LeanTween.sequence();<br />
|
||
seq.add(1f); // delay everything one second<br />
|
||
seq.add( () => { // fire an event before start<br />
|
||
Debug.Log("I have started");<br />
|
||
});<br />
|
||
seq.add( LeanTween.move(cube1, Vector3.one * 10f, 1f) ); // do a tween<br />
|
||
seq.add( () => { // fire event after tween<br />
|
||
Debug.Log("We are done now");<br />
|
||
});;<br /></p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.size (RectTransform)" class="method item">
|
||
<h3 class="name"><code>LeanTween.size (RectTransform)</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>rectTrans:RectTransform</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:Vector2</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l2075"><code>LeanTween.cs:2075</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Change the sizeDelta of a RectTransform object (used in Unity Canvas, for Buttons, Panel, Scrollbar, etc...)</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">rectTrans:RectTransform</code>
|
||
<span class="type">RectTransform</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>RectTransform that you wish to attach the tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:Vector2</code>
|
||
<span class="type">Vector2</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The final Vector2 the tween will end at for sizeDelta property</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>LeanTween.size(gameObject.GetComponent<RectTransform>(), gameObject.GetComponent<RectTransform>().sizeDelta*2f, 1f).setDelay(1f);</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.tweensRunning" class="method item">
|
||
<h3 class="name"><code>LeanTween.tweensRunning</code></h3>
|
||
|
||
<span class="paren">()</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l290"><code>LeanTween.cs:290</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Find out how many tweens you have animating at a given time</summary>
|
||
</div>
|
||
|
||
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p>Debug.Log("I have "+LeanTween.tweensRunning+" animating!");</p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.value (Color)" class="method item">
|
||
<h3 class="name"><code>LeanTween.value (Color)</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>callOnUpdate:Action<Color></code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>Color</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>Color</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>Color</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1867"><code>LeanTween.cs:1867</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Tween from one color to another</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>gameObject GameObject with which to tie the tweening with. This is only used when you need to cancel this tween, it does not actually perform any operations on this gameObject</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">callOnUpdate:Action<Color></code>
|
||
<span class="type">Action<Color></span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The function that is called on every Update frame, this function needs to accept a color value ex: function updateValue( Color val ){ }</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">Color</code>
|
||
<span class="type">Color</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>from The original value to start the tween from</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">Color</code>
|
||
<span class="type">Color</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>to The value to end the tween on</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">Color</code>
|
||
<span class="type">Color</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>time The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p><i>Example Javascript: </i><br />
|
||
LeanTween.value( gameObject, updateValueExampleCallback, Color.red, Color.green, 1f).setEase(LeanTweenType.easeOutElastic);<br />
|
||
function updateValueExampleCallback( val:Color ){<br />
|
||
Debug.Log("tweened color:"+val+" set this to whatever variable you are tweening...");<br />
|
||
}<br />
|
||
<br />
|
||
<i>Example C#: </i> <br />
|
||
LeanTween.value( gameObject, updateValueExampleCallback, Color.red, Color.green, 1f).setEase(LeanTweenType.easeOutElastic);<br />
|
||
void updateValueExampleCallback( Color val ){<br />
|
||
Debug.Log("tweened color:"+val+" set this to whatever variable you are tweening...");<br />
|
||
}<br /></p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.value (Color)" class="method item">
|
||
<h3 class="name"><code>LeanTween.value (Color)</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>from:Color</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:Color</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1780"><code>LeanTween.cs:1780</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<p>Tween any particular value (Color)<summary></summary></p>
|
||
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Gameobject that you wish to attach the tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">from:Color</code>
|
||
<span class="type">Color</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The original value to start the tween from</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:Color</code>
|
||
<span class="type">Color</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The final Color with which to tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p><i>Example Javascript: </i><br />
|
||
LeanTween.value( gameObject, Color.red, Color.yellow, 5f).setOnUpdate( function( val:Color ){ <br />
|
||
Debug.Log("tweened val:"+val);<br />
|
||
} );<br />
|
||
<br />
|
||
<i>Example C#: </i> <br />
|
||
LeanTween.value( gameObject, Color.red, Color.yellow, 5f).setOnUpdate( (Color val)=>{ <br />
|
||
Debug.Log("tweened val:"+val);<br />
|
||
} );<br /></p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.value (float)" class="method item">
|
||
<h3 class="name"><code>LeanTween.value (float)</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>from:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1705"><code>LeanTween.cs:1705</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Tween any particular value (float)</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Gameobject that you wish to attach the tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">from:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The original value to start the tween from</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:float</code>
|
||
<span class="type">Vector3</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The final float with which to tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p><i>Example Javascript: </i><br />
|
||
LeanTween.value( gameObject, 1f, 5f, 5f).setOnUpdate( function( val:float ){ <br />
|
||
Debug.Log("tweened val:"+val);<br />
|
||
} );<br />
|
||
<br />
|
||
<i>Example C#: </i> <br />
|
||
LeanTween.value( gameObject, 1f, 5f, 5f).setOnUpdate( (float val)=>{ <br />
|
||
Debug.Log("tweened val:"+val);<br />
|
||
} );<br /></p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.value (float)" class="method item">
|
||
<h3 class="name"><code>LeanTween.value (float)</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>callOnUpdateRatio:Action<float,float></code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1839"><code>LeanTween.cs:1839</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Tweens any float value, it does not need to be tied to any particular type or GameObject</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>gameObject GameObject with which to tie the tweening with. This is only used when you need to cancel this tween, it does not actually perform any operations on this gameObject</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">callOnUpdateRatio:Action<float,float></code>
|
||
<span class="type">Action<float, float></span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Function that's called every Update frame. It must accept two float values ex: function updateValue( float val, float ratio){ }</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>from The original value to start the tween from</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>to The value to end the tween on</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>time The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p><i>Example Javascript: </i><br />
|
||
LeanTween.value( gameObject, updateValueExampleCallback, 180f, 270f, 1f).setEase(LeanTweenType.easeOutElastic);<br />
|
||
function updateValueExampleCallback( val:float, ratio:float ){<br />
|
||
Debug.Log("tweened value:"+val+" percent complete:"+ratio<em>100);<br />
|
||
}<br />
|
||
<br />
|
||
<i>Example C#: </i> <br />
|
||
LeanTween.value( gameObject, updateValueExampleCallback, 180f, 270f, 1f).setEase(LeanTweenType.easeOutElastic);<br />
|
||
void updateValueExampleCallback( float val, float ratio ){<br />
|
||
Debug.Log("tweened value:"+val+" percent complete:"+ratio</em>100);<br />
|
||
}<br /></p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.value (float)" class="method item">
|
||
<h3 class="name"><code>LeanTween.value (float)</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>callOnUpdate:Action<float></code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1811"><code>LeanTween.cs:1811</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Tween any particular value, it does not need to be tied to any particular type or GameObject</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>gameObject GameObject with which to tie the tweening with. This is only used when you need to cancel this tween, it does not actually perform any operations on this gameObject</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">callOnUpdate:Action<float></code>
|
||
<span class="type">Action<float></span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The function that is called on every Update frame, this function needs to accept a float value ex: function updateValue( float val ){ }</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>from The original value to start the tween from</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>to The value to end the tween on</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>time The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p><i>Example Javascript: </i><br />
|
||
LeanTween.value( gameObject, updateValueExampleCallback, 180f, 270f, 1f).setEase(LeanTweenType.easeOutElastic);<br />
|
||
function updateValueExampleCallback( val:float ){<br />
|
||
Debug.Log("tweened value:"+val+" set this to whatever variable you are tweening...");<br />
|
||
}<br />
|
||
<br />
|
||
<i>Example C#: </i> <br />
|
||
LeanTween.value( gameObject, updateValueExampleCallback, 180f, 270f, 1f).setEase(LeanTweenType.easeOutElastic);<br />
|
||
void updateValueExampleCallback( float val ){<br />
|
||
Debug.Log("tweened value:"+val+" set this to whatever variable you are tweening...");<br />
|
||
}<br /></p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.value (float,object)" class="method item">
|
||
<h3 class="name"><code>LeanTween.value (float,object)</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>callOnUpdate:Action<float,object></code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>from:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:float</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1930"><code>LeanTween.cs:1930</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Tween any particular value (float)</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Gameobject that you wish to attach the tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">callOnUpdate:Action<float,object></code>
|
||
<span class="type">Action<float,object></span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The function that is called on every Update frame, this function needs to accept a float value ex: function updateValue( Vector3 val, object obj ){ }</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">from:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The original value to start the tween from</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:float</code>
|
||
<span class="type">Vector3</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The final Vector3 with which to tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div id="method_LeanTween.value (Vector2)" class="method item">
|
||
<h3 class="name"><code>LeanTween.value (Vector2)</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>callOnUpdate:Action<Vector2></code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>from:Vector2</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:Vector2</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1900"><code>LeanTween.cs:1900</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Tween any particular value (Vector2), this could be used to tween an arbitrary value like offset property</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Gameobject that you wish to attach the tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">callOnUpdate:Action<Vector2></code>
|
||
<span class="type">Action<Vector2></span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The function that is called on every Update frame, this function needs to accept a float value ex: function updateValue( Vector3 val ){ }</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">from:Vector2</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The original value to start the tween from</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:Vector2</code>
|
||
<span class="type">Vector2</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The final Vector3 with which to tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div id="method_LeanTween.value (Vector2)" class="method item">
|
||
<h3 class="name"><code>LeanTween.value (Vector2)</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>from:Vector2</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:Vector2</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1732"><code>LeanTween.cs:1732</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Tween any particular value (Vector2)</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Gameobject that you wish to attach the tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">from:Vector2</code>
|
||
<span class="type">Vector2</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The original value to start the tween from</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:Vector2</code>
|
||
<span class="type">Vector3</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The final Vector2 with which to tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p><i>Example Javascript: </i><br />
|
||
LeanTween.value( gameObject, new Vector2(1f,0f), new Vector3(5f,0f), 5f).setOnUpdate( function( val:Vector2 ){ <br />
|
||
Debug.Log("tweened val:"+val);<br />
|
||
} );<br />
|
||
<br />
|
||
<i>Example C#: </i> <br />
|
||
LeanTween.value( gameObject, new Vector3(1f,0f), new Vector3(5f,0f), 5f).setOnUpdate( (Vector2 val)=>{ <br />
|
||
Debug.Log("tweened val:"+val);<br />
|
||
} );<br /></p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.value (Vector3)" class="method item">
|
||
<h3 class="name"><code>LeanTween.value (Vector3)</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>from:Vector3</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:Vector3</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1756"><code>LeanTween.cs:1756</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Tween any particular value (Vector3)</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Gameobject that you wish to attach the tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">from:Vector3</code>
|
||
<span class="type">Vector3</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The original value to start the tween from</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:Vector3</code>
|
||
<span class="type">Vector3</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The final Vector3 with which to tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<div class="example">
|
||
<h4>Example:</h4>
|
||
|
||
<div class="example-content">
|
||
<p><i>Example Javascript: </i><br />
|
||
LeanTween.value( gameObject, new Vector3(1f,0f,0f), new Vector3(5f,0f,0f), 5f).setOnUpdate( function( val:Vector3 ){ <br />
|
||
Debug.Log("tweened val:"+val);<br />
|
||
} );<br />
|
||
<br />
|
||
<i>Example C#: </i> <br />
|
||
LeanTween.value( gameObject, new Vector3(1f,0f,0f), new Vector3(5f,0f,0f), 5f).setOnUpdate( (Vector3 val)=>{ <br />
|
||
Debug.Log("tweened val:"+val);<br />
|
||
} );<br /></p>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="method_LeanTween.value (Vector3)" class="method item">
|
||
<h3 class="name"><code>LeanTween.value (Vector3)</code></h3>
|
||
|
||
<div class="args">
|
||
<span class="paren">(</span><ul class="args-list inline commas">
|
||
<li class="arg">
|
||
<code>gameObject:GameObject</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>callOnUpdate:Action<Vector3></code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>from:Vector3</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>to:Vector3</code>
|
||
</li>
|
||
<li class="arg">
|
||
<code>time:float</code>
|
||
</li>
|
||
</ul><span class="paren">)</span>
|
||
</div>
|
||
|
||
<span class="returns-inline">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
|
||
</span>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="meta">
|
||
<p>
|
||
Defined in
|
||
<a href="../files/LeanTween.cs.html#l1915"><code>LeanTween.cs:1915</code></a>
|
||
</p>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<div class="description">
|
||
<summary>Tween any particular value (Vector3), this could be used to tween an arbitrary property that uses a Vector</summary>
|
||
</div>
|
||
|
||
<div class="params">
|
||
<h4>Parameters:</h4>
|
||
|
||
<ul class="params-list">
|
||
<li class="param">
|
||
<code class="param-name">gameObject:GameObject</code>
|
||
<span class="type">GameObject</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>Gameobject that you wish to attach the tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">callOnUpdate:Action<Vector3></code>
|
||
<span class="type">Action<Vector3></span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The function that is called on every Update frame, this function needs to accept a float value ex: function updateValue( Vector3 val ){ }</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">from:Vector3</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The original value to start the tween from</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">to:Vector3</code>
|
||
<span class="type">Vector3</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The final Vector3 with which to tween to</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
<li class="param">
|
||
<code class="param-name">time:float</code>
|
||
<span class="type">Float</span>
|
||
|
||
|
||
<div class="param-description">
|
||
<p>The time to complete the tween in</p>
|
||
|
||
</div>
|
||
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="returns">
|
||
<h4>Returns:</h4>
|
||
|
||
<div class="returns-description">
|
||
<span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
|
||
<p>LTDescr an object that distinguishes the tween</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<script src="../assets/vendor/prettify/prettify-min.js"></script>
|
||
<script>prettyPrint();</script>
|
||
<script src="../assets/js/yui-prettify.js"></script>
|
||
<script src="../assets/../api.js"></script>
|
||
<script src="../assets/js/api-filter.js"></script>
|
||
<script src="../assets/js/api-list.js"></script>
|
||
<script src="../assets/js/api-search.js"></script>
|
||
<script src="../assets/js/apidocs.js"></script>
|
||
</body>
|
||
</html>
|