public InstantaneousEmitter(IKeyValueCollection baseProperties, IKeyValueCollection keyValues) { this.baseProperties = baseProperties; emitCount = keyValues.GetNumberProvider("m_nParticlesToEmit"); startTime = keyValues.GetNumberProvider("m_flStartTime"); }
public ContinuousEmitter(IKeyValueCollection baseProperties, IKeyValueCollection keyValues) { this.baseProperties = baseProperties; if (keyValues.ContainsKey("m_flEmissionDuration")) { emissionDuration = keyValues.GetNumberProvider("m_flEmissionDuration"); } if (keyValues.ContainsKey("m_flStartTime")) { startTime = keyValues.GetNumberProvider("m_flStartTime"); } if (keyValues.ContainsKey("m_flEmitRate")) { emitRate = keyValues.GetNumberProvider("m_flEmitRate"); emitInterval = 1.0f / (float)emitRate.NextNumber(); } }
public InitialVelocityNoise(IKeyValueCollection keyValues) { if (keyValues.ContainsKey("m_vecOutputMin")) { outputMin = keyValues.GetVectorProvider("m_vecOutputMin"); } if (keyValues.ContainsKey("m_vecOutputMax")) { outputMax = keyValues.GetVectorProvider("m_vecOutputMax"); } if (keyValues.ContainsKey("m_flNoiseScale")) { noiseScale = keyValues.GetNumberProvider("m_flNoiseScale"); } }