<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>LTDescr</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.46</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/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>LTDescr Class</h1> <div class="box meta"> <div class="foundat"> Defined in: <a href="../files/LTDescr.cs.html#l5"><code>LTDescr.cs:5</code></a> </div> </div> <div class="box intro"> <p>Internal Representation of a Tween<br> <br> This class represents all of the optional parameters you can pass to a method (it also represents the internal representation of the tween).<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> You can also <strong>pass parameters at a later time</strong> by saving a reference to what is returned.<br> <br> Retrieve a <strong>unique id</strong> for the tween by using the "id" property. You can pass this to LeanTween.pause, LeanTween.resume, LeanTween.cancel, LeanTween.isTweening methods<br> <br> <h4>Example:</h4> int id = LeanTween.moveX(gameObject, 1f, 3f).id;<br></p> <div style="color:gray"> // pause a specific tween</div> LeanTween.pause(id);<br> <div style="color:gray"> // resume later</div> LeanTween.resume(id);<br> <div style="color:gray"> // check if it is tweening before kicking of a new tween</div> if( LeanTween.isTweening( id ) ){<br> LeanTween.cancel( id );<br> LeanTween.moveZ(gameObject, 10f, 3f);<br> }<br> </div> <div class="constructor"> <h2>Constructor</h2> <div id="method_LTDescr" class="method item"> <h3 class="name"><code>LTDescr</code></h3> <span class="paren">()</span> <div class="meta"> <p> Defined in <a href="../files/LTDescr.cs.html#l5"><code>LTDescr.cs:5</code></a> </p> </div> <div class="description"> </div> </div> </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_pause">pause</a> </li> <li class="index-item method"> <a href="#method_resume">resume</a> </li> <li class="index-item method"> <a href="#method_setAxis">setAxis</a> </li> <li class="index-item method"> <a href="#method_setDelay">setDelay</a> </li> <li class="index-item method"> <a href="#method_setDirection">setDirection</a> </li> <li class="index-item method"> <a href="#method_setEase">setEase</a> </li> <li class="index-item method"> <a href="#method_setEase (AnimationCurve)">setEase (AnimationCurve)</a> </li> <li class="index-item method"> <a href="#method_setFrom">setFrom</a> </li> <li class="index-item method"> <a href="#method_setIgnoreTimeScale">setIgnoreTimeScale</a> </li> <li class="index-item method"> <a href="#method_setLoopClamp">setLoopClamp</a> </li> <li class="index-item method"> <a href="#method_setLoopOnce">setLoopOnce</a> </li> <li class="index-item method"> <a href="#method_setLoopPingPong">setLoopPingPong</a> </li> <li class="index-item method"> <a href="#method_setOnComplete">setOnComplete</a> </li> <li class="index-item method"> <a href="#method_setOnComplete (object)">setOnComplete (object)</a> </li> <li class="index-item method"> <a href="#method_setOnCompleteOnRepeat">setOnCompleteOnRepeat</a> </li> <li class="index-item method"> <a href="#method_setOnCompleteOnStart">setOnCompleteOnStart</a> </li> <li class="index-item method"> <a href="#method_setOnCompleteParam">setOnCompleteParam</a> </li> <li class="index-item method"> <a href="#method_setOnStart">setOnStart</a> </li> <li class="index-item method"> <a href="#method_setOnUpdate">setOnUpdate</a> </li> <li class="index-item method"> <a href="#method_setOnUpdate (object)">setOnUpdate (object)</a> </li> <li class="index-item method"> <a href="#method_setOnUpdate (Vector3)">setOnUpdate (Vector3)</a> </li> <li class="index-item method"> <a href="#method_setOnUpdateParam">setOnUpdateParam</a> </li> <li class="index-item method"> <a href="#method_setOrientToPath">setOrientToPath</a> </li> <li class="index-item method"> <a href="#method_setOrientToPath2d">setOrientToPath2d</a> </li> <li class="index-item method"> <a href="#method_setOvershoot">setOvershoot</a> </li> <li class="index-item method"> <a href="#method_setPassed">setPassed</a> </li> <li class="index-item method"> <a href="#method_setPeriod">setPeriod</a> </li> <li class="index-item method"> <a href="#method_setPoint">setPoint</a> </li> <li class="index-item method"> <a href="#method_setRecursive">setRecursive</a> </li> <li class="index-item method"> <a href="#method_setRepeat">setRepeat</a> </li> <li class="index-item method"> <a href="#method_setScale">setScale</a> </li> <li class="index-item method"> <a href="#method_setSpeed">setSpeed</a> </li> <li class="index-item method"> <a href="#method_setTime">setTime</a> </li> <li class="index-item method"> <a href="#method_setTo">setTo</a> </li> <li class="index-item method"> <a href="#method_setUseFrames">setUseFrames</a> </li> <li class="index-item method"> <a href="#method_updateNow">updateNow</a> </li> </ul> </div> </div> <div id="methods" class="api-class-tabpanel"> <h2 class="off-left">Methods</h2> <div id="method_pause" class="method item"> <h3 class="name"><code>pause</code></h3> <span class="paren">()</span> <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/LTDescr.cs.html#l1160"><code>LTDescr.cs:1160</code></a> </p> </div> <div class="description"> <p>Pause a tween</p> </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_resume" class="method item"> <h3 class="name"><code>resume</code></h3> <span class="paren">()</span> <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/LTDescr.cs.html#l1175"><code>LTDescr.cs:1175</code></a> </p> </div> <div class="description"> <p>Resume a paused tween</p> </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_setAxis" class="method item"> <h3 class="name"><code>setAxis</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>axis</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/LTDescr.cs.html#l1187"><code>LTDescr.cs:1187</code></a> </p> </div> <div class="description"> <p>Set Axis optional axis for tweens where it is relevant</p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">axis</code> <span class="type">Vector3</span> <div class="param-description"> <p>either the tween rotates around, or the direction it faces in the case of setOrientToPath</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( ltLogo, path, 1.0f ).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true).setAxis(Vector3.forward);</p> </div> </div> </div> <div id="method_setDelay" class="method item"> <h3 class="name"><code>setDelay</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <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/LTDescr.cs.html#l1201"><code>LTDescr.cs:1201</code></a> </p> </div> <div class="description"> <p>Delay the start of a tween</p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <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.moveX(gameObject, 5f, 2.0f ).setDelay( 1.5f );</p> </div> </div> </div> <div id="method_setDirection" class="method item"> <h3 class="name"><code>setDirection</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>direction: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/LTDescr.cs.html#l2236"><code>LTDescr.cs:2236</code></a> </p> </div> <div class="description"> <p>Set the direction of a tween -1f for backwards 1f for forwards (currently only bezier and spline paths are supported)</p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">direction:float</code> <span class="type">Float</span> <div class="param-description"> <p>the direction that the tween should run, -1f for backwards 1f for forwards</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.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).setDirection(-1f);<br></p> </div> </div> </div> <div id="method_setEase" class="method item"> <h3 class="name"><code>setEase</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>easeType:LeanTweenType</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/LTDescr.cs.html#l1216"><code>LTDescr.cs:1216</code></a> </p> </div> <div class="description"> <p>Set the type of easing used for the tween. <br></p> <ul><li><a href="LeanTweenType.html">List of all the ease types</a>.</li> <li><a href="http://www.robertpenner.com/easing/easing_demo.html">This page helps visualize the different easing equations</a></li> </ul> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">easeType:LeanTweenType</code> <span class="type"><a href="../classes/LeanTweenType.html" class="crosslink">LeanTweenType</a></span> <div class="param-description"> <p>the easing type to use</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, 5f, 2.0f ).setEase( LeanTweenType.easeInBounce );</p> </div> </div> </div> <div id="method_setEase (AnimationCurve)" class="method item"> <h3 class="name"><code>setEase (AnimationCurve)</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>easeDefinition:AnimationCurve</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/LTDescr.cs.html#l1666"><code>LTDescr.cs:1666</code></a> </p> </div> <div class="description"> <p>Set the type of easing used for the tween with a custom curve. <br></p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">easeDefinition:AnimationCurve</code> <span class="type">AnimationCurve</span> <div class="param-description"> <p>an <a href="http://docs.unity3d.com/Documentation/ScriptReference/AnimationCurve.html" target="_blank">AnimationCure</a> that describes the type of easing you want, this is great for when you want a unique type of movement</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, 5f, 2.0f ).setEase( LeanTweenType.easeInBounce );</p> </div> </div> </div> <div id="method_setFrom" class="method item"> <h3 class="name"><code>setFrom</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>from:Vector3</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/LTDescr.cs.html#l1707"><code>LTDescr.cs:1707</code></a> </p> </div> <div class="description"> <p>Set the beginning of the tween</p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">from:Vector3</code> <span class="type">Vector3</span> <div class="param-description"> <p>the point you would like the tween to start at</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>LTDescr descr = LeanTween.move( cube, Vector3.up, new Vector3(1f,3f,0f), 1.0f ).setFrom( new Vector3(5f,10f,3f) );<br></p> </div> </div> </div> <div id="method_setIgnoreTimeScale" class="method item"> <h3 class="name"><code>setIgnoreTimeScale</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>useUnScaledTime:bool</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/LTDescr.cs.html#l1826"><code>LTDescr.cs:1826</code></a> </p> </div> <div class="description"> <p>Set ignore time scale when tweening an object when you want the animation to be time-scale independent (ignores the Time.timeScale value). Great for pause screens, when you want all other action to be stopped (or slowed down)</p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">useUnScaledTime:bool</code> <span class="type">Bool</span> <div class="param-description"> <p>whether to use the unscaled time or not</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, 5f, 2.0f ).setRepeat( 2 ).setIgnoreTimeScale( true );</p> </div> </div> </div> <div id="method_setLoopClamp" class="method item"> <h3 class="name"><code>setLoopClamp</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>loops:int</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/LTDescr.cs.html#l1875"><code>LTDescr.cs:1875</code></a> </p> </div> <div class="description"> <p>When the animation gets to the end it starts back at where it began</p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">loops:int</code> <span class="type">Int</span> <div class="param-description"> <p>(defaults to -1) how many times you want the loop to happen (-1 for an infinite number of times)</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, 5f, 2.0f ).setLoopClamp( 2 );</p> </div> </div> </div> <div id="method_setLoopOnce" class="method item"> <h3 class="name"><code>setLoopOnce</code></h3> <span class="paren">()</span> <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/LTDescr.cs.html#l1866"><code>LTDescr.cs:1866</code></a> </p> </div> <div class="description"> <p>No looping involved, just run once (the default)</p> </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, 5f, 2.0f ).setLoopOnce();</p> </div> </div> </div> <div id="method_setLoopPingPong" class="method item"> <h3 class="name"><code>setLoopPingPong</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>loops:int</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/LTDescr.cs.html#l1894"><code>LTDescr.cs:1894</code></a> </p> </div> <div class="description"> <p>When the animation gets to the end it then tweens back to where it started (and on, and on)</p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">loops:int</code> <span class="type">Int</span> <div class="param-description"> <p>(defaults to -1) how many times you want the loop to happen in both directions (-1 for an infinite number of times). Passing a value of 1 will cause the object to go towards and back from it's destination once.</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, 5f, 2.0f ).setLoopPingPong( 2 );</p> </div> </div> </div> <div id="method_setOnComplete" class="method item"> <h3 class="name"><code>setOnComplete</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>onComplete:Action</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/LTDescr.cs.html#l1914"><code>LTDescr.cs:1914</code></a> </p> </div> <div class="description"> <p>Have a method called when the tween finishes</p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">onComplete:Action</code> <span class="type">Action</span> <div class="param-description"> <p>the method that should be called when the tween is finished ex: tweenFinished(){ }</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, 5f, 2.0f ).setOnComplete( tweenFinished );</p> </div> </div> </div> <div id="method_setOnComplete (object)" class="method item"> <h3 class="name"><code>setOnComplete (object)</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>onComplete:Action<object></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/LTDescr.cs.html#l1928"><code>LTDescr.cs:1928</code></a> </p> </div> <div class="description"> <p>Have a method called when the tween finishes</p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">onComplete:Action<object></code> <span class="type">Action<object></span> <div class="param-description"> <p>the method that should be called when the tween is finished ex: tweenFinished( object myObj ){ }</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, 5f, 2.0f ).setOnComplete( tweenFinished );</p> </div> </div> </div> <div id="method_setOnCompleteOnRepeat" class="method item"> <h3 class="name"><code>setOnCompleteOnRepeat</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>isOn:bool</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/LTDescr.cs.html#l2174"><code>LTDescr.cs:2174</code></a> </p> </div> <div class="description"> <p>Set the onComplete method to be called at the end of every loop cycle (also applies to the delayedCall method)</p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">isOn:bool</code> <span class="type">Bool</span> <div class="param-description"> <p>does call onComplete on every loop cycle</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,0.3f, delayedMethod).setRepeat(4).setOnCompleteOnRepeat(true);</p> </div> </div> </div> <div id="method_setOnCompleteOnStart" class="method item"> <h3 class="name"><code>setOnCompleteOnStart</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>isOn:bool</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/LTDescr.cs.html#l2187"><code>LTDescr.cs:2187</code></a> </p> </div> <div class="description"> <p>Set the onComplete method to be called at the beginning of the tween (it will still be called when it is completed as well)</p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">isOn:bool</code> <span class="type">Bool</span> <div class="param-description"> <p>does call onComplete at the start of the tween</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, 2f, ()=>{<br> // Flash an object 5 times LeanTween.alpha(gameObject, 0f, 1f);<br> LeanTween.alpha(gameObject, 1f, 0f).setDelay(1f);<br> }).setOnCompleteOnStart(true).setRepeat(5);<br></p> </div> </div> </div> <div id="method_setOnCompleteParam" class="method item"> <h3 class="name"><code>setOnCompleteParam</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>onComplete:object</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/LTDescr.cs.html#l1949"><code>LTDescr.cs:1949</code></a> </p> </div> <div class="description"> <p>Pass an object to along with the onComplete Function</p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">onComplete:object</code> <span class="type">Object</span> <div class="param-description"> <p>an object that</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(1.5f, enterMiniGameStart).setOnCompleteParam( new object[]{""+5} );<br><br> void enterMiniGameStart( object val ){<br> object[] arr = (object [])val;<br> int lvl = int.Parse((string)arr[0]);<br> }<br></p> </div> </div> </div> <div id="method_setOnStart" class="method item"> <h3 class="name"><code>setOnStart</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>onStart:Action<></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/LTDescr.cs.html#l2220"><code>LTDescr.cs:2220</code></a> </p> </div> <div class="description"> <p>Have a method called when the tween starts</p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">onStart:Action<></code> <span class="type">Action<></span> <div class="param-description"> <p>the method that should be called when the tween is starting ex: tweenStarted( ){ }</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>C#:</i><br> LeanTween.moveX(gameObject, 5f, 2.0f ).setOnStart( ()=>{ Debug.Log("I started!"); }); <i>Javascript:</i><br> LeanTween.moveX(gameObject, 5f, 2.0f ).setOnStart( function(){ Debug.Log("I started!"); } );</p> </div> </div> </div> <div id="method_setOnUpdate" class="method item"> <h3 class="name"><code>setOnUpdate</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>onUpdate:Action<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/LTDescr.cs.html#l1968"><code>LTDescr.cs:1968</code></a> </p> </div> <div class="description"> <p>Have a method called on each frame that the tween is being animated (passes a float value)</p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">onUpdate:Action<float></code> <span class="type">Action<float></span> <div class="param-description"> <p>a method that will be called on every frame with the float value of the tweened 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.moveX(gameObject, 5f, 2.0f ).setOnUpdate( tweenMoved );<br> <br> void tweenMoved( float val ){ }<br></p> </div> </div> </div> <div id="method_setOnUpdate (object)" class="method item"> <h3 class="name"><code>setOnUpdate (object)</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>onUpdate:Action<float,object></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/LTDescr.cs.html#l2030"><code>LTDescr.cs:2030</code></a> </p> </div> <div class="description"> <p>Have a method called on each frame that the tween is being animated (passes a float value and a object)</p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">onUpdate:Action<float,object></code> <span class="type">Action<float,object></span> <div class="param-description"> <p>a method that will be called on every frame with the float value of the tweened object, and an object of the person's choosing</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, 5f, 2.0f ).setOnUpdate( tweenMoved ).setOnUpdateParam( myObject );<br> <br> void tweenMoved( float val, object obj ){ }<br></p> </div> </div> </div> <div id="method_setOnUpdate (Vector3)" class="method item"> <h3 class="name"><code>setOnUpdate (Vector3)</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>onUpdate:Action<Vector3></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/LTDescr.cs.html#l2064"><code>LTDescr.cs:2064</code></a> </p> </div> <div class="description"> <p>Have a method called on each frame that the tween is being animated (passes a float value)</p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">onUpdate:Action<Vector3></code> <span class="type">Action<Vector3></span> <div class="param-description"> <p>a method that will be called on every frame with the float value of the tweened 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.moveX(gameObject, 5f, 2.0f ).setOnUpdate( tweenMoved );<br> <br> void tweenMoved( Vector3 val ){ }<br></p> </div> </div> </div> <div id="method_setOnUpdateParam" class="method item"> <h3 class="name"><code>setOnUpdateParam</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>onUpdateParam:object</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/LTDescr.cs.html#l2084"><code>LTDescr.cs:2084</code></a> </p> </div> <div class="description"> <p>Have an object passed along with the onUpdate method</p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">onUpdateParam:object</code> <span class="type">Object</span> <div class="param-description"> <p>an object that will be passed along with the onUpdate method</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, 5f, 2.0f ).setOnUpdate( tweenMoved ).setOnUpdateParam( myObject );<br> <br> void tweenMoved( float val, object obj ){ }<br></p> </div> </div> </div> <div id="method_setOrientToPath" class="method item"> <h3 class="name"><code>setOrientToPath</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>doesOrient:bool</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/LTDescr.cs.html#l2099"><code>LTDescr.cs:2099</code></a> </p> </div> <div class="description"> <p>While tweening along a curve, set this property to true, to be perpendicalur to the path it is moving upon</p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">doesOrient:bool</code> <span class="type">Bool</span> <div class="param-description"> <p>whether the gameobject will orient to the path it is animating along</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( ltLogo, path, 1.0f ).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true).setAxis(Vector3.forward);<br></p> </div> </div> </div> <div id="method_setOrientToPath2d" class="method item"> <h3 class="name"><code>setOrientToPath2d</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>doesOrient:bool</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/LTDescr.cs.html#l2118"><code>LTDescr.cs:2118</code></a> </p> </div> <div class="description"> <p>While tweening along a curve, set this property to true, to be perpendicalur to the path it is moving upon</p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">doesOrient:bool</code> <span class="type">Bool</span> <div class="param-description"> <p>whether the gameobject will orient to the path it is animating along</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( ltLogo, path, 1.0f ).setEase(LeanTweenType.easeOutQuad).setOrientToPath2d(true).setAxis(Vector3.forward);<br></p> </div> </div> </div> <div id="method_setOvershoot" class="method item"> <h3 class="name"><code>setOvershoot</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>overshoot: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/LTDescr.cs.html#l1627"><code>LTDescr.cs:1627</code></a> </p> </div> <div class="description"> <p>Set how far past a tween will overshoot for certain ease types (compatible: easeInBack, easeInOutBack, easeOutBack, easeOutElastic, easeInElastic, easeInOutElastic). <br></p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">overshoot:float</code> <span class="type">Float</span> <div class="param-description"> <p>how far past the destination it will go before settling 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, 5f, 2.0f ).setEase( LeanTweenType.easeOutBack ).setOvershoot(2f);</p> </div> </div> </div> <div id="method_setPassed" class="method item"> <h3 class="name"><code>setPassed</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>passedTime: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/LTDescr.cs.html#l1747"><code>LTDescr.cs:1747</code></a> </p> </div> <div class="description"> <p>Set the point of time the tween will start in</p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">passedTime:float</code> <span class="type">Float</span> <div class="param-description"> <p>the length of time in seconds the tween will start 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>int tweenId = LeanTween.moveX(gameObject, 5f, 2.0f ).id;<br> // Later<br> LTDescr descr = description( tweenId );<br> descr.setPassed( 1f );<br></p> </div> </div> </div> <div id="method_setPeriod" class="method item"> <h3 class="name"><code>setPeriod</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>period: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/LTDescr.cs.html#l1640"><code>LTDescr.cs:1640</code></a> </p> </div> <div class="description"> <p>Set how short the iterations are for certain ease types (compatible: easeOutElastic, easeInElastic, easeInOutElastic). <br></p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">period:float</code> <span class="type">Float</span> <div class="param-description"> <p>how short the iterations are that the tween will animate at (default 0.3f)</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, 5f, 2.0f ).setEase( LeanTweenType.easeOutElastic ).setPeriod(0.3f);</p> </div> </div> </div> <div id="method_setPoint" class="method item"> <h3 class="name"><code>setPoint</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>point:Vector3</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/LTDescr.cs.html#l2151"><code>LTDescr.cs:2151</code></a> </p> </div> <div class="description"> <p>Set the point at which the GameObject will be rotated around</p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">point:Vector3</code> <span class="type">Vector3</span> <div class="param-description"> <p>point at which you want the object to rotate around (local space)</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( cube, Vector3.up, 360.0f, 1.0f ) .setPoint( new Vector3(1f,0f,0f) ) .setEase( LeanTweenType.easeInOutBounce );<br></p> </div> </div> </div> <div id="method_setRecursive" class="method item"> <h3 class="name"><code>setRecursive</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>useRecursion:bool</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/LTDescr.cs.html#l2268"><code>LTDescr.cs:2268</code></a> </p> </div> <div class="description"> <p>Set whether or not the tween will recursively effect an objects children in the hierarchy</p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">useRecursion:bool</code> <span class="type">Bool</span> <div class="param-description"> <p>whether the tween will recursively effect an objects children in the hierarchy</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, 0f, 1f).setRecursive(true);<br></p> </div> </div> </div> <div id="method_setRepeat" class="method item"> <h3 class="name"><code>setRepeat</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>repeatNum:int</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/LTDescr.cs.html#l1796"><code>LTDescr.cs:1796</code></a> </p> </div> <div class="description"> <p>Set the tween to repeat a number of times.</p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">repeatNum:int</code> <span class="type">Int</span> <div class="param-description"> <p>the number of times to repeat the tween. -1 to repeat infinite times</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, 5f, 2.0f ).setRepeat( 10 ).setLoopPingPong();</p> </div> </div> </div> <div id="method_setScale" class="method item"> <h3 class="name"><code>setScale</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>scale: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/LTDescr.cs.html#l1653"><code>LTDescr.cs:1653</code></a> </p> </div> <div class="description"> <p>Set how large the effect is for certain ease types (compatible: punch, shake, animation curves). <br></p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">scale:float</code> <span class="type">Float</span> <div class="param-description"> <p>how much the ease will be multiplied by (default 1f)</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, 5f, 2.0f ).setEase( LeanTweenType.punch ).setScale(2f);</p> </div> </div> </div> <div id="method_setSpeed" class="method item"> <h3 class="name"><code>setSpeed</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>speed: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/LTDescr.cs.html#l1781"><code>LTDescr.cs:1781</code></a> </p> </div> <div class="description"> <p>Set the finish time of the tween</p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">speed:float</code> <span class="type">Float</span> <div class="param-description"> <p>the speed in unity units per second you wish the object to travel (overrides the given time)</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.moveLocalZ( gameObject, 10f, 1f).setSpeed(0.2f) // the given time is ignored when speed is set<br></p> </div> </div> </div> <div id="method_setTime" class="method item"> <h3 class="name"><code>setTime</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>finishTime: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/LTDescr.cs.html#l1763"><code>LTDescr.cs:1763</code></a> </p> </div> <div class="description"> <p>Set the finish time of the tween</p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">finishTime:float</code> <span class="type">Float</span> <div class="param-description"> <p>the length of time in seconds you wish the tween to complete 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>int tweenId = LeanTween.moveX(gameObject, 5f, 2.0f ).id;<br> // Later<br> LTDescr descr = description( tweenId );<br> descr.setTime( 1f );<br></p> </div> </div> </div> <div id="method_setTo" class="method item"> <h3 class="name"><code>setTo</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>to:Vector3</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/LTDescr.cs.html#l1681"><code>LTDescr.cs:1681</code></a> </p> </div> <div class="description"> <p>Set the end that the GameObject is tweening towards</p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">to:Vector3</code> <span class="type">Vector3</span> <div class="param-description"> <p>point at which you want the tween to reach</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>LTDescr descr = LeanTween.move( cube, Vector3.up, new Vector3(1f,3f,0f), 1.0f ).setEase( LeanTweenType.easeInOutBounce );<br> // Later your want to change your destination or your destiation is constantly moving<br> descr.setTo( new Vector3(5f,10f,3f) );<br></p> </div> </div> </div> <div id="method_setUseFrames" class="method item"> <h3 class="name"><code>setUseFrames</code></h3> <div class="args"> <span class="paren">(</span><ul class="args-list inline commas"> <li class="arg"> <code>useFrames:bool</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/LTDescr.cs.html#l1840"><code>LTDescr.cs:1840</code></a> </p> </div> <div class="description"> <p>Use frames when tweening an object, when you don't want the animation to be time-frame independent...</p> </div> <div class="params"> <h4>Parameters:</h4> <ul class="params-list"> <li class="param"> <code class="param-name">useFrames:bool</code> <span class="type">Bool</span> <div class="param-description"> <p>whether to use estimated time or not</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, 5f, 2.0f ).setRepeat( 2 ).setUseFrames( true );</p> </div> </div> </div> <div id="method_updateNow" class="method item"> <h3 class="name"><code>updateNow</code></h3> <span class="paren">()</span> <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/LTDescr.cs.html#l925"><code>LTDescr.cs:925</code></a> </p> </div> <div class="description"> <p>If you need a tween to happen immediately instead of waiting for the next Update call, you can force it with this method</p> </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, 5f, 0f ).updateNow();</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>