public void removeEvent(EButtonEvents aType, Action aAction) { if (mEvents[aType] != null) { mEvents[aType] -= aAction; } if (mEvents[aType] == null) { mEvents.Remove(aType); } }
public void addEvent(EButtonEvents aType, Action aAction) { if (!mEvents.ContainsKey(aType)) { //Debug.Log("adding event for the first time"); mEvents.Add(aType, aAction); } else { Debug.Log("adding aditional event"); mEvents[aType] += aAction; } }