美素佳儿 litter wizard小游戏
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

před 5 roky
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345
  1. declare namespace egret {
  2. /**
  3. * @language en_US
  4. * Easing function set. Different easing functions are used to make an animation proceed according to the corresponding equation
  5. * @see http://edn.egret.com/cn/index.php/article/index/id/53 Easing effect Demo
  6. * @version Egret 2.4
  7. * @platform Web,Native
  8. */
  9. /**
  10. * @language zh_CN
  11. * 缓动函数集合,使用不同的缓动函数使得动画按照对应的方程进行
  12. * @see http://edn.egret.com/cn/index.php/article/index/id/53 缓动效果演示
  13. * @version Egret 2.4
  14. * @platform Web,Native
  15. */
  16. class Ease {
  17. /**
  18. * @version Egret 2.4
  19. * @platform Web,Native
  20. */
  21. constructor();
  22. /**
  23. * @language en_US
  24. * get.See example.
  25. * @version Egret 2.4
  26. * @platform Web,Native
  27. */
  28. /**
  29. * @language zh_CN
  30. * get。请查看示例
  31. * @version Egret 2.4
  32. * @platform Web,Native
  33. */
  34. static get(amount: any): Function;
  35. /**
  36. * @language en_US
  37. * get pow in.See example.
  38. * @version Egret 2.4
  39. * @platform Web,Native
  40. */
  41. /**
  42. * @language zh_CN
  43. * get pow in。请查看示例
  44. * @version Egret 2.4
  45. * @platform Web,Native
  46. */
  47. static getPowIn(pow: any): Function;
  48. /**
  49. * @language en_US
  50. * get pow out.See example.
  51. * @version Egret 2.4
  52. * @platform Web,Native
  53. */
  54. /**
  55. * @language zh_CN
  56. * get pow out。请查看示例
  57. * @version Egret 2.4
  58. * @platform Web,Native
  59. */
  60. static getPowOut(pow: any): Function;
  61. /**
  62. * @language en_US
  63. * get pow in out.See example.
  64. * @version Egret 2.4
  65. * @platform Web,Native
  66. */
  67. /**
  68. * @language zh_CN
  69. * get pow in out。请查看示例
  70. * @version Egret 2.4
  71. * @platform Web,Native
  72. */
  73. static getPowInOut(pow: any): Function;
  74. /**
  75. * @language en_US
  76. * quad in.See example.
  77. * @version Egret 2.4
  78. * @platform Web,Native
  79. */
  80. /**
  81. * @language zh_CN
  82. * quad in。请查看示例
  83. * @version Egret 2.4
  84. * @platform Web,Native
  85. */
  86. static quadIn: Function;
  87. /**
  88. * @language en_US
  89. * quad out.See example.
  90. * @version Egret 2.4
  91. * @platform Web,Native
  92. */
  93. /**
  94. * @language zh_CN
  95. * quad out。请查看示例
  96. * @version Egret 2.4
  97. * @platform Web,Native
  98. */
  99. static quadOut: Function;
  100. /**
  101. * @language en_US
  102. * quad in out.See example.
  103. * @version Egret 2.4
  104. * @platform Web,Native
  105. */
  106. /**
  107. * @language zh_CN
  108. * quad in out。请查看示例
  109. * @version Egret 2.4
  110. * @platform Web,Native
  111. */
  112. static quadInOut: Function;
  113. /**
  114. * @language en_US
  115. * cubic in.See example.
  116. * @version Egret 2.4
  117. * @platform Web,Native
  118. */
  119. /**
  120. * @language zh_CN
  121. * cubic in。请查看示例
  122. * @version Egret 2.4
  123. * @platform Web,Native
  124. */
  125. static cubicIn: Function;
  126. /**
  127. * @language en_US
  128. * cubic out.See example.
  129. * @version Egret 2.4
  130. * @platform Web,Native
  131. */
  132. /**
  133. * @language zh_CN
  134. * cubic out。请查看示例
  135. * @version Egret 2.4
  136. * @platform Web,Native
  137. */
  138. static cubicOut: Function;
  139. /**
  140. * @language en_US
  141. * cubic in out.See example.
  142. * @version Egret 2.4
  143. * @platform Web,Native
  144. */
  145. /**
  146. * @language zh_CN
  147. * cubic in out。请查看示例
  148. * @version Egret 2.4
  149. * @platform Web,Native
  150. */
  151. static cubicInOut: Function;
  152. /**
  153. * @language en_US
  154. * quart in.See example.
  155. * @version Egret 2.4
  156. * @platform Web,Native
  157. */
  158. /**
  159. * @language zh_CN
  160. * quart in。请查看示例
  161. * @version Egret 2.4
  162. * @platform Web,Native
  163. */
  164. static quartIn: Function;
  165. /**
  166. * @language en_US
  167. * quart out.See example.
  168. * @version Egret 2.4
  169. * @platform Web,Native
  170. */
  171. /**
  172. * @language zh_CN
  173. * quart out。请查看示例
  174. * @version Egret 2.4
  175. * @platform Web,Native
  176. */
  177. static quartOut: Function;
  178. /**
  179. * @language en_US
  180. * quart in out.See example.
  181. * @version Egret 2.4
  182. * @platform Web,Native
  183. */
  184. /**
  185. * @language zh_CN
  186. * quart in out。请查看示例
  187. * @version Egret 2.4
  188. * @platform Web,Native
  189. */
  190. static quartInOut: Function;
  191. /**
  192. * @language en_US
  193. * quint in.See example.
  194. * @version Egret 2.4
  195. * @platform Web,Native
  196. */
  197. /**
  198. * @language zh_CN
  199. * quint in。请查看示例
  200. * @version Egret 2.4
  201. * @platform Web,Native
  202. */
  203. static quintIn: Function;
  204. /**
  205. * @language en_US
  206. * quint out.See example.
  207. * @version Egret 2.4
  208. * @platform Web,Native
  209. */
  210. /**
  211. * @language zh_CN
  212. * quint out。请查看示例
  213. * @version Egret 2.4
  214. * @platform Web,Native
  215. */
  216. static quintOut: Function;
  217. /**
  218. * @language en_US
  219. * quint in out.See example.
  220. * @version Egret 2.4
  221. * @platform Web,Native
  222. */
  223. /**
  224. * @language zh_CN
  225. * quint in out。请查看示例
  226. * @version Egret 2.4
  227. * @platform Web,Native
  228. */
  229. static quintInOut: Function;
  230. /**
  231. * @language en_US
  232. * sine in.See example.
  233. * @version Egret 2.4
  234. * @platform Web,Native
  235. */
  236. /**
  237. * @language zh_CN
  238. * sine in。请查看示例
  239. * @version Egret 2.4
  240. * @platform Web,Native
  241. */
  242. static sineIn(t: any): number;
  243. /**
  244. * @language en_US
  245. * sine out.See example.
  246. * @version Egret 2.4
  247. * @platform Web,Native
  248. */
  249. /**
  250. * @language zh_CN
  251. * sine out。请查看示例
  252. * @version Egret 2.4
  253. * @platform Web,Native
  254. */
  255. static sineOut(t: any): number;
  256. /**
  257. * @language en_US
  258. * sine in out.See example.
  259. * @version Egret 2.4
  260. * @platform Web,Native
  261. */
  262. /**
  263. * @language zh_CN
  264. * sine in out。请查看示例
  265. * @version Egret 2.4
  266. * @platform Web,Native
  267. */
  268. static sineInOut(t: any): number;
  269. /**
  270. * @language en_US
  271. * get back in.See example.
  272. * @version Egret 2.4
  273. * @platform Web,Native
  274. */
  275. /**
  276. * @language zh_CN
  277. * get back in。请查看示例
  278. * @version Egret 2.4
  279. * @platform Web,Native
  280. */
  281. static getBackIn(amount: any): Function;
  282. /**
  283. * @language en_US
  284. * back in.See example.
  285. * @version Egret 2.4
  286. * @platform Web,Native
  287. */
  288. /**
  289. * @language zh_CN
  290. * back in。请查看示例
  291. * @version Egret 2.4
  292. * @platform Web,Native
  293. */
  294. static backIn: Function;
  295. /**
  296. * @language en_US
  297. * get back out.See example.
  298. * @version Egret 2.4
  299. * @platform Web,Native
  300. */
  301. /**
  302. * @language zh_CN
  303. * get back out。请查看示例
  304. * @version Egret 2.4
  305. * @platform Web,Native
  306. */
  307. static getBackOut(amount: any): Function;
  308. /**
  309. * @language en_US
  310. * back out.See example.
  311. * @version Egret 2.4
  312. * @platform Web,Native
  313. */
  314. /**
  315. * @language zh_CN
  316. * back out。请查看示例
  317. * @version Egret 2.4
  318. * @platform Web,Native
  319. */
  320. static backOut: Function;
  321. /**
  322. * @language en_US
  323. * get back in out.See example.
  324. * @version Egret 2.4
  325. * @platform Web,Native
  326. */
  327. /**
  328. * @language zh_CN
  329. * get back in out。请查看示例
  330. * @version Egret 2.4
  331. * @platform Web,Native
  332. */
  333. static getBackInOut(amount: any): Function;
  334. /**
  335. * @language en_US
  336. * back in out.See example.
  337. * @version Egret 2.4
  338. * @platform Web,Native
  339. */
  340. /**
  341. * @language zh_CN
  342. * back in out。请查看示例
  343. * @version Egret 2.4
  344. * @platform Web,Native
  345. */
  346. static backInOut: Function;
  347. /**
  348. * @language en_US
  349. * circ in.See example.
  350. * @version Egret 2.4
  351. * @platform Web,Native
  352. */
  353. /**
  354. * @language zh_CN
  355. * circ in。请查看示例
  356. * @version Egret 2.4
  357. * @platform Web,Native
  358. */
  359. static circIn(t: any): number;
  360. /**
  361. * @language en_US
  362. * circ out.See example.
  363. * @version Egret 2.4
  364. * @platform Web,Native
  365. */
  366. /**
  367. * @language zh_CN
  368. * circ out。请查看示例
  369. * @version Egret 2.4
  370. * @platform Web,Native
  371. */
  372. static circOut(t: any): number;
  373. /**
  374. * @language en_US
  375. * circ in out.See example.
  376. * @version Egret 2.4
  377. * @platform Web,Native
  378. */
  379. /**
  380. * @language zh_CN
  381. * circ in out。请查看示例
  382. * @version Egret 2.4
  383. * @platform Web,Native
  384. */
  385. static circInOut(t: any): number;
  386. /**
  387. * @language en_US
  388. * bounce in.See example.
  389. * @version Egret 2.4
  390. * @platform Web,Native
  391. */
  392. /**
  393. * @language zh_CN
  394. * bounce in。请查看示例
  395. * @version Egret 2.4
  396. * @platform Web,Native
  397. */
  398. static bounceIn(t: any): number;
  399. /**
  400. * @language en_US
  401. * bounce out.See example.
  402. * @version Egret 2.4
  403. * @platform Web,Native
  404. */
  405. /**
  406. * @language zh_CN
  407. * bounce out。请查看示例
  408. * @version Egret 2.4
  409. * @platform Web,Native
  410. */
  411. static bounceOut(t: any): number;
  412. /**
  413. * @language en_US
  414. * bounce in out.See example.
  415. * @version Egret 2.4
  416. * @platform Web,Native
  417. */
  418. /**
  419. * @language zh_CN
  420. * bounce in out。请查看示例
  421. * @version Egret 2.4
  422. * @platform Web,Native
  423. */
  424. static bounceInOut(t: any): number;
  425. /**
  426. * @language en_US
  427. * get elastic in.See example.
  428. * @version Egret 2.4
  429. * @platform Web,Native
  430. */
  431. /**
  432. * @language zh_CN
  433. * get elastic in。请查看示例
  434. * @version Egret 2.4
  435. * @platform Web,Native
  436. */
  437. static getElasticIn(amplitude: any, period: any): Function;
  438. /**
  439. * @language en_US
  440. * elastic in.See example.
  441. * @version Egret 2.4
  442. * @platform Web,Native
  443. */
  444. /**
  445. * @language zh_CN
  446. * elastic in。请查看示例
  447. * @version Egret 2.4
  448. * @platform Web,Native
  449. */
  450. static elasticIn: Function;
  451. /**
  452. * @language en_US
  453. * get elastic out.See example.
  454. * @version Egret 2.4
  455. * @platform Web,Native
  456. */
  457. /**
  458. * @language zh_CN
  459. * get elastic out。请查看示例
  460. * @version Egret 2.4
  461. * @platform Web,Native
  462. */
  463. static getElasticOut(amplitude: any, period: any): Function;
  464. /**
  465. * @language en_US
  466. * elastic out.See example.
  467. * @version Egret 2.4
  468. * @platform Web,Native
  469. */
  470. /**
  471. * @language zh_CN
  472. * elastic out。请查看示例
  473. * @version Egret 2.4
  474. * @platform Web,Native
  475. */
  476. static elasticOut: Function;
  477. /**
  478. * @language en_US
  479. * get elastic in out.See example.
  480. * @version Egret 2.4
  481. * @platform Web,Native
  482. */
  483. /**
  484. * @language zh_CN
  485. * get elastic in out。请查看示例
  486. * @version Egret 2.4
  487. * @platform Web,Native
  488. */
  489. static getElasticInOut(amplitude: any, period: any): Function;
  490. /**
  491. * @language en_US
  492. * elastic in out.See example.
  493. * @version Egret 2.4
  494. * @platform Web,Native
  495. */
  496. /**
  497. * @language zh_CN
  498. * elastic in out。请查看示例
  499. * @version Egret 2.4
  500. * @platform Web,Native
  501. */
  502. static elasticInOut: Function;
  503. }
  504. }
  505. declare namespace egret {
  506. /**
  507. * @language en_US
  508. * Tween is the animation easing class of Egret
  509. * @see http://edn.egret.com/cn/docs/page/576 Tween ease animation
  510. * @version Egret 2.4
  511. * @platform Web,Native
  512. * @includeExample extension/tween/Tween.ts
  513. */
  514. /**
  515. * @language zh_CN
  516. * Tween是Egret的动画缓动类
  517. * @see http://edn.egret.com/cn/docs/page/576 Tween缓动动画
  518. * @version Egret 2.4
  519. * @platform Web,Native
  520. * @includeExample extension/tween/Tween.ts
  521. */
  522. class Tween extends EventDispatcher {
  523. /**
  524. * 不做特殊处理
  525. * @constant {number} egret.Tween.NONE
  526. * @private
  527. */
  528. private static NONE;
  529. /**
  530. * 循环
  531. * @constant {number} egret.Tween.LOOP
  532. * @private
  533. */
  534. private static LOOP;
  535. /**
  536. * 倒序
  537. * @constant {number} egret.Tween.REVERSE
  538. * @private
  539. */
  540. private static REVERSE;
  541. /**
  542. * @private
  543. */
  544. private static _tweens;
  545. /**
  546. * @private
  547. */
  548. private static IGNORE;
  549. /**
  550. * @private
  551. */
  552. private static _plugins;
  553. /**
  554. * @private
  555. */
  556. private static _inited;
  557. /**
  558. * @private
  559. */
  560. private _target;
  561. /**
  562. * @private
  563. */
  564. private _useTicks;
  565. /**
  566. * @private
  567. */
  568. private ignoreGlobalPause;
  569. /**
  570. * @private
  571. */
  572. private loop;
  573. /**
  574. * @private
  575. */
  576. private pluginData;
  577. /**
  578. * @private
  579. */
  580. private _curQueueProps;
  581. /**
  582. * @private
  583. */
  584. private _initQueueProps;
  585. /**
  586. * @private
  587. */
  588. private _steps;
  589. /**
  590. * @private
  591. */
  592. private paused;
  593. /**
  594. * @private
  595. */
  596. private duration;
  597. /**
  598. * @private
  599. */
  600. private _prevPos;
  601. /**
  602. * @private
  603. */
  604. private position;
  605. /**
  606. * @private
  607. */
  608. private _prevPosition;
  609. /**
  610. * @private
  611. */
  612. private _stepPosition;
  613. /**
  614. * @private
  615. */
  616. private passive;
  617. /**
  618. * @language en_US
  619. * Activate an object and add a Tween animation to the object
  620. * @param target {any} The object to be activated
  621. * @param props {any} Parameters, support loop onChange onChangeObj
  622. * @param pluginData {any} Write realized
  623. * @param override {boolean} Whether to remove the object before adding a tween, the default value false
  624. * Not recommended, you can use Tween.removeTweens(target) instead.
  625. * @version Egret 2.4
  626. * @platform Web,Native
  627. */
  628. /**
  629. * @language zh_CN
  630. * 激活一个对象,对其添加 Tween 动画
  631. * @param target {any} 要激活 Tween 的对象
  632. * @param props {any} 参数,支持loop(循环播放) onChange(变化函数) onChangeObj(变化函数作用域)
  633. * @param pluginData {any} 暂未实现
  634. * @param override {boolean} 是否移除对象之前添加的tween,默认值false。
  635. * 不建议使用,可使用 Tween.removeTweens(target) 代替。
  636. * @version Egret 2.4
  637. * @platform Web,Native
  638. */
  639. static get(target: any, props?: any, pluginData?: any, override?: boolean): Tween;
  640. /**
  641. * @language en_US
  642. * Delete all Tween animations from an object
  643. * @param target The object whose Tween to be deleted
  644. * @version Egret 2.4
  645. * @platform Web,Native
  646. */
  647. /**
  648. * @language zh_CN
  649. * 删除一个对象上的全部 Tween 动画
  650. * @param target 需要移除 Tween 的对象
  651. * @version Egret 2.4
  652. * @platform Web,Native
  653. */
  654. static removeTweens(target: any): void;
  655. /**
  656. * @language en_US
  657. * Pause all Tween animations of a certain object
  658. * @param target The object whose Tween to be paused
  659. * @version Egret 2.4
  660. * @platform Web,Native
  661. */
  662. /**
  663. * @language zh_CN
  664. * 暂停某个对象的所有 Tween
  665. * @param target 要暂停 Tween 的对象
  666. * @version Egret 2.4
  667. * @platform Web,Native
  668. */
  669. static pauseTweens(target: any): void;
  670. /**
  671. * @language en_US
  672. * Resume playing all easing of a certain object
  673. * @param target The object whose Tween to be resumed
  674. * @version Egret 2.4
  675. * @platform Web,Native
  676. */
  677. /**
  678. * @language zh_CN
  679. * 继续播放某个对象的所有缓动
  680. * @param target 要继续播放 Tween 的对象
  681. * @version Egret 2.4
  682. * @platform Web,Native
  683. */
  684. static resumeTweens(target: any): void;
  685. /**
  686. * @private
  687. *
  688. * @param delta
  689. * @param paused
  690. */
  691. private static tick(timeStamp, paused?);
  692. private static _lastTime;
  693. /**
  694. * @private
  695. *
  696. * @param tween
  697. * @param value
  698. */
  699. private static _register(tween, value);
  700. /**
  701. * @language en_US
  702. * Delete all Tween
  703. * @version Egret 2.4
  704. * @platform Web,Native
  705. */
  706. /**
  707. * @language zh_CN
  708. * 删除所有 Tween
  709. * @version Egret 2.4
  710. * @platform Web,Native
  711. */
  712. static removeAllTweens(): void;
  713. /**
  714. * 创建一个 egret.Tween 对象
  715. * @private
  716. * @version Egret 2.4
  717. * @platform Web,Native
  718. */
  719. constructor(target: any, props: any, pluginData: any);
  720. /**
  721. * @private
  722. *
  723. * @param target
  724. * @param props
  725. * @param pluginData
  726. */
  727. private initialize(target, props, pluginData);
  728. /**
  729. * @private
  730. *
  731. * @param value
  732. * @param actionsMode
  733. * @returns
  734. */
  735. setPosition(value: number, actionsMode?: number): boolean;
  736. /**
  737. * @private
  738. *
  739. * @param startPos
  740. * @param endPos
  741. * @param includeStart
  742. */
  743. private _runAction(action, startPos, endPos, includeStart?);
  744. /**
  745. * @private
  746. *
  747. * @param step
  748. * @param ratio
  749. */
  750. private _updateTargetProps(step, ratio);
  751. /**
  752. * @language en_US
  753. * Whether setting is paused
  754. * @param value {boolean} Whether to pause
  755. * @returns Tween object itself
  756. * @version Egret 2.4
  757. * @platform Web,Native
  758. */
  759. /**
  760. * @language zh_CN
  761. * 设置是否暂停
  762. * @param value {boolean} 是否暂停
  763. * @returns Tween对象本身
  764. * @version Egret 2.4
  765. * @platform Web,Native
  766. */
  767. setPaused(value: boolean): Tween;
  768. /**
  769. * @private
  770. *
  771. * @param props
  772. * @returns
  773. */
  774. private _cloneProps(props);
  775. /**
  776. * @private
  777. *
  778. * @param o
  779. * @returns
  780. */
  781. private _addStep(o);
  782. /**
  783. * @private
  784. *
  785. * @param o
  786. * @returns
  787. */
  788. private _appendQueueProps(o);
  789. /**
  790. * @private
  791. *
  792. * @param o
  793. * @returns
  794. */
  795. private _addAction(o);
  796. /**
  797. * @private
  798. *
  799. * @param props
  800. * @param o
  801. */
  802. private _set(props, o);
  803. /**
  804. * @language en_US
  805. * Wait the specified milliseconds before the execution of the next animation
  806. * @param duration {number} Waiting time, in milliseconds
  807. * @param passive {boolean} Whether properties are updated during the waiting time
  808. * @returns Tween object itself
  809. * @version Egret 2.4
  810. * @platform Web,Native
  811. */
  812. /**
  813. * @language zh_CN
  814. * 等待指定毫秒后执行下一个动画
  815. * @param duration {number} 要等待的时间,以毫秒为单位
  816. * @param passive {boolean} 等待期间属性是否会更新
  817. * @returns Tween对象本身
  818. * @version Egret 2.4
  819. * @platform Web,Native
  820. */
  821. wait(duration: number, passive?: boolean): Tween;
  822. /**
  823. * @language en_US
  824. * Modify the property of the specified object to a specified value
  825. * @param props {Object} Property set of an object
  826. * @param duration {number} Duration
  827. * @param ease {egret.Ease} Easing algorithm
  828. * @returns {egret.Tween} Tween object itself
  829. * @version Egret 2.4
  830. * @platform Web,Native
  831. */
  832. /**
  833. * @language zh_CN
  834. * 将指定对象的属性修改为指定值
  835. * @param props {Object} 对象的属性集合
  836. * @param duration {number} 持续时间
  837. * @param ease {egret.Ease} 缓动算法
  838. * @returns {egret.Tween} Tween对象本身
  839. * @version Egret 2.4
  840. * @platform Web,Native
  841. */
  842. to(props: any, duration?: number, ease?: Function): Tween;
  843. /**
  844. * @language en_US
  845. * Execute callback function
  846. * @param callback {Function} Callback method
  847. * @param thisObj {any} this action scope of the callback method
  848. * @param params {any[]} Parameter of the callback method
  849. * @returns {egret.Tween} Tween object itself
  850. * @version Egret 2.4
  851. * @platform Web,Native
  852. * @example
  853. * <pre>
  854. * egret.Tween.get(display).call(function (a:number, b:string) {
  855. * console.log("a: " + a); // the first parameter passed 233
  856. * console.log("b: " + b); // the second parameter passed “hello”
  857. * }, this, [233, "hello"]);
  858. * </pre>
  859. */
  860. /**
  861. * @language zh_CN
  862. * 执行回调函数
  863. * @param callback {Function} 回调方法
  864. * @param thisObj {any} 回调方法this作用域
  865. * @param params {any[]} 回调方法参数
  866. * @returns {egret.Tween} Tween对象本身
  867. * @version Egret 2.4
  868. * @platform Web,Native
  869. * @example
  870. * <pre>
  871. * egret.Tween.get(display).call(function (a:number, b:string) {
  872. * console.log("a: " + a); //对应传入的第一个参数 233
  873. * console.log("b: " + b); //对应传入的第二个参数 “hello”
  874. * }, this, [233, "hello"]);
  875. * </pre>
  876. */
  877. call(callback: Function, thisObj?: any, params?: any[]): Tween;
  878. /**
  879. * Now modify the properties of the specified object to the specified value
  880. * @param props {Object} Property set of an object
  881. * @param target The object whose Tween to be resumed
  882. * @returns {egret.Tween} Tween object itself
  883. * @version Egret 2.4
  884. * @platform Web,Native
  885. */
  886. /**
  887. * 立即将指定对象的属性修改为指定值
  888. * @param props {Object} 对象的属性集合
  889. * @param target 要继续播放 Tween 的对象
  890. * @returns {egret.Tween} Tween对象本身
  891. * @version Egret 2.4
  892. * @platform Web,Native
  893. */
  894. set(props: any, target?: any): Tween;
  895. /**
  896. * @language en_US
  897. * Execute
  898. * @param tween {egret.Tween} The Tween object to be operated. Default: this
  899. * @returns {egret.Tween} Tween object itself
  900. * @version Egret 2.4
  901. * @platform Web,Native
  902. */
  903. /**
  904. * @language zh_CN
  905. * 执行
  906. * @param tween {egret.Tween} 需要操作的 Tween 对象,默认this
  907. * @returns {egret.Tween} Tween对象本身
  908. * @version Egret 2.4
  909. * @platform Web,Native
  910. */
  911. play(tween?: Tween): Tween;
  912. /**
  913. * @language en_US
  914. * Pause
  915. * @param tween {egret.Tween} The Tween object to be operated. Default: this
  916. * @returns {egret.Tween} Tween object itself
  917. * @version Egret 2.4
  918. * @platform Web,Native
  919. */
  920. /**
  921. * @language zh_CN
  922. * 暂停
  923. * @param tween {egret.Tween} 需要操作的 Tween 对象,默认this
  924. * @returns {egret.Tween} Tween对象本身
  925. * @version Egret 2.4
  926. * @platform Web,Native
  927. */
  928. pause(tween?: Tween): Tween;
  929. /**
  930. * @method egret.Tween#tick
  931. * @param delta {number}
  932. * @private
  933. * @version Egret 2.4
  934. * @platform Web,Native
  935. */
  936. $tick(delta: number): void;
  937. }
  938. }
  939. declare namespace egret.tween {
  940. type EaseType = 'quadIn' | 'quadOut' | 'quadOut' | 'quadInOut' | 'cubicIn' | 'cubicOut' | 'cubicInOut' | 'quartIn' | 'quartOut' | 'quartInOut' | 'quintIn' | 'quintOut' | 'quintInOut' | 'sineIn' | 'sineOut' | 'sineInOut' | 'backIn' | 'backOut' | 'backInOut' | 'circIn' | 'circOut' | 'circInOut' | 'bounceIn' | 'bounceOut' | 'bounceInOut' | 'elasticIn' | 'elasticOut' | 'elasticInOut';
  941. /**
  942. * @language en_US
  943. * Abstract class, Indicate the base action.
  944. * @version Egret 3.1.8
  945. * @platform Web,Native
  946. */
  947. /**
  948. * @language zh_CN
  949. * 抽象类,表示一个基本动作
  950. * @version Egret 3.1.8
  951. * @platform Web,Native
  952. */
  953. abstract class BasePath extends EventDispatcher {
  954. /**
  955. * @language en_US
  956. * the name of this action.
  957. * @version Egret 3.1.8
  958. * @platform Web,Native
  959. */
  960. /**
  961. * @language zh_CN
  962. * 动作的名称
  963. * @version Egret 3.1.8
  964. * @platform Web,Native
  965. */
  966. name: string;
  967. }
  968. /**
  969. * @language en_US
  970. * Indicate the to action. See <code>Tween.to</code>
  971. * @version Egret 3.1.8
  972. * @platform Web,Native
  973. */
  974. /**
  975. * @language zh_CN
  976. * 表示一个to动作,参见<code>Tween.to</code>
  977. * @version Egret 3.1.8
  978. * @platform Web,Native
  979. */
  980. class To extends BasePath {
  981. /**
  982. * @language en_US
  983. * Property set of an object
  984. * @version Egret 3.1.8
  985. * @platform Web,Native
  986. */
  987. /**
  988. * @language zh_CN
  989. * 对象的属性集合
  990. * @version Egret 3.1.8
  991. * @platform Web,Native
  992. */
  993. props: Object;
  994. /**
  995. * @language en_US
  996. * Duration
  997. * @version Egret 3.1.8
  998. * @platform Web,Native
  999. */
  1000. /**
  1001. * @language zh_CN
  1002. * 持续时间
  1003. * @version Egret 3.1.8
  1004. * @platform Web,Native
  1005. */
  1006. duration: number;
  1007. /**
  1008. * @language en_US
  1009. * Easing algorithm
  1010. * @version Egret 3.1.8
  1011. * @platform Web,Native
  1012. */
  1013. /**
  1014. * @language zh_CN
  1015. * 缓动算法
  1016. * @version Egret 3.1.8
  1017. * @platform Web,Native
  1018. */
  1019. ease: EaseType | Function;
  1020. }
  1021. /**
  1022. * @language en_US
  1023. * Indicate the wait action. See <code>Tween.wait</code>
  1024. * @version Egret 3.1.8
  1025. * @platform Web,Native
  1026. */
  1027. /**
  1028. * @language zh_CN
  1029. * 表示一个wait动作,参见<code>Tween.wait</code>
  1030. * @version Egret 3.1.8
  1031. * @platform Web,Native
  1032. */
  1033. class Wait extends BasePath {
  1034. /**
  1035. * @language en_US
  1036. * Duration
  1037. * @version Egret 3.1.8
  1038. * @platform Web,Native
  1039. */
  1040. /**
  1041. * @language zh_CN
  1042. * 持续时间
  1043. * @version Egret 3.1.8
  1044. * @platform Web,Native
  1045. */
  1046. duration: number;
  1047. /**
  1048. * @language en_US
  1049. * Whether properties are updated during the waiting time
  1050. * @version Egret 3.1.8
  1051. * @platform Web,Native
  1052. */
  1053. /**
  1054. * @language zh_CN
  1055. * 等待期间属性是否会更新
  1056. * @version Egret 3.1.8
  1057. * @platform Web,Native
  1058. */
  1059. passive: boolean;
  1060. }
  1061. /**
  1062. * @language en_US
  1063. * Indicate the set action. See <code>Tween.set</code>
  1064. * @version Egret 3.1.8
  1065. * @platform Web,Native
  1066. */
  1067. /**
  1068. * @language zh_CN
  1069. * 表示一个set动作,参见<code>Tween.set</code>
  1070. * @version Egret 3.1.8
  1071. * @platform Web,Native
  1072. */
  1073. class Set extends BasePath {
  1074. /**
  1075. * @language en_US
  1076. * Property set of an object
  1077. * @version Egret 3.1.8
  1078. * @platform Web,Native
  1079. */
  1080. /**
  1081. * @language zh_CN
  1082. * 对象的属性集合
  1083. * @version Egret 3.1.8
  1084. * @platform Web,Native
  1085. */
  1086. props: Object;
  1087. }
  1088. /**
  1089. * @language en_US
  1090. * Indicate the tick action. See <code>Tween.tick</code>
  1091. * @version Egret 3.1.8
  1092. * @platform Web,Native
  1093. */
  1094. /**
  1095. * @language zh_CN
  1096. * 表示一个tick动作,参见<code>Tween.tick</code>
  1097. * @version Egret 3.1.8
  1098. * @platform Web,Native
  1099. */
  1100. class Tick extends BasePath {
  1101. /**
  1102. * @language en_US
  1103. * Delta time
  1104. * @version Egret 3.1.8
  1105. * @platform Web,Native
  1106. */
  1107. /**
  1108. * @language zh_CN
  1109. * 增加的时间
  1110. * @version Egret 3.1.8
  1111. * @platform Web,Native
  1112. */
  1113. delta: number;
  1114. }
  1115. /**
  1116. * @language en_US
  1117. * TweenItem is a wrapper for Tween, which can set the behavior of Tween by setting attributes and adding Path.
  1118. *
  1119. * @event pathComplete Dispatched when some Path has complete.
  1120. * @event complete Dispatched when all Paths has complete.
  1121. *
  1122. * @defaultProperty props
  1123. * @version Egret 3.1.8
  1124. * @platform Web,Native
  1125. */
  1126. /**
  1127. * @language zh_CN
  1128. * TweenItem是对Tween的包装器,能通过设置属性和添加Path的方式设置Tween的行为。
  1129. * 通常用于使用在EXML中定义组件的动画。
  1130. *
  1131. * @event pathComplete 当某个Path执行完毕时会派发此事件。
  1132. * @event complete 当所有Path执行完毕时会派发此事件。
  1133. *
  1134. * @defaultProperty props
  1135. * @version Egret 3.1.8
  1136. * @platform Web,Native
  1137. */
  1138. /**
  1139. * Use in exml:
  1140. * ```
  1141. * <tween:TweenItem target="{this.button}">
  1142. * <tween:props>
  1143. * <e:Object loop="{true}"/>
  1144. * </tween:props>
  1145. * <tween:paths>
  1146. * <e:Array>
  1147. * <tween:To duration="500">
  1148. * <tween:props>
  1149. * <e:Object x="{100}" y="{200}" />
  1150. * </tween:props>
  1151. * </tween:To>
  1152. * <tween:Wait duration="1000" />
  1153. * <tween:To duration="1000">
  1154. * <tween:props>
  1155. * <e:Object x="{200}" y="{100}" />
  1156. * </tween:props>
  1157. * </tween:To>
  1158. * </e:Array>
  1159. * </tween:paths>
  1160. * </tween:TweenItem>
  1161. * ```
  1162. */
  1163. class TweenItem extends EventDispatcher {
  1164. private tween;
  1165. constructor();
  1166. /**
  1167. * @private
  1168. */
  1169. private _props;
  1170. /**
  1171. * @language en_US
  1172. * The Tween's props.
  1173. * @version Egret 3.1.8
  1174. * @platform Web,Native
  1175. */
  1176. /**
  1177. * @language zh_CN
  1178. * Tween的props参数。
  1179. * @version Egret 3.1.8
  1180. * @platform Web,Native
  1181. */
  1182. props: any;
  1183. /**
  1184. * @private
  1185. */
  1186. private _target;
  1187. /**
  1188. * @language en_US
  1189. * The Tween's target.
  1190. * @version Egret 3.1.8
  1191. * @platform Web,Native
  1192. */
  1193. /**
  1194. * @language zh_CN
  1195. * Tween的target参数。
  1196. * @version Egret 3.1.8
  1197. * @platform Web,Native
  1198. */
  1199. target: any;
  1200. /**
  1201. * @private
  1202. */
  1203. private _paths;
  1204. /**
  1205. * @language en_US
  1206. * The Actions in Tween.
  1207. * @version Egret 3.1.8
  1208. * @platform Web,Native
  1209. */
  1210. /**
  1211. * @language zh_CN
  1212. * TweenItem中添加的行为。
  1213. * @version Egret 3.1.8
  1214. * @platform Web,Native
  1215. */
  1216. paths: BasePath[];
  1217. /**
  1218. * @language en_US
  1219. * Play the Tween
  1220. * @time The starting position, the default is from the last position to play
  1221. * @version Egret 3.1.8
  1222. * @platform Web,Native
  1223. */
  1224. /**
  1225. * @language zh_CN
  1226. * 播放Tween
  1227. * @time 播放的起始位置, 默认为从上次位置继续播放
  1228. * @version Egret 3.1.8
  1229. * @platform Web,Native
  1230. */
  1231. play(time?: number): void;
  1232. /**
  1233. * @language en_US
  1234. * Pause the Tween
  1235. * @version Egret 3.1.8
  1236. * @platform Web,Native
  1237. */
  1238. /**
  1239. * @language zh_CN
  1240. * 暂停Tween
  1241. * @version Egret 3.1.8
  1242. * @platform Web,Native
  1243. */
  1244. pause(): void;
  1245. /**
  1246. * @language en_US
  1247. * Stop the Tween
  1248. * @version Egret 3.1.8
  1249. * @platform Web,Native
  1250. */
  1251. /**
  1252. * @language zh_CN
  1253. * 停止Tween
  1254. * @version Egret 3.1.8
  1255. * @platform Web,Native
  1256. */
  1257. stop(): void;
  1258. private createTween();
  1259. private applyPaths();
  1260. private applyPath(path);
  1261. private pathComplete(path);
  1262. }
  1263. /**
  1264. * @language en_US
  1265. * TweenGroup is a collection of TweenItem that can be played in parallel with each Item
  1266. *
  1267. * @event itemComplete Dispatched when some TweenItem has complete.
  1268. * @event complete Dispatched when all TweenItems has complete.
  1269. *
  1270. * @version Egret 3.1.8
  1271. * @platform Web,Native
  1272. * @includeExample extension/tween/TweenWrapper.ts
  1273. */
  1274. /**
  1275. * @language zh_CN
  1276. * TweenGroup是TweenItem的集合,可以并行播放每一个Item
  1277. * @version Egret 3.1.8
  1278. * @platform Web,Native
  1279. * @includeExample extension/tween/TweenWrapper.ts
  1280. */
  1281. class TweenGroup extends EventDispatcher {
  1282. private completeCount;
  1283. constructor();
  1284. /**
  1285. * @private
  1286. */
  1287. private _items;
  1288. /**
  1289. * @language en_US
  1290. * The Array that TweenItems in TweenGroup.
  1291. * @version Egret 3.1.8
  1292. * @platform Web,Native
  1293. */
  1294. /**
  1295. * @language zh_CN
  1296. * TweenGroup要控制的TweenItem集合。
  1297. * @version Egret 3.1.8
  1298. * @platform Web,Native
  1299. */
  1300. items: TweenItem[];
  1301. private registerEvent(add);
  1302. /**
  1303. * @language en_US
  1304. * Play the all TweenItems
  1305. * @time The starting position, the default is from the last position to play
  1306. * @version Egret 3.1.8
  1307. * @platform Web,Native
  1308. */
  1309. /**
  1310. * @language zh_CN
  1311. * 播放所有的TweenItem
  1312. * @time 播放的起始位置, 默认为从上次位置继续播放
  1313. * @version Egret 3.1.8
  1314. * @platform Web,Native
  1315. */
  1316. play(time?: number): void;
  1317. /**
  1318. * @language en_US
  1319. * Pause the all TweenItems
  1320. * @version Egret 3.1.8
  1321. * @platform Web,Native
  1322. */
  1323. /**
  1324. * @language zh_CN
  1325. * 暂停播放所有的TweenItem
  1326. * @version Egret 3.1.8
  1327. * @platform Web,Native
  1328. */
  1329. pause(): void;
  1330. /**
  1331. * @language en_US
  1332. * Stop the all TweenItems
  1333. * @version Egret 3.1.8
  1334. * @platform Web,Native
  1335. */
  1336. /**
  1337. * @language zh_CN
  1338. * 停止所有的TweenItem
  1339. * @version Egret 3.1.8
  1340. * @platform Web,Native
  1341. */
  1342. stop(): void;
  1343. private itemComplete(e);
  1344. }
  1345. }