Esempio n. 1
0
    public static void RemoveAndNotify(this List <CloudProperty> options, CloudProperty cloud)
    {
        if (cloud == null)
        {
            Debug.Log("cloudProperty in <CloudOptManager>.RemoveAndNotify is NULL");
            return;
        }
        // index = options.FindIndex((CloudProperty s) => s == cloud);
        options.Remove(cloud);

        CloudOptManager.optionChangeHandle();
    }
Esempio n. 2
0
    /// <summary>
    /// 扩展方法:自定义的List的Add和Remove
    /// </summary>
    /// <param name="cl">表示调用这个方法的类型是List<CloudProperty></param>
    /// <param name="cloud">真正的参数,要添加到list中的item</param>
    public static void AddAndNotify(this List <CloudProperty> options, CloudProperty cloud)
    {
        options.Add(cloud);

        //CloudOptManager.optionChangeHandle.Method;
        if (CloudOptManager.optionChangeHandle == null)
        {
            Debug.Log("CloudOptManager.optionChangeHandle in <CloudOptManager> is NULL");
            return;
        }
        CloudOptManager.optionChangeHandle();
    }