Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: DataFile

[14:7] extends: FxObj

Wraps FXGL's DataFile (com.almasb.fxgl.profile.DataFile), the top-level container for a single save's data. A DataFile holds a map of Bundle by name; each subsystem owns one Bundle and reads/writes its values there during save/load.

Methods

  • DataFile ()

    Creates a new empty DataFile.

  • adopt (object Ajo)

    Wraps an existing DataFile AussomJavaObject.

    • @p Ajo is an AussomJavaObject around a DataFile.
    • @r A new wrapper.
  • putBundle (object BundleObj)

    Stores the given Bundle in the data file. Throws if a bundle with the same name already exists.

    • @p BundleObj is a Bundle wrapper.
    • @r this object
  • getBundle (string Name)

    Returns the Bundle with the given name, wrapped as a Bundle wrapper. Throws if not present.

    • @p Name is the bundle name.
    • @r A Bundle wrapper.