改变爆炸特效颜色

2019-04-03  本文已影响0人  沉麟
effectBoom.transform.position = transform.position;
                foreach (Transform child in effectBoom.transform)
                {
                    child.transform.localScale = child.transform.localScale * 0.47f * size;
                    if (size > 1)
                    {
                        child.transform.localPosition = child.transform.localPosition + new Vector3(0, -size, 0);
                    }              
                }
                ParticleSystem particle = effectBoom.GetComponent<BaseEffect>().bombEffectChild.GetComponent<ParticleSystem>();
                ParticleSystem.MainModule settings = particle.main;
                settings.startColor = new ParticleSystem.MinMaxGradient(colorSideMaterials[nowColor],colorMaterials[nowColor]);
上一篇下一篇

猜你喜欢

热点阅读