Writing Custom Actions (C#)
Different ways to create custom actions
Creating Actions as Components
[System.Serializable]
class ExampleActionComponent : TypewriterActionScriptable
{
[SerializeField] float timeToWait;
// main logic here,
// ...either stateless
protected override IActionState CreateCustomState(ActionMarker marker, object typewriter)
=> new ExampleState(timeToWait);
// ...or as a Coroutine
protected override IEnumerator PerformAction(TypingInfo typingInfo)
{
// yield return ...
}
}