Hi, I need some help with this. I don’t understand how I am supposed to use event-handlers the way I need to, if the parameters are strictly defined.
I have an audio component. When it stops playing, I want to destroy the actor it belongs to. With particles I can do this, because the finished-event takes the particleSystemComponent as a parameter. So I can use a delegate to call component->getOwner()->Destroy().
But the audioComponent’s finished-event handler doesn’t take any parameters. So, as far as my understanding goes, I would have to use a delegate that is a member-function of AudioComponent in order to get a “this-reference” that I can use instead. But I can’t add any members to that class…
What can I do here?