Laya's uninitialized repeat Tween easing caused Bug

 

When you use a Tween icon to do a rotation animation, loop. (Repeat playback number of times is, repeat = 0 an infinite loop, repeat = 1 play once)

Laya.Tween.to(this.light,{rotation:360},2000).repeat = 0;

 

Then you open a Dialog, Dialog is likely this will open play unlimited movies ....

Laya.Dialog.open(game/TestDialog.scene);

 

The reason is that the object is on the Tween pond, repeat not initialized when taken out from the pool, when playing movies Dialog Tween likely to get is that infinite loop Tween.

 

laya.core.js, Tween.to take Tween object from the pool

 

 

 

laya.core.js, when Tween initialization, no reset repeat.

 

 

 

So I added a line to reset the repeat

 

Guess you like

Origin www.cnblogs.com/gamedaybyday/p/11613925.html