Event-based Coroutine

Author: Kspr

Description
This is a MonoBehavior that triggers an event, and a script that creates a handler for listening. This is fairly trivial, except it triggers an IEnumerator-function which can be yielded and started as a normal Coroutine. This is useful in many situations, such as displaying a Coroutine-based animation upon doing a MouseClick.

Usage
In this example, InterfaceButton is a MonoBehavior which should be attached to a GameObject with a collider, so it can listen for MouseClicks. Place InterfaceButtonListener on another GameObject.