Class ParticleEmitterComponent.Particle

java.lang.Object
technology.sola.engine.physics.component.ParticleEmitterComponent.Particle
Enclosing class:
ParticleEmitterComponent

public static class ParticleEmitterComponent.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
    • getPosition

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

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