Exemple #1
0
 /// <summary>
 /// Instantiate the class.
 /// </summary>
 /// <param name="vortex"></param>
 /// <param name="fxAsset"></param>
 /// <param name="fxName"></param>
 /// <param name="position"></param>
 /// <param name="angle"></param>
 /// <param name="radiusX"></param>
 /// <param name="radiusY"></param>
 /// <param name="layerIdx"></param>
 public Particle(Vortex vortex, Vector3 position, Vector3 angle, string fxAsset, string fxName, float radiusX, float radiusY, int layerIdx)
     : base(Setup(position))
 {
     Parent     = vortex;
     _centerPos = position;
     _rotation  = MathEx.Euler(angle);
     _ptfx      = new LoopedParticle(fxAsset, fxName);
     _xRadius   = radiusX;
     _yRadius   = radiusY;
     LayerIndex = layerIdx;
     PostSetup();
 }
Exemple #2
0
 /// <summary>
 /// Instantiate the class.
 /// </summary>
 /// <param name="vortex"></param>
 /// <param name="fxAsset"></param>
 /// <param name="fxName"></param>
 /// <param name="position"></param>
 /// <param name="angle"></param>
 /// <param name="radius"></param>
 /// <param name="layerIdx"></param>
 public TornadoParticle(TornadoVortex vortex, Vector3 position, Vector3 angle, string fxAsset, string fxName, float radius, int layerIdx)
     : base(Setup(position))
 {
     Parent     = vortex;
     _centerPos = position;
     _rotation  = MathEx.Euler(angle);
     _ptfx      = new LoopedParticle(fxAsset, fxName);
     _radius    = radius;
     _offset    = new Vector3(0, 0, ScriptThread.GetVar <float>("vortexLayerSeperationScale") * layerIdx);
     LayerIndex = layerIdx;
     PostSetup();
 }
        public override void Dispose()
        {
            if (extinguisherSfx.Active)
            {
                extinguisherSfx.Stop();

                extinguisherSfx = null;
            }

            if (extingusherPtx.Exists)
            {
                extingusherPtx.Remove();

                extingusherPtx = null;
            }

            base.Dispose();
        }
            public void StartHeatHaze()
            {
                if (UserConfig.HeatHazeStrength <= 0.0f)
                {
                    return;
                }

                hazeFX = new LoopedParticle[offsets.Length];

                for (var f = 0; f < hazeFX.Length; f++)
                {
                    hazeFX[f] = new LoopedParticle("scr_solomon3", "scr_trev4_747_engine_heathaze");

                    if (!hazeFX[f].IsLoaded)
                    {
                        hazeFX[f].Load();
                    }

                    hazeFX[f].Start(vehicle, offsets[f] + new Vector3(0, -10.0f, 0), new Vector3(180, 0, 0), 2.0f * UserConfig.HeatHazeStrength, null);
                }
            }
Exemple #5
0
        internal BigFireEx(uint nativeHandle, Fire fire) : base(nativeHandle, fire)
        {
            dynamic p = MathHelper.Choose(FireParticles);

            AttachedParticle = new LoopedParticle(p.Asset, p.Name, Fire.Position + Vector3.WorldUp * 0.2f, new Rotator(0f, 0f, MathHelper.GetRandomSingle(0f, 360f)), ParticleMaxScale);
        }
 public IRFlare(Vector3 position, Vector3 rotation) : base(Create(position, rotation))
 {
     ptfx = new LoopedParticle("core", "proj_flare_fuse");
 }