public Condition() { expanded = true; parameter = ParticleManager.PARAMETER.None; trigger = ParticleManager.TRIGGER.Constant; tunings = new ParticlePal.Condition.Tuning[PerformanceInfo.ePARTICLE_QUALITY_COUNT]; for (var i = 0; i < PerformanceInfo.ePARTICLE_QUALITY_COUNT; ++i) { tunings[i] = new ParticlePal.Condition.Tuning(); } }
private void SetParameter(ParticleManager.PARAMETER parameter, float val) { #if UNITY_EDITOR if (this.GetComponent <ParticleSystem>() == null) { EB.Debug.LogError("Partical Pal is attached to something without a particle system"); return; } #endif switch (parameter) { case (ParticleManager.PARAMETER.EmissionRate): var em = this.GetComponent <ParticleSystem>().emission; var rate = em.rate; rate.constantMin = rate.constantMax = val; em.rate = rate; break; case (ParticleManager.PARAMETER.StartingLifeSpan): this.GetComponent <ParticleSystem>().startLifetime = val; break; case (ParticleManager.PARAMETER.StartingSize): this.GetComponent <ParticleSystem>().startSize = val; break; case (ParticleManager.PARAMETER.StartingSpeed): this.GetComponent <ParticleSystem>().startSpeed = val; break; case (ParticleManager.PARAMETER.StartingRotation): this.GetComponent <ParticleSystem>().startRotation = val; break; case (ParticleManager.PARAMETER.GravityMultiplier): this.GetComponent <ParticleSystem>().gravityModifier = val; break; case (ParticleManager.PARAMETER.None): break; default: #if UNITY_EDITOR EB.Debug.LogError("ParticlePal float parameter {0} is not recognized", parameter.ToString()); #endif break; } }
private void SetParameter(ParticleManager.PARAMETER parameter, Color val) { switch (parameter) { case (ParticleManager.PARAMETER.StartingColor): this.GetComponent <ParticleSystem>().startColor = val; break; default: #if UNITY_EDITOR EB.Debug.LogError("ParticlePal color parameter {0} is not recognized", parameter.ToString()); #endif break; } }