public static StaticDelegateManager Instance() { if (instance == null) { instance = new StaticDelegateManager(); } return(instance); }
public static void delegateInvoke(DelegateEnum dEnum, object[] msgData) { CommonDelegate delegates = StaticDelegateManager.Instance().delegateMapping[(int)dEnum]; if (delegates != null) { delegates.Invoke(msgData); } }
public static void decreaseDelegate(DelegateEnum dEnum, CommonDelegate tDelegate) { StaticDelegateManager.Instance().delegateMapping[(int)dEnum] -= tDelegate; //Debug.Log("StaticDelegateManager-->decreaseDelegate " + delegateMapping[(int)dEnum].GetInvocationList().Length); }