java.lang.Object
technology.sola.engine.physics.component.particle.Particle

@NullMarked public class Particle extends Object
Particle contains properties that represent a particle that has been emitted from a ParticleEmitterComponent.
  • Method Details

    • update

      public void update(float delta)
      Updates the position and lifespan of a particle based on the elapsed delta.
      Parameters:
      delta - the elapsed delta time
    • isAlive

      public boolean isAlive()
      Returns:
      true if the particle has any remaining lifespan
    • getColor

      public Color getColor()
      Returns:
      the current Color of the particle based on its origin base color and remaining lifespan
    • getShape

      public ParticleShape getShape()
      Returns:
      the ParticleShape of the particle
    • getPosition

      public Vector2D getPosition()
      Returns:
      the current position of the particle
    • getSize

      public float getSize()
      Returns:
      the size of the particle