File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -303,6 +303,14 @@ export default class PixiStage {
303303 this . removeAnimationByIndex ( index ) ;
304304 }
305305
306+ public removeAnimationByTargetKey ( targetKey : string ) {
307+ let index = this . stageAnimations . findIndex ( ( e ) => e . targetKey === targetKey ) ;
308+ while ( index !== - 1 ) {
309+ this . removeAnimationByIndex ( index ) ;
310+ index = this . stageAnimations . findIndex ( ( e ) => e . targetKey === targetKey ) ;
311+ }
312+ }
313+
306314 public removeAnimationWithSetEffects ( key : string ) {
307315 const index = this . stageAnimations . findIndex ( ( e ) => e . key === key ) ;
308316 if ( index >= 0 ) {
Original file line number Diff line number Diff line change @@ -120,6 +120,7 @@ export const webSocketFunc = () => {
120120 ...( effect . transform ?. scale ?? { } ) ,
121121 } ,
122122 } ;
123+ WebGAL . gameplay . pixiStage ?. removeAnimationByTargetKey ( effect . target ) ;
123124 webgalStore . dispatch ( stageActions . updateEffect ( { target : effect . target , transform : newTransform } ) ) ;
124125 } catch ( e ) {
125126 logger . error ( `无法设置效果 ${ message . message } , ${ e } ` ) ;
You can’t perform that action at this time.
0 commit comments