예제 #1
0
 public static GameObject GetPrefabForType(ObjFuncs.Type type)
 {
     if (type == ObjFuncs.Type.Marine)
     {
         return(xa.pr.MarinePrefab);
     }
     return(null);
 }
예제 #2
0
 public static GameObject GetPrefabForType(ObjFuncs.Type type)
 {
     if (xa.pr == null)
     {
         Debug.Log("GetPrefabForType returned null! 1"); return(null);
     }
     for (int i = 0; i < xa.pr.library.Length; i++)
     {
         if (xa.pr.library[i].type == type)
         {
             return(xa.pr.library[i].prefab);
         }
     }
     Debug.Log("GetPrefabForType returned null! 2");
     return(null);
 }