private void InitCrowdController() { if (!_wasInited) { instance = this; dummies = this.transform.GetComponentsInChildren <Dummy>(); _dummyPool = new ComponentBasedObjectPool <Dummy>(_prefab, _dummyParent, crowdSize); _dummyCount = dummies.Length; _wasInited = true; } }
private void InitCrowdController() { if (!_wasInited) { instance = this; dummies = this.transform.GetComponentsInChildren<Dummy>(); _dummyPool = new ComponentBasedObjectPool<Dummy>(_prefab, _dummyParent, crowdSize); _dummyCount = dummies.Length; _wasInited = true; } }