コード例 #1
0
        private IEnumerator ReturnAfterDelay(ExplosionView _explosion)
        {
            yield return(new WaitForSeconds(explosionAnimDuration));

            _explosion.SetEnabled(false);
            ExplosionPool.Instance.ReturnItem(_explosion);
        }
コード例 #2
0
        public void CreateExplosionAt(Vector2 _position)
        {
            ExplosionView explosion = ExplosionPool.Instance.GetItem();

            explosion.SetPosition(_position);
            explosion.SetEnabled(true);
            StartCoroutine(ReturnAfterDelay(explosion));
        }