static public void Add (List<EventDelegate> list, Callback callback, bool oneShot)
{
if (list != null)
{
for (int i = 0, imax = list.Count; i < imax; ++i)
{
EventDelegate del = list[i];
if (del != null && del.Equals(callback))
return;
}
EventDelegate ed = new EventDelegate(callback);
ed.oneShot = oneShot;
list.Add(ed);
}
else
{
Debug.LogWarning("Attempting to add a callback to a list that's null");
}
}