Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: SerializableGraph

[15:7] extends: FxObj

Wraps FXGL's SerializableGraph (com.almasb.fxgl.cutscene.dialogue.SerializableGraph), the Jackson-friendly form of a DialogueGraph. Holds the unique-id counter, start-node id, text-and-branch node map, function-node map, edge list, version int, and a uiMetadata map of SerializablePoint2D positions.

Methods

  • SerializableGraph (int UniqueID = -1, int StartNodeID = 0, object TextNodesMap = null, object FunctionNodesMap = null, object EdgesList = null)

    Creates a new SerializableGraph. Pass UniqueID < 0 to construct an empty wrapper for adopt.

    • @p UniqueID is the node-id counter snapshot.
    • @p StartNodeID is the start-node id.
    • @p TextNodesMap is an AussomJavaObject around a Map<Int, SerializableTextNode>.
    • @p FunctionNodesMap is an AussomJavaObject around a Map<Int, SerializableFunctionNode>.
    • @p EdgesList is an AussomJavaObject around a List.
  • adopt (object Ajo)

    Wraps an existing SerializableGraph AussomJavaObject.

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

    Returns the unique-id counter. @r An int.

  • getStartNodeID ()

    Returns the start-node id. @r An int.

  • getTextNodes ()

    Returns the text-and-branch nodes Map<Int, SerializableTextNode>.

    • @r An AussomJavaObject around a Map.
  • getFunctionNodes ()

    Returns the function nodes Map<Int, SerializableFunctionNode>.

    • @r An AussomJavaObject around a Map.
  • getEdges ()

    Returns the edges List.

    • @r An AussomJavaObject around a List.
  • getVersion ()

    Returns the serialized graph version int.

  • setVersion (int Version)

    Sets the serialized graph version int.

    • @p Version is the new version number.
    • @r this object
  • getUiMetadata ()

    Returns the uiMetadata map of node-id to SerializablePoint2D used by editor tooling.

    • @r An AussomJavaObject around a HashMap.