Ejemplo n.º 1
0
        public void InitializeParticle(RewardType rewardType, Vector3 position)
        {
            var particleSystem       = particleComponents.First(x => x.ParticleType == rewardType).ParticleSystem;
            var instantiatedParticle =
                Instantiate(particleSystem, position, Quaternion.identity, transform);

            StartCoroutine(ExtensionUtility.StartWithDelay(instantiatedParticle.main.duration,
                                                           () => Destroy(instantiatedParticle)));
        }