Hello!
Having a bit of an issue here.
Basically I'm adding a typewriter component to a gameobject via my script, and setting its variables. Like fadeintime, charspersecond and so on.
But I also want to make it so that when the typewriter component is finished it will broadcast a message. (Basically, I want it to disable an animation bool of an animator. Sort of when the typewriter effect is done it stops a talking animation)
To put it in blunt, wrong code.
void BeginTalk () {
var Typewriter = Text.AddComponent<TypewriterEffect> ();
CharacterAnimator.SetBool ("Talk", true);
Typewriter.onFinished = StopTalking()
}
public void StopTalking(){
CharacterAnimator.SetBool ("Talk", false);
}
How would I got about assigning/setting up a proper delegate here. I'm a little confused