Skip to content

Instantly share code, notes, and snippets.

@johans2
Created September 9, 2018 15:41
Show Gist options
  • Save johans2/7643d7ba1b69f3b008b155ee763b680d to your computer and use it in GitHub Desktop.
Save johans2/7643d7ba1b69f3b008b155ee763b680d to your computer and use it in GitHub Desktop.
using UnityEngine;
using Cakewalk.Signal;
using System.Collections;
public class SignalSender : MonoBehaviour {
public static Signal<string, int> TestSignal = new Signal<string, int>();
public float eventDelayTime = 1f;
public string text = "Hello from SignalSender!";
public int number = 1;
IEnumerator Start() {
while(true) {
yield return new WaitForSeconds(1);
TestSignal.Dispatch(text, number);
number++;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment