コード例 #1
0
 public static StaticDelegateManager Instance()
 {
     if (instance == null)
     {
         instance = new StaticDelegateManager();
     }
     return(instance);
 }
コード例 #2
0
    public static void delegateInvoke(DelegateEnum dEnum, object[] msgData)
    {
        CommonDelegate delegates = StaticDelegateManager.Instance().delegateMapping[(int)dEnum];

        if (delegates != null)
        {
            delegates.Invoke(msgData);
        }
    }
コード例 #3
0
 public static void decreaseDelegate(DelegateEnum dEnum, CommonDelegate tDelegate)
 {
     StaticDelegateManager.Instance().delegateMapping[(int)dEnum] -= tDelegate;
     //Debug.Log("StaticDelegateManager-->decreaseDelegate " + delegateMapping[(int)dEnum].GetInvocationList().Length);
 }