public Condition() { expanded = true; parameter = ePARAMETER.None; trigger = eTRIGGER.Constant; tunings = new Condition.Tuning[XParticleLevel.QUALITY_COUNT]; for (var i = 0; i < XParticleLevel.QUALITY_COUNT; ++i) { tunings[i] = new Condition.Tuning(); } }
private void SetParameter(ePARAMETER parameter, float val) { if (_particleSystem == null) { Debug.LogError("there is NO particle system!"); return; } ParticleSystem.MainModule mainModule = _particleSystem.main; ParticleSystem.EmissionModule emissModule = _particleSystem.emission; switch (parameter) { case (ePARAMETER.EmissionRate): emissModule.rate = new ParticleSystem.MinMaxCurve(val); break; case (ePARAMETER.MaxParticles): mainModule.maxParticles = (int)val; break; case (ePARAMETER.StartingLifeSpan): mainModule.startLifetime = val; break; case (ePARAMETER.StartingSize): mainModule.startSize = val; break; case (ePARAMETER.StartingSpeed): mainModule.startSpeed = val; break; case (ePARAMETER.StartingRotation): mainModule.startRotation = val; break; case (ePARAMETER.GravityMultiplier): mainModule.gravityModifier = val; break; case (ePARAMETER.None): break; default: break; } }
private void SetParameter(ePARAMETER parameter, Color val) { if (_particleSystem == null) { Debug.LogError("there is NO particle system!"); return; } ParticleSystem.MainModule mainModule = _particleSystem.main; switch (parameter) { case (ePARAMETER.StartingColor): mainModule.startColor = val; break; default: break; } }