Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    SpawnerBurst Class

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

    A particle spawner which continuously spawns particles. Number of particles to be spawned is given in seconds.

    System.Object → ParticleSpawner → SpawnerBurst
    Derived from SpawnerBurst:

    [DataContract("SpawnerBurst")]
    [Display("Burst", null)]
    public sealed class SpawnerBurst : ParticleSpawner
    Name Description
    Constructors
    SpawnerBurst()
    Properties
    SpawnCount

    The amount of particles this spawner will emit in one burst when it activates

    Methods
    GetMaxParticlesPerSecond()

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

    NotifyStateSwitch(SpawnerState)

    Will be called when the state changes. Override if you need to set/reset variables based on state changes

    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


    SpawnerBurst()

    public SpawnerBurst()
    | Improve this Doc View Source

    Properties


    SpawnCount

    The amount of particles this spawner will emit in one burst when it activates

    [DataMember(40)]
    [Display("Particles/burst", null)]
    public int SpawnCount { get; set; }
    Property Value
    Type Description
    System.Int32
    | 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()

    NotifyStateSwitch(SpawnerState)

    Will be called when the state changes. Override if you need to set/reset variables based on state changes

    protected override void NotifyStateSwitch(SpawnerState newState)
    Parameters
    Type Name Description
    SpawnerState newState

    The new state

    Overrides
    ParticleSpawner.NotifyStateSwitch(SpawnerState)

    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.InvalidateRelations()

    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