Exemple #1
0
 /// <summary>
 /// Should be called once an action finishes to allow interaction with othr classes or so
 /// </summary>
 /// <param name="type">type of action</param>
 /// <param name="data">maybe data you want to pass</param>
 protected void ActionDone(RegisterCallbackType type, object data)
 {
     foreach (var call in callbacks[type])
     {
         call(data);
     }
 }
Exemple #2
0
 /// <summary>
 /// Registers a callback we can use to interact with other classes or so
 /// </summary>
 /// <param name="type">The type of the callback to register</param>
 /// <param name="callback">The callback to register</param>
 public void RegisterCallback(RegisterCallbackType type, Action <object> callback)
 {
     if (callback != null)
     {
         callbacks[type].Add(callback);
     }
 }