public FGroup <T> Create <T>(string resName, GameObject parent, FGroupTool tool = null, Action <int, T> call = null) where T : Component
        {
            var g = new FGroup <T>();

            g.Init(resName, parent, tool, call);
            mPools.Add(g);
            return(g);
        }
Exemple #2
0
 public void Init(T obj, FGroupTool tool, Action <int, T> call = null, int num = 0)
 {
     _Init("", obj, null, call, tool, num);
 }
Exemple #3
0
 public void Init(string resName, GameObject parent, FGroupTool tool, Action <int, T> call = null, int num = 0)
 {
     _Init(resName, null, parent.transform, call, tool, num);
 }
Exemple #4
0
 private void _Init(string resName, T obj, Transform parent, System.Action <int, T> call, FGroupTool tool, int num)
 {
     mGroupConfig.tempT    = obj;
     mGroupConfig.toolData = tool;
     mCallEvent            = call;
     mGroupConfig.resName  = resName;
     mGroupConfig.parent   = parent;
     if (obj != null)
     {
         obj.gameObject.SetActive(false);
     }
     if (tool != null)
     {
         tool.Init(resName, obj);
     }
     if (num != 0)
     {
         Refurbish(num);
     }
 }