Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: ParticleSystem

[13:7] extends: FxObj

Wraps FXGL's ParticleSystem, a standalone particle driver for use outside an entity (menus, intro screens, ambient UI effects). Add one or more ParticleEmitters at given positions; the system exposes a JavaFX Pane that hosts the rendered particles.

Methods

  • ParticleSystem ()

    Creates an empty ParticleSystem.

  • adopt (object Ajo)

    Wraps an existing ParticleSystem AussomJavaObject.

    • @p Ajo is an AussomJavaObject around a ParticleSystem.
    • @r A new wrapper.
  • addParticleEmitter (object EmitterObj, double X, double Y)

    Adds a ParticleEmitter at the given world position.

    • @p EmitterObj is a ParticleEmitter wrapper.
    • @p X is the X position.
    • @p Y is the Y position.
    • @r this object
  • removeParticleEmitter (object EmitterObj)

    Removes a previously added emitter.

    • @p EmitterObj is a ParticleEmitter wrapper.
    • @r this object
  • onUpdate (double Tpf)

    Drives the particle system one update tick.

    • @p Tpf is the elapsed time in seconds.
    • @r this object
  • getPane ()

    Returns the JavaFX Pane this system renders particles into.

    • @r An AussomJavaObject wrapping a javafx.scene.layout.Pane.