Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: IntegerComponent

[17:7] extends: Component

Wraps an AussomIntegerComponent (concrete subclass of FXGL's abstract IntegerComponent). Exposes an int value backed by a JavaFX IntegerProperty plus standard Component lifecycle methods inherited from Component. Attach to an Entity via entity.addComponent.

Methods

  • IntegerComponent (int InitialValue = 0)

    Creates a new IntegerComponent with the given initial value.

    • @p InitialValue is the starting int (defaults to 0).
  • adopt (object Ajo)

    Wraps an existing AussomIntegerComponent AussomJavaObject.

  • getValue ()

    Returns the current int value.

  • setValue (int Val)

    Sets the int value.

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

    Returns the underlying IntegerProperty for binding.

  • write (object BundleObj)

    Persists this component's value into a Bundle.

  • read (object BundleObj)

    Restores this component's value from a Bundle.