Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: FunctionNode

[19:7] extends: DialogueNode

Wraps FXGL's FunctionNode (com.almasb.fxgl.cutscene.dialogue.FunctionNode), a DialogueNode subclass whose text is interpreted as a function call (e.g. "give_item sword 1"). The call is dispatched by the active FunctionCallHandler. FunctionNode also carries a numTimes counter; once the function has been called numTimes times, it is skipped on subsequent visits. The default value of -1 means unlimited.

Methods

  • FunctionNode (Text = null)

    Creates a new FunctionNode with the given function-call text. Pass null for the adopt path.

    • @p Text is the function-call line.
  • adopt (object Ajo)

    Wraps an existing FunctionNode AussomJavaObject.

    • @p Ajo is an AussomJavaObject around a FunctionNode.
    • @r A new wrapper.
  • getNumTimes ()

    Returns the maximum number of times this function will be called before being skipped (-1 for unlimited).

    • @r An int.
  • numTimesProperty ()

    Returns the IntegerProperty backing numTimes for binding.

    • @r An AussomJavaObject around an IntegerProperty.
  • copy ()

    Returns a shallow copy of this FunctionNode.

    • @r A new FunctionNode wrapper.