public void ApplicateOn(PSParticleSystem ps)
        {
            var psr  = ps.GetComponent <ParticleSystemRenderer>();
            var main = ps.main;

            main.startLifetime = lifetime;
            psr.renderMode     = renderMode;
            if (material == null)
            {
                Debug.LogWarning("Material is null");
            }
            else
            {
                psr.material = material;
            }
            if (materials != null && materials.Length > 0)
            {
                psr.materials = materials;
            }
            if (psr.renderMode == ParticleSystemRenderMode.Mesh)
            {
                if (mesh == null)
                {
                    Debug.LogWarning("Mesh is null");
                }
                psr.mesh = mesh;
            }
        }
Exemple #2
0
        public void ApplicateOn(PSParticleSystem ps)
        {
            var module = ps.GetComponent <ParticleSystem>().colorOverLifetime;

            module.enabled = enabled;
            module.color   = color;
        }
Exemple #3
0
        public void ApplicateOn(PSParticleSystem ps)
        {
            var module = ps.GetComponent <ParticleSystem>().colorBySpeed;

            module.enabled = enabled;
            module.color   = color;
            module.range   = range;
        }
        public void ApplicateOn(PSParticleSystem ps)
        {
            var module = ps.GetComponent <ParticleSystem>().rotationOverLifetime;

            module.enabled = enabled;
            if (enabled)
            {
                module.x           = x;
                module.y           = y;
                module.z           = z;
                module.xMultiplier = xMultiplier;
                module.yMultiplier = yMultiplier;
                module.zMultiplier = zMultiplier;
            }
        }
Exemple #5
0
		public void ApplicateOn(PSParticleSystem ps)
		{
			if (update != null && update != "")
				updateScript = ParticleScript.GetScript(update);
			else
				updateScript = null;

			if (fixedUpdate != null && fixedUpdate != "")
				fixedUpdateScript = ParticleScript.GetScript(fixedUpdate);
			else
				fixedUpdateScript = null;

			if (lateUpdate != null && lateUpdate != "")
				lateUpdateScript = ParticleScript.GetScript(lateUpdate);
			else
				lateUpdateScript = null;

			ps.scriptModule = this;
		}
Exemple #6
0
 public void ApplicateOn(PSParticleSystem ps)
 {
     throw new NotImplementedException();
 }