*   >> Lecture Éducation Articles >> science >> la programmation

AS3IsoLib Tutorial Series - Moving Boxes

pouvons garder les boîtes en mouvement continu

 protégée randomPosition de fonction (min: Nombre, max: Numéro):. Nombre {return Math.random () * (max - min) + min;} protégée fonction moveToRandomPosition (boîte: iso-box): void {TweenLite.to (boîte, 2, {x: randomPosition (300, 500), y: randomPosition (-100, 200), onComplete: moveToRandomPosition, onCompleteParams: [box]}); } 

Remarquez comment l'ordre des boîtes est réglée automatiquement comme ils glissent devant et un derrière l'autre.

Page   <<  [1] [2] 
Copyright © 2008 - 2016 Lecture Éducation Articles,https://lecture.nmjjxx.com All rights reserved.