Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: BooleanComponent

[17:7] extends: Component

Wraps an AussomBooleanComponent (concrete subclass of FXGL's abstract BooleanComponent). Exposes a boolean value backed by a JavaFX BooleanProperty plus standard Component lifecycle methods inherited from Component. Attach to an Entity via entity.addComponent.

Methods

  • BooleanComponent (bool InitialValue = false)

    Creates a new BooleanComponent with the given initial value.

    • @p InitialValue is the starting bool (defaults to false).
  • adopt (object Ajo)

    Wraps an existing AussomBooleanComponent AussomJavaObject.

  • getValue ()

    Returns the current bool value.

  • setValue (bool Val)

    Sets the bool value.

    • @p Val is the new bool.
    • @r this object
  • valueProperty ()

    Returns the underlying BooleanProperty for binding.

  • write (object BundleObj)

    Persists this component's value into a Bundle.

  • read (object BundleObj)

    Restores this component's value from a Bundle.