Beispiel #1
0
        public SpawnerPool GetPool(string poolName)
        {
            SpawnerPool pool = null;

            try {
                pool = poolDict[poolName];
            }
            catch {
                Logger.LogError(string.Format("Prefab named {0} was not found.", poolName));
            }

            return(pool);
        }
        void ShowPools()
        {
            for (int i = 0; i < poolsProperty.arraySize; i++) {
                currentPool = poolManager.pools[i];
            //				currentPoolProperty = poolsProperty.GetArrayElementAtIndex(i);

                if (currentPool.prefab.prefab == null) {
                    DeleteFromArray(poolsProperty, i);
                    break;
                }

                GUIStyle style = new GUIStyle("foldout");
                style.fontStyle = FontStyle.Bold;
                if (DeleteFoldOut(poolsProperty, i, currentPool.Name.ToGUIContent(), style)) {
                    break;
                }
            }
        }