Created
June 16, 2012 04:30
-
-
Save jakevsrobots/2939922 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class EventsTest : MonoBehaviour { | |
void Start () { | |
EventManager.AddEventListener("test-event", delegate() { | |
Debug.Log("Test event was triggered!"); | |
}); | |
StartCoroutine(TriggerTestEvent()); | |
} | |
IEnumerator TriggerTestEvent() { | |
Debug.Log("Waiting 3 seconds and then triggering event"); | |
yield return new WaitForSeconds(3.0f); | |
EventManager.TriggerEvent("test-event"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment