Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: CellGenerator

[18:14] static extends: object

Helper for FXGL's CellGenerator functional interface (com.almasb.fxgl.core.collection.grid.CellGenerator). Used by Grid / AStarGrid constructors to populate cells based on (x, y) coordinates. Build a generator from an Aussom callback (x, y) -> Cell via make(callback), then pass the returned AJO into Grid / AStarGrid construction (currently exposed only via the helper Java factories).

Methods

  • make (callback Cb)

    Wraps an Aussom callback (x, y) -> Cell as a Java BiFunction<Integer, Integer, T> matching FXGL's CellGenerator contract.

    • @p Cb is a callback (int x, int y) -> Cell.
    • @r An AussomJavaObject around the BiFunction.