コード例 #1
0
        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;
        }
コード例 #2
0
ファイル: ParticleEffect.cs プロジェクト: Antr0py/VoxelRTS
        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;
        }
コード例 #3
0
ファイル: ParticleRenderer.cs プロジェクト: Antr0py/VoxelRTS
 public ParticleRenderer(Effect fx, ParticleEffectConfig peConf)
 {
     fxParticle = new ParticleEffect(fx, peConf);
 }
コード例 #4
0
 public ParticleRenderer(Effect fx, ParticleEffectConfig peConf)
 {
     fxParticle = new ParticleEffect(fx, peConf);
 }