Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.56 KB | None | 0 0
  1.     Dictionary<string, List< System.Action<int, float, string> > > a = new Dictionary<string, List< System.Action< int, float, string > >  >();
  2.     public void AddEvent(string name, System.Action<int, float, string> del ,System.Func<bool> decision = null)
  3.     {
  4.         if(a.ContainsKey(name))
  5.         {
  6.             a[name].Add(del);
  7.         }
  8.         else
  9.         {
  10.             List<System.Action<int, float, string>> list = new List<System.Action<int, float, string>>();
  11.             list.Add(del);
  12.             a.Add(name, list);
  13.         }
  14.        
  15.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement