Example #1
0
    /// <summary>
    /// 获取当前可用的异步触发器,提供触发类型
    /// </summary>
    /// <param name="ud"></param>
    /// <returns></returns>
    public static UserDelegateTriggle GetTriggle(UserDelegateFun ud, params object[] args)
    {
        UserDelegateTriggle triggle;

        if (mTrigglePools.Count > 0)
        {
            triggle = mTrigglePools.Dequeue();
            triggle.SetDelegateFun(ud);
            triggle.SetContext(args);
        }
        else
        {
            triggle = new UserDelegateTriggle();
            triggle.SetDelegateFun(ud);
            triggle.SetContext(args);
        }
        return(triggle);
    }
Example #2
0
 /// <summary>
 /// 清空触发器的所有信息
 /// </summary>
 public void Clear()
 {
     mactionud      = null;
     mactionud      = null;
     mTriggleLinker = null;
 }
Example #3
0
 public void SetDelegateFun(UserDelegateFun ud)
 {
     mactionud = ud;
 }