Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    SpawnerFromParent Class

    Namespace: Stride.Particles.Spawners
    Assembly: Stride.Particles.dll

    A particle spawner which continuously spawns particles based on a condition set in a followed (parent) emitter

    System.Object → ParticleSpawner → SpawnerFromParent
    Derived from SpawnerFromParent:

    [DataContract("SpawnerFromParent")]
    [Display("From parent", null)]
    public sealed class SpawnerFromParent : ParticleSpawner
    Name Description
    Constructors
    SpawnerFromParent()

    Default constructor

    Fields
    Parent

    Referenced parent emitter

    Properties
    ParentControlFlag

    Some initializers require fine control between parent and child emitters. Use the control group to assign such meta-fields.

    ParentName

    Name by which to reference a followed (parent) emitter

    ParticleSpawnTrigger

    ParticleSpawnTrigger provides a class which checks if the spawning condition has triggered

    SpawnCount

    The amount of particles this spawner will emit when the event is triggered

    Methods
    GetMaxParticlesPerSecond()

    Get the maximum number of particles this spawner can emit in one second

    GetSpawnControlField()

    Gets a field accessor to the parent emitter's spawn control field, if it exists

    InvalidateRelations()

    Invalidates relation of this emitter to any other emitters that might be referenced

    SpawnNew(Single, ParticleEmitter)

    This method will be called form the emitter when it needs to poll how many particles to spawn (usually once per frame)

    | Improve this Doc View Source

    Constructors


    SpawnerFromParent()

    Default constructor

    public SpawnerFromParent()
    | Improve this Doc View Source

    Fields


    Parent

    Referenced parent emitter

    protected ParticleEmitter Parent
    Field Value
    Type Description
    ParticleEmitter
    | Improve this Doc View Source

    Properties


    ParentControlFlag

    Some initializers require fine control between parent and child emitters. Use the control group to assign such meta-fields.

    [DataMember(40)]
    [Display("Spawn Control Group", null)]
    public ParentControlFlag ParentControlFlag { get; set; }
    Property Value
    Type Description
    ParentControlFlag

    ParentName

    Name by which to reference a followed (parent) emitter

    [DataMember(30)]
    [Display("Parent emitter", null)]
    public string ParentName { get; set; }
    Property Value
    Type Description
    System.String

    ParticleSpawnTrigger

    ParticleSpawnTrigger provides a class which checks if the spawning condition has triggered

    [DataMember(45)]
    public ParticleSpawnTrigger ParticleSpawnTrigger { get; set; }
    Property Value
    Type Description
    ParticleSpawnTrigger

    SpawnCount

    The amount of particles this spawner will emit when the event is triggered

    [DataMember(50)]
    [Display("Particles/trigger", null)]
    public Vector2 SpawnCount { get; set; }
    Property Value
    Type Description
    Vector2
    | Improve this Doc View Source

    Methods


    GetMaxParticlesPerSecond()

    Get the maximum number of particles this spawner can emit in one second

    public override int GetMaxParticlesPerSecond()
    Returns
    Type Description
    System.Int32

    Peak particles per second

    Overrides
    ParticleSpawner.GetMaxParticlesPerSecond()

    GetSpawnControlField()

    Gets a field accessor to the parent emitter's spawn control field, if it exists

    protected ParticleFieldAccessor<ParticleChildrenAttribute> GetSpawnControlField()
    Returns
    Type Description
    ParticleFieldAccessor<ParticleChildrenAttribute>

    InvalidateRelations()

    Invalidates relation of this emitter to any other emitters that might be referenced

    public override void InvalidateRelations()
    Overrides
    ParticleSpawner.InvalidateRelations()

    SpawnNew(Single, ParticleEmitter)

    This method will be called form the emitter when it needs to poll how many particles to spawn (usually once per frame)

    public override void SpawnNew(float dt, ParticleEmitter emitter)
    Parameters
    Type Name Description
    System.Single dt

    Time it has past since the last update (in seconds)

    ParticleEmitter emitter

    Parent emitter in which new particles should be emitter

    Overrides
    ParticleSpawner.SpawnNew(Single, ParticleEmitter)

    Inherited Members

    ParticleSpawner.Enabled
    ParticleSpawner.LoopCondition
    ParticleSpawner.Delay
    ParticleSpawner.Duration
    ParticleSpawner.MarkAsDirty()
    ParticleSpawner.GetUpdatedState(Single, ParticleEmitter)
    ParticleSpawner.NotifyStateSwitch(SpawnerState)

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation