Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: ObjectComponent

[19:7] extends: Component

Wraps an AussomObjectComponent (concrete subclass of FXGL's abstract ObjectComponent). Exposes an arbitrary value backed by a JavaFX ObjectProperty plus standard Component lifecycle methods inherited from Component. The initial value is unwrapped from an AussomJavaObject if one is supplied; otherwise the raw value is stored. Attach to an Entity via entity.addComponent.

Methods

  • ObjectComponent (InitialValue = null)

    Creates a new ObjectComponent with the given initial value.

    • @p InitialValue is any value (often an AussomJavaObject).
  • adopt (object Ajo)

    Wraps an existing AussomObjectComponent AussomJavaObject.

  • getValue ()

    Returns the current value.

  • setValue (Val)

    Sets the value.

    • @p Val is the new value (often an AussomJavaObject).
    • @r this object
  • valueProperty ()

    Returns the underlying ObjectProperty for binding.