Example #1
0
    private void InitCrowdController()
    {
        if (!_wasInited)
        {
            instance = this;
            dummies  = this.transform.GetComponentsInChildren <Dummy>();

            _dummyPool = new ComponentBasedObjectPool <Dummy>(_prefab, _dummyParent, crowdSize);

            _dummyCount = dummies.Length;

            _wasInited = true;
        }
    }
Example #2
0
    private void InitCrowdController()
    {
        if (!_wasInited)
        {
            instance = this;
            dummies = this.transform.GetComponentsInChildren<Dummy>();

            _dummyPool = new ComponentBasedObjectPool<Dummy>(_prefab, _dummyParent, crowdSize);

            _dummyCount = dummies.Length;

            _wasInited = true;
        }
    }