GFX
  • Docs
  • API
Search Results for

    Show / Hide Table of Contents
    • Genesis.Core
      • AssetManager
      • Game
      • GameElement
      • GameEventHandler
      • GenesisWindow
      • IGameBehavior
      • Input
      • Layer
      • Light
      • Scene
      • Scene3D
      • SceneEventHandler
      • SceneSizeEvenHandler
      • Storage
      • Utils
    • Genesis.Core.Behaviors
      • AnimationBehavior
      • CameraFlags
      • CharacterController2D
      • ControllerPreset
      • MoveDirection
      • MovementFlags
      • SpriteMovementController
    • Genesis.Core.Behaviors.Physics2D
      • BufferedSpriteCollider
      • PhysicsBox2D
      • PhysicsPolygon2D
      • Rigidbody2D
    • Genesis.Core.Behaviors.Physics3D
      • BoxCollider
      • CapsuleCollider
      • ConvexHullBehavior
      • QubeConvexHull
      • SphereCollider
      • StaticMeshBehavior
    • Genesis.Core.Behaviors._3D
      • Stance
      • ThirdpersonCharacterController
    • Genesis.Core.GameElements
      • BufferedSprite
      • CameraElement
      • Element3D
      • Empty
      • Model
      • ParticleBuffers
      • ParticleDeffinition
      • ParticleEmitter
      • Qube
      • RectElement
      • Skybox
      • Sprite
      • SpriteShapeDeffinition
      • Terrain2D
      • Terrain3D
      • TerrainData
    • Genesis.Graphics
      • Animation
      • Camera
      • CameraType
      • Face
      • Font
      • Framebuffer
      • Glyphe
      • IRenderDevice
      • Material
      • MaterialBuffer
      • Mesh
      • PerspectiveCamera
      • Shader
      • ShaderProgram
      • TexCoords
      • Texture
      • Viewport
    • Genesis.Graphics.Animation3D
      • Animation
      • Animator
      • AssimpNodeData
      • Bone
      • KeyPosition
      • KeyRotation
      • KeyScale
      • ModelMesh
      • boneinfo
      • vertex
    • Genesis.Graphics.Physics
      • BulletDebugRenderer
    • Genesis.Graphics.RenderDevice
      • ClassicGL
      • GLRenderer
    • Genesis.Graphics.Shaders.OpenGL
      • AnimatedModelShader
      • BasicShader
      • DiffuseLightning
      • DiffuseNormalLightning
      • DiffuseNormalShader
      • DiffuseShader
      • DiffuseSolidShader
      • MVPRectShader
      • MVPShader
      • MVPSolidShader
      • ParticleShader
      • ScreenShader
      • SkyboxShader
      • SpriteShader
      • TerrainShader
      • WireframeShader
    • Genesis.Graphics.Shapes
      • BufferedSpriteShape
      • FrameShape
      • GlypheShape
      • LineShape
      • PlaneShape
      • QubeShape
      • RectShape
      • Shape
      • SpriteShape
    • Genesis.Math
      • Matrix4x4
      • NoisePoint
      • PerlinNoise
      • Rect
      • Vec3
    • Genesis.Physics
      • Aabb
      • HitResult
      • MatrixSet
      • MouseRay2
      • PhysicHandler
      • PhysicHandlerEvent
      • PhysicPropeterys
      • PhysicsBehavior
      • PhysicsBehaviorEvent
      • PhysicsHandler2D
      • PhysicsHandler3D
      • Raycast
    • Genesis.UI
      • Canvas
      • ImageButton
      • Label
      • ListItem
      • ListItemBehavior
      • ListSelector
      • ListSelectorBehavior
      • Panel
      • ProgressBar
      • UIEvent
      • UIParseHandler
      • UIParser
      • Widget

    Class ParticleEmitter

    Represents a particle emitter as a game element.

    Inheritance
    object
    GameElement
    ParticleEmitter
    Inherited Members
    GameElement.Init(Game, IRenderDevice)
    GameElement.OnUpdate(Game, IRenderDevice)
    GameElement.AddBehavior<T>(T)
    GameElement.AddBehavior(IGameBehavior)
    GameElement.GetBehavior<T>()
    GameElement.GetBehaviors<T>()
    GameElement.AddChild(GameElement)
    GameElement.GetInstance(GameElement)
    GameElement.Name
    GameElement.Tag
    GameElement.Location
    GameElement.Rotation
    GameElement.Size
    GameElement.Behaviors
    GameElement.Scene
    GameElement.Enabled
    GameElement.Propertys
    GameElement.Children
    GameElement.Parent
    GameElement.UUID
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Genesis.Core.GameElements
    Assembly: Genesis.dll
    Syntax
    public class ParticleEmitter : GameElement

    Constructors

    ParticleEmitter(string, Vec3, Vec3, Vec3, Texture)

    Initializes a new instance of the ParticleEmitter class with specified parameters.

    Declaration
    public ParticleEmitter(string name, Vec3 location, Vec3 rotation, Vec3 size, Texture mask)
    Parameters
    Type Name Description
    string name

    The name of the particle emitter.

    Vec3 location

    The initial location of the particle emitter.

    Vec3 rotation

    The initial rotation of the particle emitter.

    Vec3 size

    The initial size of the particle emitter.

    Texture mask

    Properties

    ParticleDeffinitions

    Gets or sets the list of particle definitions managed by the emitter.

    Declaration
    public List<ParticleDeffinition> ParticleDeffinitions { get; set; }
    Property Value
    Type Description
    List<ParticleDeffinition>

    ParticleDirection

    Gets or sets the primary direction of particle movement.

    Declaration
    public Vec3 ParticleDirection { get; set; }
    Property Value
    Type Description
    Vec3

    ParticleDirection2

    Gets or sets the secondary direction of particle movement.

    Declaration
    public Vec3 ParticleDirection2 { get; set; }
    Property Value
    Type Description
    Vec3

    ParticleDistance

    Gets or sets the maximum distance a particle can travel before being reset.

    Declaration
    public float ParticleDistance { get; set; }
    Property Value
    Type Description
    float

    ParticleMask

    Gets or sets the mask for the particles

    Declaration
    public Texture ParticleMask { get; set; }
    Property Value
    Type Description
    Texture

    Texture

    Gets or sets the texture used for the particles.

    Declaration
    public Texture Texture { get; set; }
    Property Value
    Type Description
    Texture

    Methods

    CreateParticles(int, Vec3)

    Generates particles with default settings, using the provided particle size.

    Declaration
    public void CreateParticles(int numPartikel, Vec3 particleSize)
    Parameters
    Type Name Description
    int numPartikel

    The number of particles to create.

    Vec3 particleSize

    The size of each particle.

    CreateParticles(int, Vec3, Vec3, Vec3, Vec3, int, int, float, float, float, float, Color, Color)

    Declaration
    public void CreateParticles(int numPartikel, Vec3 particleSizeMax, Vec3 particleSizeMin, Vec3 minRotation, Vec3 maxRotation, int minDelay, int maxDelay, float minSpeed, float maxSpeed, float minRotationSpeed, float maxRotationSpeed, Color colorA, Color colorB)
    Parameters
    Type Name Description
    int numPartikel
    Vec3 particleSizeMax
    Vec3 particleSizeMin
    Vec3 minRotation
    Vec3 maxRotation
    int minDelay
    int maxDelay
    float minSpeed
    float maxSpeed
    float minRotationSpeed
    float maxRotationSpeed
    Color colorA
    Color colorB

    CreateParticles(int, Vec3, Vec3, Vec3, int, int, float, float, float, float, Color, Color)

    Generates particles with custom settings, including particle size, rotation, delay, speed, and rotation speed.

    Declaration
    public void CreateParticles(int numPartikel, Vec3 particleSize, Vec3 minRotation, Vec3 maxRotation, int minDelay, int maxDelay, float minSpeed, float maxSpeed, float minRotationSpeed, float maxRotationSpeed, Color colorA, Color colorB)
    Parameters
    Type Name Description
    int numPartikel

    The number of particles to create.

    Vec3 particleSize

    The size of each particle.

    Vec3 minRotation

    The minimum rotation of particles.

    Vec3 maxRotation

    The maximum rotation of particles.

    int minDelay

    The minimum delay before particles become active.

    int maxDelay

    The maximum delay before particles become active.

    float minSpeed

    The minimum speed of particles.

    float maxSpeed

    The maximum speed of particles.

    float minRotationSpeed

    The minimum rotation speed of particles.

    float maxRotationSpeed

    The maximum rotation speed of particles.

    Color colorA

    The minimum color of particles.

    Color colorB

    The maximum color of particles.

    CreateParticles(int, Vec3, Color, Color)

    Generates particles with default settings, using the provided particle size and specified colors.

    Declaration
    public void CreateParticles(int numPartikel, Vec3 particleSize, Color colorA, Color colorB)
    Parameters
    Type Name Description
    int numPartikel

    The number of particles to create.

    Vec3 particleSize

    The size of each particle.

    Color colorA

    The minimum color of particles.

    Color colorB

    The maximum color of particles.

    GetParticleBuffers()

    Generates the buffer for the particles, including vertices, colors, texture coordinates, positions, rotations, and scales.

    Declaration
    public ParticleBuffers GetParticleBuffers()
    Returns
    Type Description
    ParticleBuffers

    Particle buffers containing vertices, colors, texture coordinates, positions, rotations, and scales.

    OnDestroy(Game)

    Called when the particle emitter is being destroyed in the game.

    Declaration
    public override void OnDestroy(Game game)
    Parameters
    Type Name Description
    Game game

    The game instance.

    Overrides
    GameElement.OnDestroy(Game)

    OnRender(Game, IRenderDevice)

    Renders the particle emitter using the specified render device.

    Declaration
    public override void OnRender(Game game, IRenderDevice renderDevice)
    Parameters
    Type Name Description
    Game game

    The game instance.

    IRenderDevice renderDevice

    The render device used for rendering.

    Overrides
    GameElement.OnRender(Game, IRenderDevice)

    ProcessParticle(ParticleDeffinition, long)

    Processes the movement and rotation of a particle based on its current state.

    Declaration
    public void ProcessParticle(ParticleDeffinition particle, long now)
    Parameters
    Type Name Description
    ParticleDeffinition particle

    The particle definition to be processed.

    long now

    The current time in milliseconds.

    In this article
    Back to top Generated by DocFX