Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: ExpireCleanComponent

[17:7] extends: Component

Wraps FXGL's ExpireCleanComponent (com.almasb.fxgl.dsl.components.ExpireCleanComponent). The entity is removed from the world after the configured duration (timer starts when the component's entity is attached to the world). Useful for short-lived effects and projectiles.

Methods

  • ExpireCleanComponent (double DurationSeconds = 1.0)

    Creates a new ExpireCleanComponent.

    • @p DurationSeconds is how long until the entity is removed.
  • adopt (object Ajo)

    Wraps an existing ExpireCleanComponent AussomJavaObject.

  • animateOpacity ()

    Enables diminishing opacity over time so the entity visibly fades out as it approaches expiry.

    • @r this object