kay Posted July 21, 2014 Share Posted July 21, 2014 I have an event, which gets fired when an animation loops and want to detach it, when a different animation is played. Link to comment Share on other sites More sharing options...
lewster32 Posted July 21, 2014 Share Posted July 21, 2014 Store a reference to it then use the Signal.remove method to remove that reference:// add a loop event, storing a reference for latervar loopEvent = anim.onLoop.add(animationLooped, this);// use the remove function on this event along with the reference to remove itanim.onLoop.remove(loopEvent);This works for virtually all of Phaser's events, which use this Signal implementation for their operation. Link to comment Share on other sites More sharing options...
Recommended Posts