public BrownOut(ContentManager contentManager) { Pose = new Pose(Matrix33F.CreateRotationX(-ConstantsF.PiOver2)); // Smoke on a ring. var outerRingSmoke = CreateSmoke(contentManager); outerRingSmoke.Effectors.Add(new StreamEmitter { DefaultEmissionRate = 30 }); outerRingSmoke.Effectors.Add(new StartPositionEffector { Distribution = new CircleDistribution { OuterRadius = 5, InnerRadius = 4 } }); // Smoke in the area inside the ring. var innerCircleSmoke = CreateSmoke(contentManager); innerCircleSmoke.Effectors.Add(new StreamEmitter { DefaultEmissionRate = 10 }); innerCircleSmoke.Effectors.Add(new StartPositionEffector { Distribution = new CircleDistribution { OuterRadius = 4, InnerRadius = 0 } }); // Uniform particle parameter that are the same for all child particle systems. Parameters.AddUniform<float>(ParticleParameterNames.Lifetime).DefaultValue = 5; _isDepthSortedParameter = Parameters.AddUniform<bool>(ParticleParameterNames.IsDepthSorted); _isDepthSortedParameter.DefaultValue = true; Children = new ParticleSystemCollection { outerRingSmoke, innerCircleSmoke }; }
protected override void OnUninitialize() { _normalizedAgeParameter = null; _positionParameter = null; _directionParameter = null; _linearSpeedParameter = null; _trailParameter = null; }
protected override void OnRequeryParameters() { _positionParameter = ParticleSystem.Parameters.Get<Vector3F>(PositionParameter); _targetPositionParameter = ParticleSystem.Parameters.Get<Vector3F>(TargetPositionParameter); _speedParameter = ParticleSystem.Parameters.Get<float>(SpeedParameter); _sizeXParameter = ParticleSystem.Parameters.Get<float>(SizeXParameter); _cameraPoseParameter = ParticleSystem.Parameters.Get<Pose>(CameraPoseParameter); }
protected override void OnRequeryParameters() { _normalizedAgeParameter = ParticleSystem.Parameters.Get<float>(ParticleParameterNames.NormalizedAge); _positionParameter = ParticleSystem.Parameters.Get<Vector3F>(ParticleParameterNames.Position); _directionParameter = ParticleSystem.Parameters.Get<Vector3F>(ParticleParameterNames.Direction); _linearSpeedParameter = ParticleSystem.Parameters.Get<float>(ParticleParameterNames.LinearSpeed); // The "RocketTrail" parameter is required and added by this effector. // Note: It is safe to call AddVarying() several times. The particle parameter is added only // once. _trailParameter = ParticleSystem.Parameters.AddVarying<ParticleSystem>("RocketTrail"); }
/// <inheritdoc/> protected override void OnUninitialize() { _valueParameter = null; _dampingParameter = null; }
/// <inheritdoc/> protected override void OnRequeryParameters() { _parameter = ParticleSystem.Parameters.Get <Vector3>(Parameter); }
/// <inheritdoc/> protected override void OnUninitialize() { _inputParameter = null; _outputParameter = null; _timeParameter = null; }
/// <inheritdoc/> protected override void OnUninitialize() { _normalizedAgeParameter = null; }
/// <inheritdoc/> protected override void OnUninitialize() { _directionParameter = null; _linearSpeedParameter = null; _linearAccelerationParameter = null; }
/// <inheritdoc/> protected override void OnUninitialize() { _angleParameter = null; _angularSpeedParameter = null; }
// OnRequeryParameters is called when the particle system is started and when the particle // parameter collection is changed. Here we cache references to the needed parameters. protected override void OnRequeryParameters() { _positionParameter = ParticleSystem.Parameters.Get<Vector3F>(PositionParameter); _directionParameter = ParticleSystem.Parameters.Get<Vector3F>(DirectionParameter); _linearSpeedParameter = ParticleSystem.Parameters.Get<float>(LinearSpeedParameter); _restitutionParameter = ParticleSystem.Parameters.Get<float>(RestitutionParameter); }
/// <inheritdoc/> protected override void OnUninitialize() { _directionParameter = null; _linearSpeedParameter = null; _biasVelocityParameter = null; }
/// <inheritdoc/> protected override void OnRequeryParameters() { _angleParameter = ParticleSystem.Parameters.Get <float>(AngleParameter); _angularSpeedParameter = ParticleSystem.Parameters.Get <float>(SpeedParameter); }
/// <inheritdoc/> protected override void OnRequeryParameters() { _directionParameter = ParticleSystem.Parameters.Get <Vector3>(DirectionParameter); _linearSpeedParameter = ParticleSystem.Parameters.Get <float>(SpeedParameter); _biasVelocityParameter = ParticleSystem.Parameters.Get <Vector3>(BiasVelocityParameter); }
protected override void OnUninitialize() { _animationTimeParameter = null; }
protected override void OnRequeryParameters() { _animationTimeParameter = ParticleSystem.Parameters.Get <float>(AnimationTimeParameter); }
/// <inheritdoc/> protected override void OnRequeryParameters() { _emissionRateParameter = ParticleSystem.Parameters.Get <float>(EmissionRateParameter); }
/// <inheritdoc/> protected override void OnUninitialize() { _valueParameter = null; _startParameter = null; _endParameter = null; _factorParameter = null; }
/// <inheritdoc/> protected override void OnRequeryParameters() { _valueParameter = ParticleSystem.Parameters.Get <float>(ValueParameter); _targetValueParameter = ParticleSystem.Parameters.Get <float>(TargetValueParameter); _timeParameter = ParticleSystem.Parameters.Get <float>(TimeParameter); }
/// <inheritdoc/> protected override void OnRequeryParameters() { _valueParameter = ParticleSystem.Parameters.Get<float>(ValueParameter); _targetValueParameter = ParticleSystem.Parameters.Get<float>(TargetValueParameter); _timeParameter = ParticleSystem.Parameters.Get<float>(TimeParameter); }
/// <inheritdoc/> protected override void OnUninitialize() { _emissionRateParameter = null; }
/// <inheritdoc/> protected override void OnRequeryParameters() { _valueParameter = ParticleSystem.Parameters.Get<float>(ValueParameter); _dampingParameter = ParticleSystem.Parameters.Get<float>(DampingParameter); }
/// <inheritdoc/> protected override void OnUninitialize() { _valueParameter = null; _targetValueParameter = null; _timeParameter = null; }
/// <inheritdoc/> protected override void OnRequeryParameters() { _normalizedAgeParameter = ParticleSystem.Parameters.Get <float>(ParticleParameterNames.NormalizedAge); }
protected override void OnRequeryParameters() { _animationTimeParameter = ParticleSystem.Parameters.Get<float>(AnimationTimeParameter); }
/// <inheritdoc/> protected override void OnRequeryParameters() { _inputParameter = ParticleSystem.Parameters.Get<Vector3F>(InputParameter); _outputParameter = ParticleSystem.Parameters.Get<Vector3F>(OutputParameter); _timeParameter = ParticleSystem.Parameters.Get<float>(TimeParameter); }
protected override void OnUninitialize() { _parameter = null; }
/// <inheritdoc/> protected override void OnRequeryParameters() { _positionParameter = ParticleSystem.Parameters.Get <Vector3F>(PositionParameter); _directionParameter = ParticleSystem.Parameters.Get <Vector3F>(DirectionParameter); _linearSpeedParameter = ParticleSystem.Parameters.Get <float>(SpeedParameter); }
/// <inheritdoc/> protected override void OnRequeryParameters() { _normalizedAgeParameter = ParticleSystem.Parameters.Get<float>(ParticleParameterNames.NormalizedAge); }
/// <inheritdoc/> protected override void OnUninitialize() { _linearSpeedParameter = null; _positionParameter = null; _directionParameter = null; }
/// <inheritdoc/> protected override void OnRequeryParameters() { _valueParameter = ParticleSystem.Parameters.Get <float>(ValueParameter); _dampingParameter = ParticleSystem.Parameters.Get <float>(DampingParameter); }
/// <inheritdoc/> protected override void OnRequeryParameters() { _inputParameter = ParticleSystem.Parameters.Get <float>(InputParameter); _outputParameter = ParticleSystem.Parameters.Get <float>(OutputParameter); _timeParameter = ParticleSystem.Parameters.Get <float>(TimeParameter); }
/// <inheritdoc/> protected override void OnRequeryParameters() { _angleParameter = ParticleSystem.Parameters.Get<float>(AngleParameter); _angularSpeedParameter = ParticleSystem.Parameters.Get<float>(SpeedParameter); }
protected override void OnUninitialize() { _positionParameter = null; _targetPositionParameter = null; _speedParameter = null; _sizeXParameter = null; _cameraPoseParameter = null; }
/// <inheritdoc/> protected override void OnRequeryParameters() { _valueParameter = ParticleSystem.Parameters.Get<float>(ValueParameter); _startParameter = ParticleSystem.Parameters.Get<float>(StartParameter); _endParameter = ParticleSystem.Parameters.Get<float>(EndParameter); _factorParameter = ParticleSystem.Parameters.Get<float>(FactorParameter); }
/// <inheritdoc/> protected override void OnRequeryParameters() { _inputParameter = ParticleSystem.Parameters.Get <T>(InputParameter); _outputParameter = ParticleSystem.Parameters.Get <TResult>(OutputParameter); }
//-------------------------------------------------------------- public void RequeryParameters(ParticleSystem particleSystem) { var parameters = particleSystem.Parameters; // Uniform particle parameters. TextureParameter = parameters.GetUnchecked<PackedTexture>(ParticleParameterNames.Texture); if (TextureParameter == null) TextureParameter = parameters.GetUnchecked<Texture2D>(ParticleParameterNames.Texture); AlphaTestParameter = parameters.Get<float>(ParticleParameterNames.AlphaTest); BillboardOrientationParameter = parameters.Get<BillboardOrientation>(ParticleParameterNames.BillboardOrientation); DrawOrderParameter = parameters.Get<int>(ParticleParameterNames.DrawOrder); IsDepthSortedParameter = parameters.Get<bool>(ParticleParameterNames.IsDepthSorted); TypeParameter = parameters.Get<ParticleType>(ParticleParameterNames.Type); TextureTilingParameter = parameters.Get<int>(ParticleParameterNames.TextureTiling); // Uniform or varying particle parameters. NormalizedAgeParameter = parameters.Get<float>(ParticleParameterNames.NormalizedAge); PositionParameter = parameters.Get<Vector3F>(ParticleParameterNames.Position); NormalParameter = parameters.Get<Vector3F>(ParticleParameterNames.Normal); AxisParameter = parameters.Get<Vector3F>(ParticleParameterNames.Axis); SizeParameter = parameters.Get<float>(ParticleParameterNames.Size); SizeXParameter = parameters.Get<float>(ParticleParameterNames.SizeX); SizeYParameter = parameters.Get<float>(ParticleParameterNames.SizeY); AngleParameter = parameters.Get<float>(ParticleParameterNames.Angle); ColorParameter = parameters.Get<Vector3F>(ParticleParameterNames.Color); AlphaParameter = parameters.Get<float>(ParticleParameterNames.Alpha); AnimationTimeParameter = parameters.Get<float>(ParticleParameterNames.AnimationTime); BlendModeParameter = parameters.Get<float>(ParticleParameterNames.BlendMode); SoftnessParameter = parameters.Get<float>(ParticleParameterNames.Softness); //StartsAtOriginParameter = parameters.Get<bool>(ParticleParameterNames.StartsAtOrigin); }
/// <inheritdoc/> protected override void OnRequeryParameters() { _directionParameter = ParticleSystem.Parameters.Get<Vector3F>(DirectionParameter); _linearSpeedParameter = ParticleSystem.Parameters.Get<float>(SpeedParameter); _biasVelocityParameter = ParticleSystem.Parameters.Get<Vector3F>(BiasVelocityParameter); }
// Called when the particle effector is removed from the particle system. // This method should remove any held references. protected override void OnUninitialize() { _positionParameter = null; _directionParameter = null; _linearSpeedParameter = null; _restitutionParameter = null; }
/// <inheritdoc/> protected override void OnRequeryParameters() { _parameter = ParticleSystem.Parameters.Get<float>(Parameter); }
/// <inheritdoc/> protected override void OnUninitialize() { _inputParameter = null; _outputParameter = null; }
/// <inheritdoc/> protected override void OnRequeryParameters() { _emissionRateParameter = ParticleSystem.Parameters.Get<float>(EmissionRateParameter); }
/// <inheritdoc/> protected override void OnUninitialize() { _parameter = null; }