Hello,
im currently trying to animate various Objects. The Objects have one Animation attached (in an Anim State Graph) and in this Animation the Objects are changing their visuals. I want to change them stepwise, so i have some Animation Events set. When the Animation is playing at speed 1 the Events are getting fired correct. But when i try to revert the Animation (speed = -1) the Events do not fire.
AnimationHandler.prototype.initialize = function() {
this.state = 'small'
this.entity.anim.playing = false;
this.entity.anim.on('anim-small', ()=>{
console.log('small');
this.state = 'small';
this.entity.anim.playing = false;
})
this.entity.anim.on('anim-normal', ()=>{
console.log('normal')
this.state = 'normal';
this.entity.anim.playing = false;
})
this.entity.anim.on('anim-big', ()=>{
console.log('big')
this.state = 'big';
this.entity.anim.playing = false;
})
};
AnimationHandler.prototype.bigger = function(){
this.entity.anim.speed = 1;
this.entity.anim.playing = true;
}
AnimationHandler.prototype.smaller = function(){
this.entity.anim.speed = -1;
this.entity.anim.playing = true;
}
Is there a way to play the Animation backwards WITH the Events fire?