public ParticleEffect(Effect _fx, ParticleEffectConfig conf) { fx = _fx; fx.CurrentTechnique = fx.Techniques[0]; fxPassSimple = fx.CurrentTechnique.Passes[conf.PassSimple]; fxpVP = fx.Parameters[conf.ParamVP]; fxpTime = fx.Parameters[conf.ParamTime]; fxpMapSize = fx.Parameters[conf.ParamMapSize]; fxPassLightning = fx.CurrentTechnique.Passes[conf.PassLightning]; fxpLSplits = fx.Parameters[conf.ParamSplits]; fxPassFire = fx.CurrentTechnique.Passes[conf.PassFire]; fxpFRates = fx.Parameters[conf.ParamRates]; fxpFScales = fx.Parameters[conf.ParamScales]; fxpFOff1 = fx.Parameters[conf.ParamOffset1]; fxpFOff2 = fx.Parameters[conf.ParamOffset2]; fxpFOff3 = fx.Parameters[conf.ParamOffset3]; fxpFDistortScale = fx.Parameters[conf.ParamDistortScale]; fxpFDistortBias = fx.Parameters[conf.ParamDistortBias]; fxPassAlert = fx.CurrentTechnique.Passes[conf.PassAlert]; // Set Default Values LightningSplits = DEFAULT_SPLITS; FireDistortScale = DEFAULT_DISTORT_SCALE; FireDistortBias = DEFAULT_DISTORT_BIAS; FireOffset1 = DEFAULT_OFFSET; FireOffset2 = DEFAULT_OFFSET; FireOffset3 = DEFAULT_OFFSET; FireRates = DEFAULT_RATES; FireScales = DEFAULT_SCALES; }
public ParticleRenderer(Effect fx, ParticleEffectConfig peConf) { fxParticle = new ParticleEffect(fx, peConf); }