You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2940 lines
199 KiB

4 years ago
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>LTDescr</title>
  6. <link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0pr2/build/cssgrids/cssgrids-min.css">
  7. <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
  8. <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
  9. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
  10. <script>
  11. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  12. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  13. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  14. })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  15. ga('create', 'UA-23694672-1', 'dentedpixel.com');
  16. ga('send', 'pageview');
  17. </script>
  18. <script src="../assets/js/leantween.js"></script>
  19. <link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
  20. <script src="http://yui.yahooapis.com/combo?3.8.0pr2/build/yui/yui-min.js"></script>
  21. </head>
  22. <body class="yui3-skin-sam">
  23. <div id="doc">
  24. <div id="hd" class="yui3-g header">
  25. <div class="yui3-u-3-4">
  26. <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>
  27. </div>
  28. <div class="yui3-u-1-4 version">
  29. <em style="margin-top:2px">API Docs for: LeanTween 2.46</em><br>
  30. <table id="support">
  31. <tr>
  32. <td>
  33. <h3 style="margin:7px 0 3px 0; width: 200px;">Support LeanTween!</h3>
  34. <!--<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>
  35. -->
  36. </td>
  37. <td><!--
  38. <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>-->
  39. <form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="margin-top:5px;">
  40. <!--<div style="margin:2px 0px 6px 24px; float:left;">or </div>-->
  41. <input type="hidden" name="cmd" value="_s-xclick">
  42. <input type="hidden" name="hosted_button_id" value="YJPUT3RAK5VL8">
  43. <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!">
  44. <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
  45. </form>
  46. </td>
  47. </tr>
  48. </table>
  49. </div>
  50. <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>
  51. </div>
  52. <div id="bd" class="yui3-g">
  53. <div class="yui3-u-1-4">
  54. <div id="docs-sidebar" class="sidebar apidocs">
  55. <div id="api-list">
  56. <h2 class="off-left">APIs</h2>
  57. <div id="api-tabview" class="tabview">
  58. <ul class="tabs">
  59. <li><a href="#api-classes">Classes</a></li>
  60. <li><a href="#api-modules">Modules</a></li>
  61. </ul>
  62. <div id="api-tabview-filter">
  63. <input type="search" id="api-filter" placeholder="Type to filter APIs">
  64. </div>
  65. <div id="api-tabview-panel">
  66. <ul id="api-classes" class="apis classes">
  67. <li><a href="../classes/LeanAudio.html">LeanAudio</a></li>
  68. <li><a href="../classes/LeanAudioOptions.html">LeanAudioOptions</a></li>
  69. <li><a href="../classes/LeanTween.html">LeanTween</a></li>
  70. <li><a href="../classes/LeanTweenType.html">LeanTweenType</a></li>
  71. <li><a href="../classes/LTBezierPath.html">LTBezierPath</a></li>
  72. <li><a href="../classes/LTDescr.html">LTDescr</a></li>
  73. <li><a href="../classes/LTEvent.html">LTEvent</a></li>
  74. <li><a href="../classes/LTRect.html">LTRect</a></li>
  75. <li><a href="../classes/LTSeq.html">LTSeq</a></li>
  76. <li><a href="../classes/LTSpline.html">LTSpline</a></li>
  77. </ul>
  78. <ul id="api-modules" class="apis modules">
  79. </ul>
  80. </div>
  81. </div>
  82. </div>
  83. <div id="advertising">
  84. <h2>More From<br><a href="http://www.dentedpixel.com">Dented Pixel</a></h2><br>
  85. <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>
  86. <br>
  87. <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>
  88. <br>
  89. <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>
  90. </div>
  91. </div>
  92. </div>
  93. <div class="yui3-u-3-4">
  94. <div id="api-options">
  95. Show:
  96. <label for="api-show-inherited">
  97. <input type="checkbox" id="api-show-inherited" checked>
  98. Inherited
  99. </label>
  100. <label for="api-show-protected">
  101. <input type="checkbox" id="api-show-protected">
  102. Protected
  103. </label>
  104. <label for="api-show-private">
  105. <input type="checkbox" id="api-show-private">
  106. Private
  107. </label>
  108. <label for="api-show-deprecated">
  109. <input type="checkbox" id="api-show-deprecated">
  110. Deprecated
  111. </label>
  112. </div>
  113. <div class="apidocs">
  114. <div id="docs-main">
  115. <div class="content">
  116. <h1>LTDescr Class</h1>
  117. <div class="box meta">
  118. <div class="foundat">
  119. Defined in: <a href="../files/LTDescr.cs.html#l5"><code>LTDescr.cs:5</code></a>
  120. </div>
  121. </div>
  122. <div class="box intro">
  123. <p>Internal Representation of a Tween<br>
  124. <br>
  125. 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>
  126. <strong id='optional'>Optional Parameters</strong> are passed at the end of every method:<br>
  127. <br>
  128.   <i>Example:</i><br>
  129.   LeanTween.moveX( gameObject, 1f, 1f).setEase( <a href="LeanTweenType.html">LeanTweenType</a>.easeInQuad ).setDelay(1f);<br>
  130. <br>
  131. You can pass the optional parameters in any order, and chain on as many as you wish.<br>
  132. You can also <strong>pass parameters at a later time</strong> by saving a reference to what is returned.<br>
  133. <br>
  134. Retrieve a <strong>unique id</strong> for the tween by using the &quot;id&quot; property. You can pass this to LeanTween.pause, LeanTween.resume, LeanTween.cancel, LeanTween.isTweening methods<br>
  135. <br>
  136.   <h4>Example:</h4>
  137.   int id = LeanTween.moveX(gameObject, 1f, 3f).id;<br></p>
  138. <div style="color:gray">&nbsp;&nbsp;// pause a specific tween</div>
  139. &nbsp;&nbsp;LeanTween.pause(id);<br>
  140. <div style="color:gray">&nbsp;&nbsp;// resume later</div>
  141. &nbsp;&nbsp;LeanTween.resume(id);<br>
  142. <div style="color:gray">&nbsp;&nbsp;// check if it is tweening before kicking of a new tween</div>
  143. &nbsp;&nbsp;if( LeanTween.isTweening( id ) ){<br>
  144. &nbsp;&nbsp; &nbsp;&nbsp; LeanTween.cancel( id );<br>
  145. &nbsp;&nbsp; &nbsp;&nbsp; LeanTween.moveZ(gameObject, 10f, 3f);<br>
  146. &nbsp;&nbsp;}<br>
  147. </div>
  148. <div class="constructor">
  149. <h2>Constructor</h2>
  150. <div id="method_LTDescr" class="method item">
  151. <h3 class="name"><code>LTDescr</code></h3>
  152. <span class="paren">()</span>
  153. <div class="meta">
  154. <p>
  155. Defined in
  156. <a href="../files/LTDescr.cs.html#l5"><code>LTDescr.cs:5</code></a>
  157. </p>
  158. </div>
  159. <div class="description">
  160. </div>
  161. </div>
  162. </div>
  163. <div id="classdocs" class="tabview">
  164. <ul class="api-class-tabs">
  165. <li class="api-class-tab index"><a href="#index">Index</a></li>
  166. <li class="api-class-tab methods"><a href="#methods">Methods</a></li>
  167. </ul>
  168. <div>
  169. <div id="index" class="api-class-tabpanel index">
  170. <h2 class="off-left">Item Index</h2>
  171. <div class="index-section methods">
  172. <h3>Methods</h3>
  173. <ul class="index-list methods">
  174. <li class="index-item method">
  175. <a href="#method_pause">pause</a>
  176. </li>
  177. <li class="index-item method">
  178. <a href="#method_resume">resume</a>
  179. </li>
  180. <li class="index-item method">
  181. <a href="#method_setAxis">setAxis</a>
  182. </li>
  183. <li class="index-item method">
  184. <a href="#method_setDelay">setDelay</a>
  185. </li>
  186. <li class="index-item method">
  187. <a href="#method_setDirection">setDirection</a>
  188. </li>
  189. <li class="index-item method">
  190. <a href="#method_setEase">setEase</a>
  191. </li>
  192. <li class="index-item method">
  193. <a href="#method_setEase (AnimationCurve)">setEase (AnimationCurve)</a>
  194. </li>
  195. <li class="index-item method">
  196. <a href="#method_setFrom">setFrom</a>
  197. </li>
  198. <li class="index-item method">
  199. <a href="#method_setIgnoreTimeScale">setIgnoreTimeScale</a>
  200. </li>
  201. <li class="index-item method">
  202. <a href="#method_setLoopClamp">setLoopClamp</a>
  203. </li>
  204. <li class="index-item method">
  205. <a href="#method_setLoopOnce">setLoopOnce</a>
  206. </li>
  207. <li class="index-item method">
  208. <a href="#method_setLoopPingPong">setLoopPingPong</a>
  209. </li>
  210. <li class="index-item method">
  211. <a href="#method_setOnComplete">setOnComplete</a>
  212. </li>
  213. <li class="index-item method">
  214. <a href="#method_setOnComplete (object)">setOnComplete (object)</a>
  215. </li>
  216. <li class="index-item method">
  217. <a href="#method_setOnCompleteOnRepeat">setOnCompleteOnRepeat</a>
  218. </li>
  219. <li class="index-item method">
  220. <a href="#method_setOnCompleteOnStart">setOnCompleteOnStart</a>
  221. </li>
  222. <li class="index-item method">
  223. <a href="#method_setOnCompleteParam">setOnCompleteParam</a>
  224. </li>
  225. <li class="index-item method">
  226. <a href="#method_setOnStart">setOnStart</a>
  227. </li>
  228. <li class="index-item method">
  229. <a href="#method_setOnUpdate">setOnUpdate</a>
  230. </li>
  231. <li class="index-item method">
  232. <a href="#method_setOnUpdate (object)">setOnUpdate (object)</a>
  233. </li>
  234. <li class="index-item method">
  235. <a href="#method_setOnUpdate (Vector3)">setOnUpdate (Vector3)</a>
  236. </li>
  237. <li class="index-item method">
  238. <a href="#method_setOnUpdateParam">setOnUpdateParam</a>
  239. </li>
  240. <li class="index-item method">
  241. <a href="#method_setOrientToPath">setOrientToPath</a>
  242. </li>
  243. <li class="index-item method">
  244. <a href="#method_setOrientToPath2d">setOrientToPath2d</a>
  245. </li>
  246. <li class="index-item method">
  247. <a href="#method_setOvershoot">setOvershoot</a>
  248. </li>
  249. <li class="index-item method">
  250. <a href="#method_setPassed">setPassed</a>
  251. </li>
  252. <li class="index-item method">
  253. <a href="#method_setPeriod">setPeriod</a>
  254. </li>
  255. <li class="index-item method">
  256. <a href="#method_setPoint">setPoint</a>
  257. </li>
  258. <li class="index-item method">
  259. <a href="#method_setRecursive">setRecursive</a>
  260. </li>
  261. <li class="index-item method">
  262. <a href="#method_setRepeat">setRepeat</a>
  263. </li>
  264. <li class="index-item method">
  265. <a href="#method_setScale">setScale</a>
  266. </li>
  267. <li class="index-item method">
  268. <a href="#method_setSpeed">setSpeed</a>
  269. </li>
  270. <li class="index-item method">
  271. <a href="#method_setTime">setTime</a>
  272. </li>
  273. <li class="index-item method">
  274. <a href="#method_setTo">setTo</a>
  275. </li>
  276. <li class="index-item method">
  277. <a href="#method_setUseFrames">setUseFrames</a>
  278. </li>
  279. <li class="index-item method">
  280. <a href="#method_updateNow">updateNow</a>
  281. </li>
  282. </ul>
  283. </div>
  284. </div>
  285. <div id="methods" class="api-class-tabpanel">
  286. <h2 class="off-left">Methods</h2>
  287. <div id="method_pause" class="method item">
  288. <h3 class="name"><code>pause</code></h3>
  289. <span class="paren">()</span>
  290. <span class="returns-inline">
  291. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  292. </span>
  293. <div class="meta">
  294. <p>
  295. Defined in
  296. <a href="../files/LTDescr.cs.html#l1160"><code>LTDescr.cs:1160</code></a>
  297. </p>
  298. </div>
  299. <div class="description">
  300. <p>Pause a tween</p>
  301. </div>
  302. <div class="returns">
  303. <h4>Returns:</h4>
  304. <div class="returns-description">
  305. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  306. <p>LTDescr an object that distinguishes the tween</p>
  307. </div>
  308. </div>
  309. </div>
  310. <div id="method_resume" class="method item">
  311. <h3 class="name"><code>resume</code></h3>
  312. <span class="paren">()</span>
  313. <span class="returns-inline">
  314. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  315. </span>
  316. <div class="meta">
  317. <p>
  318. Defined in
  319. <a href="../files/LTDescr.cs.html#l1175"><code>LTDescr.cs:1175</code></a>
  320. </p>
  321. </div>
  322. <div class="description">
  323. <p>Resume a paused tween</p>
  324. </div>
  325. <div class="returns">
  326. <h4>Returns:</h4>
  327. <div class="returns-description">
  328. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  329. <p>LTDescr an object that distinguishes the tween</p>
  330. </div>
  331. </div>
  332. </div>
  333. <div id="method_setAxis" class="method item">
  334. <h3 class="name"><code>setAxis</code></h3>
  335. <div class="args">
  336. <span class="paren">(</span><ul class="args-list inline commas">
  337. <li class="arg">
  338. <code>axis</code>
  339. </li>
  340. </ul><span class="paren">)</span>
  341. </div>
  342. <span class="returns-inline">
  343. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  344. </span>
  345. <div class="meta">
  346. <p>
  347. Defined in
  348. <a href="../files/LTDescr.cs.html#l1187"><code>LTDescr.cs:1187</code></a>
  349. </p>
  350. </div>
  351. <div class="description">
  352. <p>Set Axis optional axis for tweens where it is relevant</p>
  353. </div>
  354. <div class="params">
  355. <h4>Parameters:</h4>
  356. <ul class="params-list">
  357. <li class="param">
  358. <code class="param-name">axis</code>
  359. <span class="type">Vector3</span>
  360. <div class="param-description">
  361. <p>either the tween rotates around, or the direction it faces in the case of setOrientToPath</p>
  362. </div>
  363. </li>
  364. </ul>
  365. </div>
  366. <div class="returns">
  367. <h4>Returns:</h4>
  368. <div class="returns-description">
  369. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  370. <p>LTDescr an object that distinguishes the tween</p>
  371. </div>
  372. </div>
  373. <div class="example">
  374. <h4>Example:</h4>
  375. <div class="example-content">
  376. <p>LeanTween.move( ltLogo, path, 1.0f ).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true).setAxis(Vector3.forward);</p>
  377. </div>
  378. </div>
  379. </div>
  380. <div id="method_setDelay" class="method item">
  381. <h3 class="name"><code>setDelay</code></h3>
  382. <div class="args">
  383. <span class="paren">(</span><ul class="args-list inline commas">
  384. <li class="arg">
  385. <code>float</code>
  386. </li>
  387. </ul><span class="paren">)</span>
  388. </div>
  389. <span class="returns-inline">
  390. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  391. </span>
  392. <div class="meta">
  393. <p>
  394. Defined in
  395. <a href="../files/LTDescr.cs.html#l1201"><code>LTDescr.cs:1201</code></a>
  396. </p>
  397. </div>
  398. <div class="description">
  399. <p>Delay the start of a tween</p>
  400. </div>
  401. <div class="params">
  402. <h4>Parameters:</h4>
  403. <ul class="params-list">
  404. <li class="param">
  405. <code class="param-name">float</code>
  406. <span class="type">Float</span>
  407. <div class="param-description">
  408. <p>time The time to complete the tween in</p>
  409. </div>
  410. </li>
  411. </ul>
  412. </div>
  413. <div class="returns">
  414. <h4>Returns:</h4>
  415. <div class="returns-description">
  416. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  417. <p>LTDescr an object that distinguishes the tween</p>
  418. </div>
  419. </div>
  420. <div class="example">
  421. <h4>Example:</h4>
  422. <div class="example-content">
  423. <p>LeanTween.moveX(gameObject, 5f, 2.0f ).setDelay( 1.5f );</p>
  424. </div>
  425. </div>
  426. </div>
  427. <div id="method_setDirection" class="method item">
  428. <h3 class="name"><code>setDirection</code></h3>
  429. <div class="args">
  430. <span class="paren">(</span><ul class="args-list inline commas">
  431. <li class="arg">
  432. <code>direction:float</code>
  433. </li>
  434. </ul><span class="paren">)</span>
  435. </div>
  436. <span class="returns-inline">
  437. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  438. </span>
  439. <div class="meta">
  440. <p>
  441. Defined in
  442. <a href="../files/LTDescr.cs.html#l2236"><code>LTDescr.cs:2236</code></a>
  443. </p>
  444. </div>
  445. <div class="description">
  446. <p>Set the direction of a tween -1f for backwards 1f for forwards (currently only bezier and spline paths are supported)</p>
  447. </div>
  448. <div class="params">
  449. <h4>Parameters:</h4>
  450. <ul class="params-list">
  451. <li class="param">
  452. <code class="param-name">direction:float</code>
  453. <span class="type">Float</span>
  454. <div class="param-description">
  455. <p>the direction that the tween should run, -1f for backwards 1f for forwards</p>
  456. </div>
  457. </li>
  458. </ul>
  459. </div>
  460. <div class="returns">
  461. <h4>Returns:</h4>
  462. <div class="returns-description">
  463. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  464. <p>LTDescr an object that distinguishes the tween</p>
  465. </div>
  466. </div>
  467. <div class="example">
  468. <h4>Example:</h4>
  469. <div class="example-content">
  470. <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>
  471. </div>
  472. </div>
  473. </div>
  474. <div id="method_setEase" class="method item">
  475. <h3 class="name"><code>setEase</code></h3>
  476. <div class="args">
  477. <span class="paren">(</span><ul class="args-list inline commas">
  478. <li class="arg">
  479. <code>easeType:LeanTweenType</code>
  480. </li>
  481. </ul><span class="paren">)</span>
  482. </div>
  483. <span class="returns-inline">
  484. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  485. </span>
  486. <div class="meta">
  487. <p>
  488. Defined in
  489. <a href="../files/LTDescr.cs.html#l1216"><code>LTDescr.cs:1216</code></a>
  490. </p>
  491. </div>
  492. <div class="description">
  493. <p>Set the type of easing used for the tween. <br></p>
  494. <ul><li><a href="LeanTweenType.html">List of all the ease types</a>.</li>
  495. <li><a href="http://www.robertpenner.com/easing/easing_demo.html">This page helps visualize the different easing equations</a></li>
  496. </ul>
  497. </div>
  498. <div class="params">
  499. <h4>Parameters:</h4>
  500. <ul class="params-list">
  501. <li class="param">
  502. <code class="param-name">easeType:LeanTweenType</code>
  503. <span class="type"><a href="../classes/LeanTweenType.html" class="crosslink">LeanTweenType</a></span>
  504. <div class="param-description">
  505. <p>the easing type to use</p>
  506. </div>
  507. </li>
  508. </ul>
  509. </div>
  510. <div class="returns">
  511. <h4>Returns:</h4>
  512. <div class="returns-description">
  513. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  514. <p>LTDescr an object that distinguishes the tween</p>
  515. </div>
  516. </div>
  517. <div class="example">
  518. <h4>Example:</h4>
  519. <div class="example-content">
  520. <p>LeanTween.moveX(gameObject, 5f, 2.0f ).setEase( LeanTweenType.easeInBounce );</p>
  521. </div>
  522. </div>
  523. </div>
  524. <div id="method_setEase (AnimationCurve)" class="method item">
  525. <h3 class="name"><code>setEase (AnimationCurve)</code></h3>
  526. <div class="args">
  527. <span class="paren">(</span><ul class="args-list inline commas">
  528. <li class="arg">
  529. <code>easeDefinition:AnimationCurve</code>
  530. </li>
  531. </ul><span class="paren">)</span>
  532. </div>
  533. <span class="returns-inline">
  534. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  535. </span>
  536. <div class="meta">
  537. <p>
  538. Defined in
  539. <a href="../files/LTDescr.cs.html#l1666"><code>LTDescr.cs:1666</code></a>
  540. </p>
  541. </div>
  542. <div class="description">
  543. <p>Set the type of easing used for the tween with a custom curve. <br></p>
  544. </div>
  545. <div class="params">
  546. <h4>Parameters:</h4>
  547. <ul class="params-list">
  548. <li class="param">
  549. <code class="param-name">easeDefinition:AnimationCurve</code>
  550. <span class="type">AnimationCurve</span>
  551. <div class="param-description">
  552. <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>
  553. </div>
  554. </li>
  555. </ul>
  556. </div>
  557. <div class="returns">
  558. <h4>Returns:</h4>
  559. <div class="returns-description">
  560. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  561. <p>LTDescr an object that distinguishes the tween</p>
  562. </div>
  563. </div>
  564. <div class="example">
  565. <h4>Example:</h4>
  566. <div class="example-content">
  567. <p>LeanTween.moveX(gameObject, 5f, 2.0f ).setEase( LeanTweenType.easeInBounce );</p>
  568. </div>
  569. </div>
  570. </div>
  571. <div id="method_setFrom" class="method item">
  572. <h3 class="name"><code>setFrom</code></h3>
  573. <div class="args">
  574. <span class="paren">(</span><ul class="args-list inline commas">
  575. <li class="arg">
  576. <code>from:Vector3</code>
  577. </li>
  578. </ul><span class="paren">)</span>
  579. </div>
  580. <span class="returns-inline">
  581. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  582. </span>
  583. <div class="meta">
  584. <p>
  585. Defined in
  586. <a href="../files/LTDescr.cs.html#l1707"><code>LTDescr.cs:1707</code></a>
  587. </p>
  588. </div>
  589. <div class="description">
  590. <p>Set the beginning of the tween</p>
  591. </div>
  592. <div class="params">
  593. <h4>Parameters:</h4>
  594. <ul class="params-list">
  595. <li class="param">
  596. <code class="param-name">from:Vector3</code>
  597. <span class="type">Vector3</span>
  598. <div class="param-description">
  599. <p>the point you would like the tween to start at</p>
  600. </div>
  601. </li>
  602. </ul>
  603. </div>
  604. <div class="returns">
  605. <h4>Returns:</h4>
  606. <div class="returns-description">
  607. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  608. <p>LTDescr an object that distinguishes the tween</p>
  609. </div>
  610. </div>
  611. <div class="example">
  612. <h4>Example:</h4>
  613. <div class="example-content">
  614. <p>LTDescr descr = LeanTween.move( cube, Vector3.up, new Vector3(1f,3f,0f), 1.0f ).setFrom( new Vector3(5f,10f,3f) );<br></p>
  615. </div>
  616. </div>
  617. </div>
  618. <div id="method_setIgnoreTimeScale" class="method item">
  619. <h3 class="name"><code>setIgnoreTimeScale</code></h3>
  620. <div class="args">
  621. <span class="paren">(</span><ul class="args-list inline commas">
  622. <li class="arg">
  623. <code>useUnScaledTime:bool</code>
  624. </li>
  625. </ul><span class="paren">)</span>
  626. </div>
  627. <span class="returns-inline">
  628. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  629. </span>
  630. <div class="meta">
  631. <p>
  632. Defined in
  633. <a href="../files/LTDescr.cs.html#l1826"><code>LTDescr.cs:1826</code></a>
  634. </p>
  635. </div>
  636. <div class="description">
  637. <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>
  638. </div>
  639. <div class="params">
  640. <h4>Parameters:</h4>
  641. <ul class="params-list">
  642. <li class="param">
  643. <code class="param-name">useUnScaledTime:bool</code>
  644. <span class="type">Bool</span>
  645. <div class="param-description">
  646. <p>whether to use the unscaled time or not</p>
  647. </div>
  648. </li>
  649. </ul>
  650. </div>
  651. <div class="returns">
  652. <h4>Returns:</h4>
  653. <div class="returns-description">
  654. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  655. <p>LTDescr an object that distinguishes the tween</p>
  656. </div>
  657. </div>
  658. <div class="example">
  659. <h4>Example:</h4>
  660. <div class="example-content">
  661. <p>LeanTween.moveX(gameObject, 5f, 2.0f ).setRepeat( 2 ).setIgnoreTimeScale( true );</p>
  662. </div>
  663. </div>
  664. </div>
  665. <div id="method_setLoopClamp" class="method item">
  666. <h3 class="name"><code>setLoopClamp</code></h3>
  667. <div class="args">
  668. <span class="paren">(</span><ul class="args-list inline commas">
  669. <li class="arg">
  670. <code>loops:int</code>
  671. </li>
  672. </ul><span class="paren">)</span>
  673. </div>
  674. <span class="returns-inline">
  675. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  676. </span>
  677. <div class="meta">
  678. <p>
  679. Defined in
  680. <a href="../files/LTDescr.cs.html#l1875"><code>LTDescr.cs:1875</code></a>
  681. </p>
  682. </div>
  683. <div class="description">
  684. <p>When the animation gets to the end it starts back at where it began</p>
  685. </div>
  686. <div class="params">
  687. <h4>Parameters:</h4>
  688. <ul class="params-list">
  689. <li class="param">
  690. <code class="param-name">loops:int</code>
  691. <span class="type">Int</span>
  692. <div class="param-description">
  693. <p>(defaults to -1) how many times you want the loop to happen (-1 for an infinite number of times)</p>
  694. </div>
  695. </li>
  696. </ul>
  697. </div>
  698. <div class="returns">
  699. <h4>Returns:</h4>
  700. <div class="returns-description">
  701. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  702. <p>LTDescr an object that distinguishes the tween</p>
  703. </div>
  704. </div>
  705. <div class="example">
  706. <h4>Example:</h4>
  707. <div class="example-content">
  708. <p>LeanTween.moveX(gameObject, 5f, 2.0f ).setLoopClamp( 2 );</p>
  709. </div>
  710. </div>
  711. </div>
  712. <div id="method_setLoopOnce" class="method item">
  713. <h3 class="name"><code>setLoopOnce</code></h3>
  714. <span class="paren">()</span>
  715. <span class="returns-inline">
  716. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  717. </span>
  718. <div class="meta">
  719. <p>
  720. Defined in
  721. <a href="../files/LTDescr.cs.html#l1866"><code>LTDescr.cs:1866</code></a>
  722. </p>
  723. </div>
  724. <div class="description">
  725. <p>No looping involved, just run once (the default)</p>
  726. </div>
  727. <div class="returns">
  728. <h4>Returns:</h4>
  729. <div class="returns-description">
  730. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  731. <p>LTDescr an object that distinguishes the tween</p>
  732. </div>
  733. </div>
  734. <div class="example">
  735. <h4>Example:</h4>
  736. <div class="example-content">
  737. <p>LeanTween.moveX(gameObject, 5f, 2.0f ).setLoopOnce();</p>
  738. </div>
  739. </div>
  740. </div>
  741. <div id="method_setLoopPingPong" class="method item">
  742. <h3 class="name"><code>setLoopPingPong</code></h3>
  743. <div class="args">
  744. <span class="paren">(</span><ul class="args-list inline commas">
  745. <li class="arg">
  746. <code>loops:int</code>
  747. </li>
  748. </ul><span class="paren">)</span>
  749. </div>
  750. <span class="returns-inline">
  751. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  752. </span>
  753. <div class="meta">
  754. <p>
  755. Defined in
  756. <a href="../files/LTDescr.cs.html#l1894"><code>LTDescr.cs:1894</code></a>
  757. </p>
  758. </div>
  759. <div class="description">
  760. <p>When the animation gets to the end it then tweens back to where it started (and on, and on)</p>
  761. </div>
  762. <div class="params">
  763. <h4>Parameters:</h4>
  764. <ul class="params-list">
  765. <li class="param">
  766. <code class="param-name">loops:int</code>
  767. <span class="type">Int</span>
  768. <div class="param-description">
  769. <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>
  770. </div>
  771. </li>
  772. </ul>
  773. </div>
  774. <div class="returns">
  775. <h4>Returns:</h4>
  776. <div class="returns-description">
  777. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  778. <p>LTDescr an object that distinguishes the tween</p>
  779. </div>
  780. </div>
  781. <div class="example">
  782. <h4>Example:</h4>
  783. <div class="example-content">
  784. <p>LeanTween.moveX(gameObject, 5f, 2.0f ).setLoopPingPong( 2 );</p>
  785. </div>
  786. </div>
  787. </div>
  788. <div id="method_setOnComplete" class="method item">
  789. <h3 class="name"><code>setOnComplete</code></h3>
  790. <div class="args">
  791. <span class="paren">(</span><ul class="args-list inline commas">
  792. <li class="arg">
  793. <code>onComplete:Action</code>
  794. </li>
  795. </ul><span class="paren">)</span>
  796. </div>
  797. <span class="returns-inline">
  798. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  799. </span>
  800. <div class="meta">
  801. <p>
  802. Defined in
  803. <a href="../files/LTDescr.cs.html#l1914"><code>LTDescr.cs:1914</code></a>
  804. </p>
  805. </div>
  806. <div class="description">
  807. <p>Have a method called when the tween finishes</p>
  808. </div>
  809. <div class="params">
  810. <h4>Parameters:</h4>
  811. <ul class="params-list">
  812. <li class="param">
  813. <code class="param-name">onComplete:Action</code>
  814. <span class="type">Action</span>
  815. <div class="param-description">
  816. <p>the method that should be called when the tween is finished ex: tweenFinished(){ }</p>
  817. </div>
  818. </li>
  819. </ul>
  820. </div>
  821. <div class="returns">
  822. <h4>Returns:</h4>
  823. <div class="returns-description">
  824. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  825. <p>LTDescr an object that distinguishes the tween</p>
  826. </div>
  827. </div>
  828. <div class="example">
  829. <h4>Example:</h4>
  830. <div class="example-content">
  831. <p>LeanTween.moveX(gameObject, 5f, 2.0f ).setOnComplete( tweenFinished );</p>
  832. </div>
  833. </div>
  834. </div>
  835. <div id="method_setOnComplete (object)" class="method item">
  836. <h3 class="name"><code>setOnComplete (object)</code></h3>
  837. <div class="args">
  838. <span class="paren">(</span><ul class="args-list inline commas">
  839. <li class="arg">
  840. <code>onComplete:Action&lt;object&gt;</code>
  841. </li>
  842. </ul><span class="paren">)</span>
  843. </div>
  844. <span class="returns-inline">
  845. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  846. </span>
  847. <div class="meta">
  848. <p>
  849. Defined in
  850. <a href="../files/LTDescr.cs.html#l1928"><code>LTDescr.cs:1928</code></a>
  851. </p>
  852. </div>
  853. <div class="description">
  854. <p>Have a method called when the tween finishes</p>
  855. </div>
  856. <div class="params">
  857. <h4>Parameters:</h4>
  858. <ul class="params-list">
  859. <li class="param">
  860. <code class="param-name">onComplete:Action&lt;object&gt;</code>
  861. <span class="type">Action<object></span>
  862. <div class="param-description">
  863. <p>the method that should be called when the tween is finished ex: tweenFinished( object myObj ){ }</p>
  864. </div>
  865. </li>
  866. </ul>
  867. </div>
  868. <div class="returns">
  869. <h4>Returns:</h4>
  870. <div class="returns-description">
  871. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  872. <p>LTDescr an object that distinguishes the tween</p>
  873. </div>
  874. </div>
  875. <div class="example">
  876. <h4>Example:</h4>
  877. <div class="example-content">
  878. <p>LeanTween.moveX(gameObject, 5f, 2.0f ).setOnComplete( tweenFinished );</p>
  879. </div>
  880. </div>
  881. </div>
  882. <div id="method_setOnCompleteOnRepeat" class="method item">
  883. <h3 class="name"><code>setOnCompleteOnRepeat</code></h3>
  884. <div class="args">
  885. <span class="paren">(</span><ul class="args-list inline commas">
  886. <li class="arg">
  887. <code>isOn:bool</code>
  888. </li>
  889. </ul><span class="paren">)</span>
  890. </div>
  891. <span class="returns-inline">
  892. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  893. </span>
  894. <div class="meta">
  895. <p>
  896. Defined in
  897. <a href="../files/LTDescr.cs.html#l2174"><code>LTDescr.cs:2174</code></a>
  898. </p>
  899. </div>
  900. <div class="description">
  901. <p>Set the onComplete method to be called at the end of every loop cycle (also applies to the delayedCall method)</p>
  902. </div>
  903. <div class="params">
  904. <h4>Parameters:</h4>
  905. <ul class="params-list">
  906. <li class="param">
  907. <code class="param-name">isOn:bool</code>
  908. <span class="type">Bool</span>
  909. <div class="param-description">
  910. <p>does call onComplete on every loop cycle</p>
  911. </div>
  912. </li>
  913. </ul>
  914. </div>
  915. <div class="returns">
  916. <h4>Returns:</h4>
  917. <div class="returns-description">
  918. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  919. <p>LTDescr an object that distinguishes the tween</p>
  920. </div>
  921. </div>
  922. <div class="example">
  923. <h4>Example:</h4>
  924. <div class="example-content">
  925. <p>LeanTween.delayedCall(gameObject,0.3f, delayedMethod).setRepeat(4).setOnCompleteOnRepeat(true);</p>
  926. </div>
  927. </div>
  928. </div>
  929. <div id="method_setOnCompleteOnStart" class="method item">
  930. <h3 class="name"><code>setOnCompleteOnStart</code></h3>
  931. <div class="args">
  932. <span class="paren">(</span><ul class="args-list inline commas">
  933. <li class="arg">
  934. <code>isOn:bool</code>
  935. </li>
  936. </ul><span class="paren">)</span>
  937. </div>
  938. <span class="returns-inline">
  939. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  940. </span>
  941. <div class="meta">
  942. <p>
  943. Defined in
  944. <a href="../files/LTDescr.cs.html#l2187"><code>LTDescr.cs:2187</code></a>
  945. </p>
  946. </div>
  947. <div class="description">
  948. <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>
  949. </div>
  950. <div class="params">
  951. <h4>Parameters:</h4>
  952. <ul class="params-list">
  953. <li class="param">
  954. <code class="param-name">isOn:bool</code>
  955. <span class="type">Bool</span>
  956. <div class="param-description">
  957. <p>does call onComplete at the start of the tween</p>
  958. </div>
  959. </li>
  960. </ul>
  961. </div>
  962. <div class="returns">
  963. <h4>Returns:</h4>
  964. <div class="returns-description">
  965. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  966. <p>LTDescr an object that distinguishes the tween</p>
  967. </div>
  968. </div>
  969. <div class="example">
  970. <h4>Example:</h4>
  971. <div class="example-content">
  972. <p>LeanTween.delayedCall(gameObject, 2f, ()=&gt;{<br> // Flash an object 5 times
  973.  LeanTween.alpha(gameObject, 0f, 1f);<br>
  974.  LeanTween.alpha(gameObject, 1f, 0f).setDelay(1f);<br>
  975. }).setOnCompleteOnStart(true).setRepeat(5);<br></p>
  976. </div>
  977. </div>
  978. </div>
  979. <div id="method_setOnCompleteParam" class="method item">
  980. <h3 class="name"><code>setOnCompleteParam</code></h3>
  981. <div class="args">
  982. <span class="paren">(</span><ul class="args-list inline commas">
  983. <li class="arg">
  984. <code>onComplete:object</code>
  985. </li>
  986. </ul><span class="paren">)</span>
  987. </div>
  988. <span class="returns-inline">
  989. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  990. </span>
  991. <div class="meta">
  992. <p>
  993. Defined in
  994. <a href="../files/LTDescr.cs.html#l1949"><code>LTDescr.cs:1949</code></a>
  995. </p>
  996. </div>
  997. <div class="description">
  998. <p>Pass an object to along with the onComplete Function</p>
  999. </div>
  1000. <div class="params">
  1001. <h4>Parameters:</h4>
  1002. <ul class="params-list">
  1003. <li class="param">
  1004. <code class="param-name">onComplete:object</code>
  1005. <span class="type">Object</span>
  1006. <div class="param-description">
  1007. <p>an object that</p>
  1008. </div>
  1009. </li>
  1010. </ul>
  1011. </div>
  1012. <div class="returns">
  1013. <h4>Returns:</h4>
  1014. <div class="returns-description">
  1015. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  1016. <p>LTDescr an object that distinguishes the tween</p>
  1017. </div>
  1018. </div>
  1019. <div class="example">
  1020. <h4>Example:</h4>
  1021. <div class="example-content">
  1022. <p>LeanTween.delayedCall(1.5f, enterMiniGameStart).setOnCompleteParam( new object[]{&quot;&quot;+5} );<br><br>
  1023. void enterMiniGameStart( object val ){<br>
  1024.  object[] arr = (object [])val;<br>
  1025.  int lvl = int.Parse((string)arr[0]);<br>
  1026. }<br></p>
  1027. </div>
  1028. </div>
  1029. </div>
  1030. <div id="method_setOnStart" class="method item">
  1031. <h3 class="name"><code>setOnStart</code></h3>
  1032. <div class="args">
  1033. <span class="paren">(</span><ul class="args-list inline commas">
  1034. <li class="arg">
  1035. <code>onStart:Action&lt;&gt;</code>
  1036. </li>
  1037. </ul><span class="paren">)</span>
  1038. </div>
  1039. <span class="returns-inline">
  1040. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  1041. </span>
  1042. <div class="meta">
  1043. <p>
  1044. Defined in
  1045. <a href="../files/LTDescr.cs.html#l2220"><code>LTDescr.cs:2220</code></a>
  1046. </p>
  1047. </div>
  1048. <div class="description">
  1049. <p>Have a method called when the tween starts</p>
  1050. </div>
  1051. <div class="params">
  1052. <h4>Parameters:</h4>
  1053. <ul class="params-list">
  1054. <li class="param">
  1055. <code class="param-name">onStart:Action&lt;&gt;</code>
  1056. <span class="type">Action<></span>
  1057. <div class="param-description">
  1058. <p>the method that should be called when the tween is starting ex: tweenStarted( ){ }</p>
  1059. </div>
  1060. </li>
  1061. </ul>
  1062. </div>
  1063. <div class="returns">
  1064. <h4>Returns:</h4>
  1065. <div class="returns-description">
  1066. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  1067. <p>LTDescr an object that distinguishes the tween</p>
  1068. </div>
  1069. </div>
  1070. <div class="example">
  1071. <h4>Example:</h4>
  1072. <div class="example-content">
  1073. <p><i>C#:</i><br>
  1074. LeanTween.moveX(gameObject, 5f, 2.0f ).setOnStart( ()=&gt;{ Debug.Log(&quot;I started!&quot;); });
  1075. <i>Javascript:</i><br>
  1076. LeanTween.moveX(gameObject, 5f, 2.0f ).setOnStart( function(){ Debug.Log(&quot;I started!&quot;); } );</p>
  1077. </div>
  1078. </div>
  1079. </div>
  1080. <div id="method_setOnUpdate" class="method item">
  1081. <h3 class="name"><code>setOnUpdate</code></h3>
  1082. <div class="args">
  1083. <span class="paren">(</span><ul class="args-list inline commas">
  1084. <li class="arg">
  1085. <code>onUpdate:Action&lt;float&gt;</code>
  1086. </li>
  1087. </ul><span class="paren">)</span>
  1088. </div>
  1089. <span class="returns-inline">
  1090. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  1091. </span>
  1092. <div class="meta">
  1093. <p>
  1094. Defined in
  1095. <a href="../files/LTDescr.cs.html#l1968"><code>LTDescr.cs:1968</code></a>
  1096. </p>
  1097. </div>
  1098. <div class="description">
  1099. <p>Have a method called on each frame that the tween is being animated (passes a float value)</p>
  1100. </div>
  1101. <div class="params">
  1102. <h4>Parameters:</h4>
  1103. <ul class="params-list">
  1104. <li class="param">
  1105. <code class="param-name">onUpdate:Action&lt;float&gt;</code>
  1106. <span class="type">Action<float></span>
  1107. <div class="param-description">
  1108. <p>a method that will be called on every frame with the float value of the tweened object</p>
  1109. </div>
  1110. </li>
  1111. </ul>
  1112. </div>
  1113. <div class="returns">
  1114. <h4>Returns:</h4>
  1115. <div class="returns-description">
  1116. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  1117. <p>LTDescr an object that distinguishes the tween</p>
  1118. </div>
  1119. </div>
  1120. <div class="example">
  1121. <h4>Example:</h4>
  1122. <div class="example-content">
  1123. <p>LeanTween.moveX(gameObject, 5f, 2.0f ).setOnUpdate( tweenMoved );<br>
  1124. <br>
  1125. void tweenMoved( float val ){ }<br></p>
  1126. </div>
  1127. </div>
  1128. </div>
  1129. <div id="method_setOnUpdate (object)" class="method item">
  1130. <h3 class="name"><code>setOnUpdate (object)</code></h3>
  1131. <div class="args">
  1132. <span class="paren">(</span><ul class="args-list inline commas">
  1133. <li class="arg">
  1134. <code>onUpdate:Action&lt;float,object&gt;</code>
  1135. </li>
  1136. </ul><span class="paren">)</span>
  1137. </div>
  1138. <span class="returns-inline">
  1139. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  1140. </span>
  1141. <div class="meta">
  1142. <p>
  1143. Defined in
  1144. <a href="../files/LTDescr.cs.html#l2030"><code>LTDescr.cs:2030</code></a>
  1145. </p>
  1146. </div>
  1147. <div class="description">
  1148. <p>Have a method called on each frame that the tween is being animated (passes a float value and a object)</p>
  1149. </div>
  1150. <div class="params">
  1151. <h4>Parameters:</h4>
  1152. <ul class="params-list">
  1153. <li class="param">
  1154. <code class="param-name">onUpdate:Action&lt;float,object&gt;</code>
  1155. <span class="type">Action<float,object></span>
  1156. <div class="param-description">
  1157. <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>
  1158. </div>
  1159. </li>
  1160. </ul>
  1161. </div>
  1162. <div class="returns">
  1163. <h4>Returns:</h4>
  1164. <div class="returns-description">
  1165. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  1166. <p>LTDescr an object that distinguishes the tween</p>
  1167. </div>
  1168. </div>
  1169. <div class="example">
  1170. <h4>Example:</h4>
  1171. <div class="example-content">
  1172. <p>LeanTween.moveX(gameObject, 5f, 2.0f ).setOnUpdate( tweenMoved ).setOnUpdateParam( myObject );<br>
  1173. <br>
  1174. void tweenMoved( float val, object obj ){ }<br></p>
  1175. </div>
  1176. </div>
  1177. </div>
  1178. <div id="method_setOnUpdate (Vector3)" class="method item">
  1179. <h3 class="name"><code>setOnUpdate (Vector3)</code></h3>
  1180. <div class="args">
  1181. <span class="paren">(</span><ul class="args-list inline commas">
  1182. <li class="arg">
  1183. <code>onUpdate:Action&lt;Vector3&gt;</code>
  1184. </li>
  1185. </ul><span class="paren">)</span>
  1186. </div>
  1187. <span class="returns-inline">
  1188. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  1189. </span>
  1190. <div class="meta">
  1191. <p>
  1192. Defined in
  1193. <a href="../files/LTDescr.cs.html#l2064"><code>LTDescr.cs:2064</code></a>
  1194. </p>
  1195. </div>
  1196. <div class="description">
  1197. <p>Have a method called on each frame that the tween is being animated (passes a float value)</p>
  1198. </div>
  1199. <div class="params">
  1200. <h4>Parameters:</h4>
  1201. <ul class="params-list">
  1202. <li class="param">
  1203. <code class="param-name">onUpdate:Action&lt;Vector3&gt;</code>
  1204. <span class="type">Action<Vector3></span>
  1205. <div class="param-description">
  1206. <p>a method that will be called on every frame with the float value of the tweened object</p>
  1207. </div>
  1208. </li>
  1209. </ul>
  1210. </div>
  1211. <div class="returns">
  1212. <h4>Returns:</h4>
  1213. <div class="returns-description">
  1214. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  1215. <p>LTDescr an object that distinguishes the tween</p>
  1216. </div>
  1217. </div>
  1218. <div class="example">
  1219. <h4>Example:</h4>
  1220. <div class="example-content">
  1221. <p>LeanTween.moveX(gameObject, 5f, 2.0f ).setOnUpdate( tweenMoved );<br>
  1222. <br>
  1223. void tweenMoved( Vector3 val ){ }<br></p>
  1224. </div>
  1225. </div>
  1226. </div>
  1227. <div id="method_setOnUpdateParam" class="method item">
  1228. <h3 class="name"><code>setOnUpdateParam</code></h3>
  1229. <div class="args">
  1230. <span class="paren">(</span><ul class="args-list inline commas">
  1231. <li class="arg">
  1232. <code>onUpdateParam:object</code>
  1233. </li>
  1234. </ul><span class="paren">)</span>
  1235. </div>
  1236. <span class="returns-inline">
  1237. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  1238. </span>
  1239. <div class="meta">
  1240. <p>
  1241. Defined in
  1242. <a href="../files/LTDescr.cs.html#l2084"><code>LTDescr.cs:2084</code></a>
  1243. </p>
  1244. </div>
  1245. <div class="description">
  1246. <p>Have an object passed along with the onUpdate method</p>
  1247. </div>
  1248. <div class="params">
  1249. <h4>Parameters:</h4>
  1250. <ul class="params-list">
  1251. <li class="param">
  1252. <code class="param-name">onUpdateParam:object</code>
  1253. <span class="type">Object</span>
  1254. <div class="param-description">
  1255. <p>an object that will be passed along with the onUpdate method</p>
  1256. </div>
  1257. </li>
  1258. </ul>
  1259. </div>
  1260. <div class="returns">
  1261. <h4>Returns:</h4>
  1262. <div class="returns-description">
  1263. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  1264. <p>LTDescr an object that distinguishes the tween</p>
  1265. </div>
  1266. </div>
  1267. <div class="example">
  1268. <h4>Example:</h4>
  1269. <div class="example-content">
  1270. <p>LeanTween.moveX(gameObject, 5f, 2.0f ).setOnUpdate( tweenMoved ).setOnUpdateParam( myObject );<br>
  1271. <br>
  1272. void tweenMoved( float val, object obj ){ }<br></p>
  1273. </div>
  1274. </div>
  1275. </div>
  1276. <div id="method_setOrientToPath" class="method item">
  1277. <h3 class="name"><code>setOrientToPath</code></h3>
  1278. <div class="args">
  1279. <span class="paren">(</span><ul class="args-list inline commas">
  1280. <li class="arg">
  1281. <code>doesOrient:bool</code>
  1282. </li>
  1283. </ul><span class="paren">)</span>
  1284. </div>
  1285. <span class="returns-inline">
  1286. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  1287. </span>
  1288. <div class="meta">
  1289. <p>
  1290. Defined in
  1291. <a href="../files/LTDescr.cs.html#l2099"><code>LTDescr.cs:2099</code></a>
  1292. </p>
  1293. </div>
  1294. <div class="description">
  1295. <p>While tweening along a curve, set this property to true, to be perpendicalur to the path it is moving upon</p>
  1296. </div>
  1297. <div class="params">
  1298. <h4>Parameters:</h4>
  1299. <ul class="params-list">
  1300. <li class="param">
  1301. <code class="param-name">doesOrient:bool</code>
  1302. <span class="type">Bool</span>
  1303. <div class="param-description">
  1304. <p>whether the gameobject will orient to the path it is animating along</p>
  1305. </div>
  1306. </li>
  1307. </ul>
  1308. </div>
  1309. <div class="returns">
  1310. <h4>Returns:</h4>
  1311. <div class="returns-description">
  1312. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  1313. <p>LTDescr an object that distinguishes the tween</p>
  1314. </div>
  1315. </div>
  1316. <div class="example">
  1317. <h4>Example:</h4>
  1318. <div class="example-content">
  1319. <p>LeanTween.move( ltLogo, path, 1.0f ).setEase(LeanTweenType.easeOutQuad).setOrientToPath(true).setAxis(Vector3.forward);<br></p>
  1320. </div>
  1321. </div>
  1322. </div>
  1323. <div id="method_setOrientToPath2d" class="method item">
  1324. <h3 class="name"><code>setOrientToPath2d</code></h3>
  1325. <div class="args">
  1326. <span class="paren">(</span><ul class="args-list inline commas">
  1327. <li class="arg">
  1328. <code>doesOrient:bool</code>
  1329. </li>
  1330. </ul><span class="paren">)</span>
  1331. </div>
  1332. <span class="returns-inline">
  1333. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  1334. </span>
  1335. <div class="meta">
  1336. <p>
  1337. Defined in
  1338. <a href="../files/LTDescr.cs.html#l2118"><code>LTDescr.cs:2118</code></a>
  1339. </p>
  1340. </div>
  1341. <div class="description">
  1342. <p>While tweening along a curve, set this property to true, to be perpendicalur to the path it is moving upon</p>
  1343. </div>
  1344. <div class="params">
  1345. <h4>Parameters:</h4>
  1346. <ul class="params-list">
  1347. <li class="param">
  1348. <code class="param-name">doesOrient:bool</code>
  1349. <span class="type">Bool</span>
  1350. <div class="param-description">
  1351. <p>whether the gameobject will orient to the path it is animating along</p>
  1352. </div>
  1353. </li>
  1354. </ul>
  1355. </div>
  1356. <div class="returns">
  1357. <h4>Returns:</h4>
  1358. <div class="returns-description">
  1359. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  1360. <p>LTDescr an object that distinguishes the tween</p>
  1361. </div>
  1362. </div>
  1363. <div class="example">
  1364. <h4>Example:</h4>
  1365. <div class="example-content">
  1366. <p>LeanTween.move( ltLogo, path, 1.0f ).setEase(LeanTweenType.easeOutQuad).setOrientToPath2d(true).setAxis(Vector3.forward);<br></p>
  1367. </div>
  1368. </div>
  1369. </div>
  1370. <div id="method_setOvershoot" class="method item">
  1371. <h3 class="name"><code>setOvershoot</code></h3>
  1372. <div class="args">
  1373. <span class="paren">(</span><ul class="args-list inline commas">
  1374. <li class="arg">
  1375. <code>overshoot:float</code>
  1376. </li>
  1377. </ul><span class="paren">)</span>
  1378. </div>
  1379. <span class="returns-inline">
  1380. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  1381. </span>
  1382. <div class="meta">
  1383. <p>
  1384. Defined in
  1385. <a href="../files/LTDescr.cs.html#l1627"><code>LTDescr.cs:1627</code></a>
  1386. </p>
  1387. </div>
  1388. <div class="description">
  1389. <p>Set how far past a tween will overshoot for certain ease types (compatible: easeInBack, easeInOutBack, easeOutBack, easeOutElastic, easeInElastic, easeInOutElastic). <br></p>
  1390. </div>
  1391. <div class="params">
  1392. <h4>Parameters:</h4>
  1393. <ul class="params-list">
  1394. <li class="param">
  1395. <code class="param-name">overshoot:float</code>
  1396. <span class="type">Float</span>
  1397. <div class="param-description">
  1398. <p>how far past the destination it will go before settling in</p>
  1399. </div>
  1400. </li>
  1401. </ul>
  1402. </div>
  1403. <div class="returns">
  1404. <h4>Returns:</h4>
  1405. <div class="returns-description">
  1406. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  1407. <p>LTDescr an object that distinguishes the tween</p>
  1408. </div>
  1409. </div>
  1410. <div class="example">
  1411. <h4>Example:</h4>
  1412. <div class="example-content">
  1413. <p>LeanTween.moveX(gameObject, 5f, 2.0f ).setEase( LeanTweenType.easeOutBack ).setOvershoot(2f);</p>
  1414. </div>
  1415. </div>
  1416. </div>
  1417. <div id="method_setPassed" class="method item">
  1418. <h3 class="name"><code>setPassed</code></h3>
  1419. <div class="args">
  1420. <span class="paren">(</span><ul class="args-list inline commas">
  1421. <li class="arg">
  1422. <code>passedTime:float</code>
  1423. </li>
  1424. </ul><span class="paren">)</span>
  1425. </div>
  1426. <span class="returns-inline">
  1427. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  1428. </span>
  1429. <div class="meta">
  1430. <p>
  1431. Defined in
  1432. <a href="../files/LTDescr.cs.html#l1747"><code>LTDescr.cs:1747</code></a>
  1433. </p>
  1434. </div>
  1435. <div class="description">
  1436. <p>Set the point of time the tween will start in</p>
  1437. </div>
  1438. <div class="params">
  1439. <h4>Parameters:</h4>
  1440. <ul class="params-list">
  1441. <li class="param">
  1442. <code class="param-name">passedTime:float</code>
  1443. <span class="type">Float</span>
  1444. <div class="param-description">
  1445. <p>the length of time in seconds the tween will start in</p>
  1446. </div>
  1447. </li>
  1448. </ul>
  1449. </div>
  1450. <div class="returns">
  1451. <h4>Returns:</h4>
  1452. <div class="returns-description">
  1453. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  1454. <p>LTDescr an object that distinguishes the tween</p>
  1455. </div>
  1456. </div>
  1457. <div class="example">
  1458. <h4>Example:</h4>
  1459. <div class="example-content">
  1460. <p>int tweenId = LeanTween.moveX(gameObject, 5f, 2.0f ).id;<br>
  1461. // Later<br>
  1462. LTDescr descr = description( tweenId );<br>
  1463. descr.setPassed( 1f );<br></p>
  1464. </div>
  1465. </div>
  1466. </div>
  1467. <div id="method_setPeriod" class="method item">
  1468. <h3 class="name"><code>setPeriod</code></h3>
  1469. <div class="args">
  1470. <span class="paren">(</span><ul class="args-list inline commas">
  1471. <li class="arg">
  1472. <code>period:float</code>
  1473. </li>
  1474. </ul><span class="paren">)</span>
  1475. </div>
  1476. <span class="returns-inline">
  1477. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  1478. </span>
  1479. <div class="meta">
  1480. <p>
  1481. Defined in
  1482. <a href="../files/LTDescr.cs.html#l1640"><code>LTDescr.cs:1640</code></a>
  1483. </p>
  1484. </div>
  1485. <div class="description">
  1486. <p>Set how short the iterations are for certain ease types (compatible: easeOutElastic, easeInElastic, easeInOutElastic). <br></p>
  1487. </div>
  1488. <div class="params">
  1489. <h4>Parameters:</h4>
  1490. <ul class="params-list">
  1491. <li class="param">
  1492. <code class="param-name">period:float</code>
  1493. <span class="type">Float</span>
  1494. <div class="param-description">
  1495. <p>how short the iterations are that the tween will animate at (default 0.3f)</p>
  1496. </div>
  1497. </li>
  1498. </ul>
  1499. </div>
  1500. <div class="returns">
  1501. <h4>Returns:</h4>
  1502. <div class="returns-description">
  1503. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  1504. <p>LTDescr an object that distinguishes the tween</p>
  1505. </div>
  1506. </div>
  1507. <div class="example">
  1508. <h4>Example:</h4>
  1509. <div class="example-content">
  1510. <p>LeanTween.moveX(gameObject, 5f, 2.0f ).setEase( LeanTweenType.easeOutElastic ).setPeriod(0.3f);</p>
  1511. </div>
  1512. </div>
  1513. </div>
  1514. <div id="method_setPoint" class="method item">
  1515. <h3 class="name"><code>setPoint</code></h3>
  1516. <div class="args">
  1517. <span class="paren">(</span><ul class="args-list inline commas">
  1518. <li class="arg">
  1519. <code>point:Vector3</code>
  1520. </li>
  1521. </ul><span class="paren">)</span>
  1522. </div>
  1523. <span class="returns-inline">
  1524. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  1525. </span>
  1526. <div class="meta">
  1527. <p>
  1528. Defined in
  1529. <a href="../files/LTDescr.cs.html#l2151"><code>LTDescr.cs:2151</code></a>
  1530. </p>
  1531. </div>
  1532. <div class="description">
  1533. <p>Set the point at which the GameObject will be rotated around</p>
  1534. </div>
  1535. <div class="params">
  1536. <h4>Parameters:</h4>
  1537. <ul class="params-list">
  1538. <li class="param">
  1539. <code class="param-name">point:Vector3</code>
  1540. <span class="type">Vector3</span>
  1541. <div class="param-description">
  1542. <p>point at which you want the object to rotate around (local space)</p>
  1543. </div>
  1544. </li>
  1545. </ul>
  1546. </div>
  1547. <div class="returns">
  1548. <h4>Returns:</h4>
  1549. <div class="returns-description">
  1550. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  1551. <p>LTDescr an object that distinguishes the tween</p>
  1552. </div>
  1553. </div>
  1554. <div class="example">
  1555. <h4>Example:</h4>
  1556. <div class="example-content">
  1557. <p>LeanTween.rotateAround( cube, Vector3.up, 360.0f, 1.0f ) .setPoint( new Vector3(1f,0f,0f) ) .setEase( LeanTweenType.easeInOutBounce );<br></p>
  1558. </div>
  1559. </div>
  1560. </div>
  1561. <div id="method_setRecursive" class="method item">
  1562. <h3 class="name"><code>setRecursive</code></h3>
  1563. <div class="args">
  1564. <span class="paren">(</span><ul class="args-list inline commas">
  1565. <li class="arg">
  1566. <code>useRecursion:bool</code>
  1567. </li>
  1568. </ul><span class="paren">)</span>
  1569. </div>
  1570. <span class="returns-inline">
  1571. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  1572. </span>
  1573. <div class="meta">
  1574. <p>
  1575. Defined in
  1576. <a href="../files/LTDescr.cs.html#l2268"><code>LTDescr.cs:2268</code></a>
  1577. </p>
  1578. </div>
  1579. <div class="description">
  1580. <p>Set whether or not the tween will recursively effect an objects children in the hierarchy</p>
  1581. </div>
  1582. <div class="params">
  1583. <h4>Parameters:</h4>
  1584. <ul class="params-list">
  1585. <li class="param">
  1586. <code class="param-name">useRecursion:bool</code>
  1587. <span class="type">Bool</span>
  1588. <div class="param-description">
  1589. <p>whether the tween will recursively effect an objects children in the hierarchy</p>
  1590. </div>
  1591. </li>
  1592. </ul>
  1593. </div>
  1594. <div class="returns">
  1595. <h4>Returns:</h4>
  1596. <div class="returns-description">
  1597. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  1598. <p>LTDescr an object that distinguishes the tween</p>
  1599. </div>
  1600. </div>
  1601. <div class="example">
  1602. <h4>Example:</h4>
  1603. <div class="example-content">
  1604. <p>LeanTween.alpha(gameObject, 0f, 1f).setRecursive(true);<br></p>
  1605. </div>
  1606. </div>
  1607. </div>
  1608. <div id="method_setRepeat" class="method item">
  1609. <h3 class="name"><code>setRepeat</code></h3>
  1610. <div class="args">
  1611. <span class="paren">(</span><ul class="args-list inline commas">
  1612. <li class="arg">
  1613. <code>repeatNum:int</code>
  1614. </li>
  1615. </ul><span class="paren">)</span>
  1616. </div>
  1617. <span class="returns-inline">
  1618. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  1619. </span>
  1620. <div class="meta">
  1621. <p>
  1622. Defined in
  1623. <a href="../files/LTDescr.cs.html#l1796"><code>LTDescr.cs:1796</code></a>
  1624. </p>
  1625. </div>
  1626. <div class="description">
  1627. <p>Set the tween to repeat a number of times.</p>
  1628. </div>
  1629. <div class="params">
  1630. <h4>Parameters:</h4>
  1631. <ul class="params-list">
  1632. <li class="param">
  1633. <code class="param-name">repeatNum:int</code>
  1634. <span class="type">Int</span>
  1635. <div class="param-description">
  1636. <p>the number of times to repeat the tween. -1 to repeat infinite times</p>
  1637. </div>
  1638. </li>
  1639. </ul>
  1640. </div>
  1641. <div class="returns">
  1642. <h4>Returns:</h4>
  1643. <div class="returns-description">
  1644. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  1645. <p>LTDescr an object that distinguishes the tween</p>
  1646. </div>
  1647. </div>
  1648. <div class="example">
  1649. <h4>Example:</h4>
  1650. <div class="example-content">
  1651. <p>LeanTween.moveX(gameObject, 5f, 2.0f ).setRepeat( 10 ).setLoopPingPong();</p>
  1652. </div>
  1653. </div>
  1654. </div>
  1655. <div id="method_setScale" class="method item">
  1656. <h3 class="name"><code>setScale</code></h3>
  1657. <div class="args">
  1658. <span class="paren">(</span><ul class="args-list inline commas">
  1659. <li class="arg">
  1660. <code>scale:float</code>
  1661. </li>
  1662. </ul><span class="paren">)</span>
  1663. </div>
  1664. <span class="returns-inline">
  1665. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  1666. </span>
  1667. <div class="meta">
  1668. <p>
  1669. Defined in
  1670. <a href="../files/LTDescr.cs.html#l1653"><code>LTDescr.cs:1653</code></a>
  1671. </p>
  1672. </div>
  1673. <div class="description">
  1674. <p>Set how large the effect is for certain ease types (compatible: punch, shake, animation curves). <br></p>
  1675. </div>
  1676. <div class="params">
  1677. <h4>Parameters:</h4>
  1678. <ul class="params-list">
  1679. <li class="param">
  1680. <code class="param-name">scale:float</code>
  1681. <span class="type">Float</span>
  1682. <div class="param-description">
  1683. <p>how much the ease will be multiplied by (default 1f)</p>
  1684. </div>
  1685. </li>
  1686. </ul>
  1687. </div>
  1688. <div class="returns">
  1689. <h4>Returns:</h4>
  1690. <div class="returns-description">
  1691. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  1692. <p>LTDescr an object that distinguishes the tween</p>
  1693. </div>
  1694. </div>
  1695. <div class="example">
  1696. <h4>Example:</h4>
  1697. <div class="example-content">
  1698. <p>LeanTween.moveX(gameObject, 5f, 2.0f ).setEase( LeanTweenType.punch ).setScale(2f);</p>
  1699. </div>
  1700. </div>
  1701. </div>
  1702. <div id="method_setSpeed" class="method item">
  1703. <h3 class="name"><code>setSpeed</code></h3>
  1704. <div class="args">
  1705. <span class="paren">(</span><ul class="args-list inline commas">
  1706. <li class="arg">
  1707. <code>speed:float</code>
  1708. </li>
  1709. </ul><span class="paren">)</span>
  1710. </div>
  1711. <span class="returns-inline">
  1712. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  1713. </span>
  1714. <div class="meta">
  1715. <p>
  1716. Defined in
  1717. <a href="../files/LTDescr.cs.html#l1781"><code>LTDescr.cs:1781</code></a>
  1718. </p>
  1719. </div>
  1720. <div class="description">
  1721. <p>Set the finish time of the tween</p>
  1722. </div>
  1723. <div class="params">
  1724. <h4>Parameters:</h4>
  1725. <ul class="params-list">
  1726. <li class="param">
  1727. <code class="param-name">speed:float</code>
  1728. <span class="type">Float</span>
  1729. <div class="param-description">
  1730. <p>the speed in unity units per second you wish the object to travel (overrides the given time)</p>
  1731. </div>
  1732. </li>
  1733. </ul>
  1734. </div>
  1735. <div class="returns">
  1736. <h4>Returns:</h4>
  1737. <div class="returns-description">
  1738. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  1739. <p>LTDescr an object that distinguishes the tween</p>
  1740. </div>
  1741. </div>
  1742. <div class="example">
  1743. <h4>Example:</h4>
  1744. <div class="example-content">
  1745. <p>LeanTween.moveLocalZ( gameObject, 10f, 1f).setSpeed(0.2f) // the given time is ignored when speed is set<br></p>
  1746. </div>
  1747. </div>
  1748. </div>
  1749. <div id="method_setTime" class="method item">
  1750. <h3 class="name"><code>setTime</code></h3>
  1751. <div class="args">
  1752. <span class="paren">(</span><ul class="args-list inline commas">
  1753. <li class="arg">
  1754. <code>finishTime:float</code>
  1755. </li>
  1756. </ul><span class="paren">)</span>
  1757. </div>
  1758. <span class="returns-inline">
  1759. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  1760. </span>
  1761. <div class="meta">
  1762. <p>
  1763. Defined in
  1764. <a href="../files/LTDescr.cs.html#l1763"><code>LTDescr.cs:1763</code></a>
  1765. </p>
  1766. </div>
  1767. <div class="description">
  1768. <p>Set the finish time of the tween</p>
  1769. </div>
  1770. <div class="params">
  1771. <h4>Parameters:</h4>
  1772. <ul class="params-list">
  1773. <li class="param">
  1774. <code class="param-name">finishTime:float</code>
  1775. <span class="type">Float</span>
  1776. <div class="param-description">
  1777. <p>the length of time in seconds you wish the tween to complete in</p>
  1778. </div>
  1779. </li>
  1780. </ul>
  1781. </div>
  1782. <div class="returns">
  1783. <h4>Returns:</h4>
  1784. <div class="returns-description">
  1785. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  1786. <p>LTDescr an object that distinguishes the tween</p>
  1787. </div>
  1788. </div>
  1789. <div class="example">
  1790. <h4>Example:</h4>
  1791. <div class="example-content">
  1792. <p>int tweenId = LeanTween.moveX(gameObject, 5f, 2.0f ).id;<br>
  1793. // Later<br>
  1794. LTDescr descr = description( tweenId );<br>
  1795. descr.setTime( 1f );<br></p>
  1796. </div>
  1797. </div>
  1798. </div>
  1799. <div id="method_setTo" class="method item">
  1800. <h3 class="name"><code>setTo</code></h3>
  1801. <div class="args">
  1802. <span class="paren">(</span><ul class="args-list inline commas">
  1803. <li class="arg">
  1804. <code>to:Vector3</code>
  1805. </li>
  1806. </ul><span class="paren">)</span>
  1807. </div>
  1808. <span class="returns-inline">
  1809. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  1810. </span>
  1811. <div class="meta">
  1812. <p>
  1813. Defined in
  1814. <a href="../files/LTDescr.cs.html#l1681"><code>LTDescr.cs:1681</code></a>
  1815. </p>
  1816. </div>
  1817. <div class="description">
  1818. <p>Set the end that the GameObject is tweening towards</p>
  1819. </div>
  1820. <div class="params">
  1821. <h4>Parameters:</h4>
  1822. <ul class="params-list">
  1823. <li class="param">
  1824. <code class="param-name">to:Vector3</code>
  1825. <span class="type">Vector3</span>
  1826. <div class="param-description">
  1827. <p>point at which you want the tween to reach</p>
  1828. </div>
  1829. </li>
  1830. </ul>
  1831. </div>
  1832. <div class="returns">
  1833. <h4>Returns:</h4>
  1834. <div class="returns-description">
  1835. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  1836. <p>LTDescr an object that distinguishes the tween</p>
  1837. </div>
  1838. </div>
  1839. <div class="example">
  1840. <h4>Example:</h4>
  1841. <div class="example-content">
  1842. <p>LTDescr descr = LeanTween.move( cube, Vector3.up, new Vector3(1f,3f,0f), 1.0f ).setEase( LeanTweenType.easeInOutBounce );<br>
  1843. // Later your want to change your destination or your destiation is constantly moving<br>
  1844. descr.setTo( new Vector3(5f,10f,3f) );<br></p>
  1845. </div>
  1846. </div>
  1847. </div>
  1848. <div id="method_setUseFrames" class="method item">
  1849. <h3 class="name"><code>setUseFrames</code></h3>
  1850. <div class="args">
  1851. <span class="paren">(</span><ul class="args-list inline commas">
  1852. <li class="arg">
  1853. <code>useFrames:bool</code>
  1854. </li>
  1855. </ul><span class="paren">)</span>
  1856. </div>
  1857. <span class="returns-inline">
  1858. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  1859. </span>
  1860. <div class="meta">
  1861. <p>
  1862. Defined in
  1863. <a href="../files/LTDescr.cs.html#l1840"><code>LTDescr.cs:1840</code></a>
  1864. </p>
  1865. </div>
  1866. <div class="description">
  1867. <p>Use frames when tweening an object, when you don't want the animation to be time-frame independent...</p>
  1868. </div>
  1869. <div class="params">
  1870. <h4>Parameters:</h4>
  1871. <ul class="params-list">
  1872. <li class="param">
  1873. <code class="param-name">useFrames:bool</code>
  1874. <span class="type">Bool</span>
  1875. <div class="param-description">
  1876. <p>whether to use estimated time or not</p>
  1877. </div>
  1878. </li>
  1879. </ul>
  1880. </div>
  1881. <div class="returns">
  1882. <h4>Returns:</h4>
  1883. <div class="returns-description">
  1884. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  1885. <p>LTDescr an object that distinguishes the tween</p>
  1886. </div>
  1887. </div>
  1888. <div class="example">
  1889. <h4>Example:</h4>
  1890. <div class="example-content">
  1891. <p>LeanTween.moveX(gameObject, 5f, 2.0f ).setRepeat( 2 ).setUseFrames( true );</p>
  1892. </div>
  1893. </div>
  1894. </div>
  1895. <div id="method_updateNow" class="method item">
  1896. <h3 class="name"><code>updateNow</code></h3>
  1897. <span class="paren">()</span>
  1898. <span class="returns-inline">
  1899. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>
  1900. </span>
  1901. <div class="meta">
  1902. <p>
  1903. Defined in
  1904. <a href="../files/LTDescr.cs.html#l925"><code>LTDescr.cs:925</code></a>
  1905. </p>
  1906. </div>
  1907. <div class="description">
  1908. <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>
  1909. </div>
  1910. <div class="returns">
  1911. <h4>Returns:</h4>
  1912. <div class="returns-description">
  1913. <span class="type"><a href="../classes/LTDescr.html" class="crosslink">LTDescr</a></span>:
  1914. <p>LTDescr an object that distinguishes the tween</p>
  1915. </div>
  1916. </div>
  1917. <div class="example">
  1918. <h4>Example:</h4>
  1919. <div class="example-content">
  1920. <p>LeanTween.moveX(gameObject, 5f, 0f ).updateNow();</p>
  1921. </div>
  1922. </div>
  1923. </div>
  1924. </div>
  1925. </div>
  1926. </div>
  1927. </div>
  1928. </div>
  1929. </div>
  1930. </div>
  1931. </div>
  1932. </div>
  1933. <script src="../assets/vendor/prettify/prettify-min.js"></script>
  1934. <script>prettyPrint();</script>
  1935. <script src="../assets/js/yui-prettify.js"></script>
  1936. <script src="../assets/../api.js"></script>
  1937. <script src="../assets/js/api-filter.js"></script>
  1938. <script src="../assets/js/api-list.js"></script>
  1939. <script src="../assets/js/api-search.js"></script>
  1940. <script src="../assets/js/apidocs.js"></script>
  1941. </body>
  1942. </html>