Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: IntervalSwitchComponent

[19:7] extends: BooleanComponent

Wraps FXGL's IntervalSwitchComponent (com.almasb.fxgl.dsl.components.IntervalSwitchComponent), a BooleanComponent that flips its value every interval seconds. Useful for blinkers and timed toggles. Must be constructed inside a running FXGL game (uses FXGL.newLocalTimer()).

Methods

  • IntervalSwitchComponent (bool InitValue = false, double IntervalSeconds = 0.0)

    Creates a new IntervalSwitchComponent.

    • @p InitValue is the starting boolean value.
    • @p IntervalSeconds is the toggle interval in seconds.
  • adopt (object Ajo)

    Wraps an existing IntervalSwitchComponent AussomJavaObject.

  • getValue ()

  • setValue (bool V)

  • valueProperty ()

    Returns the underlying BooleanProperty.

  • getInterval ()

    Returns the current interval Duration AJO.

  • setInterval (double Seconds)

    Sets the toggle interval.

    • @p Seconds is the interval in seconds.
    • @r this object