ParticleEffect ParticleEffect { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The ParticleEffect property of the ParticleController class represents the particle effect that is being controlled by this component. This property allows you to access and manipulate the particle effect associated with the controller, enabling you to modify its behavior or appearance dynamically.

Usage

To use the ParticleEffect property, you need to have an instance of the ParticleController class. You can then get or set the ParticleEffect to control the particle effect:

ParticleController controller = new ParticleController();
ParticleEffect effect = controller.ParticleEffect;
// Modify the effect as needed
controller.ParticleEffect = new ParticleEffect();

Example

// Example of accessing and modifying the ParticleEffect property
ParticleController particleController = new ParticleController();

// Access the current ParticleEffect
ParticleEffect currentEffect = particleController.ParticleEffect;

// Perform operations on the current effect
if (currentEffect != null)
{
    // Example: Change some properties of the effect
    currentEffect.SetPosition(Vector3.Zero);
    currentEffect.SetColor(Color.Red);
}

// Assign a new ParticleEffect
ParticleEffect newEffect = new ParticleEffect();
particleController.ParticleEffect = newEffect;

// Now the controller manages the new effect