Esempio n. 1
0
        private void Awake()
        {
            throwableObjectPool = new ObjectPool <ThrowableObject>(
                () =>
            {
                GameObject gameObject = Finder.PrefabFactory.CreateThrowableObject(transform);
                gameObject.SetActive(false);
                ThrowableObject throwableObject = gameObject.GetComponent <ThrowableObject>();
                throwableObject.Thrower         = this;
                return(throwableObject);
            },
                throwableObjectPoolSize
                );

            waitForThrowNewObjectDelay = new FreezableWaitForSeconds(throwNextObjectDelay);
        }
Esempio n. 2
0
 public void Reset()
 {
     waitForRemoveObjectDelay = new FreezableWaitForSeconds(Thrower.removeObjectDelay);
 }