/// <summary>
    /// 提取配置属性
    /// </summary>
    /// <returns>The prototype.</returns>
    /// <param name="prototypeID">Prototype I.</param>
    /// <typeparam name="T">The 1st type parameter.</typeparam>
    public T GetPrototype(int prototypeID)
    {
        T basePrototype = null;

        Type refType = typeof(T);

        Dictionary <int, T> table = GetPrototypeTable();

        if (table != null)
        {
            if (table.TryGetValue(prototypeID, out basePrototype))
            {
                if (basePrototype == null)
                {
                    return(null);
                }

                return(basePrototype);
            }
            else
            {
#if UNITY_EDITOR
                LogCtrl.Error("此表中没有此ID GetPrototype = " + refType.Name + "   prototypeID = " + prototypeID);
#else
                LogCtrl.Warn("此表中没有此ID GetPrototype = " + refType.Name + "   prototypeID = " + prototypeID);
#endif
            }
        }

        return(null);
    }
Example #2
0
 public void Addition(IEnumeratorTask task)
 {
     if (mlistTask.Contains(task))
     {
         LogCtrl.Warn("AddTask  Contains   Type : " + TaskType);
         return;
     }
     mlistTask.Add(task);
     TryExcuteNextTask();
 }