Class MaterialRegistry
java.lang.Object
com.codename1.gaming.level.MaterialRegistry
Process-wide registry of pluggable
Materials, keyed by id. Built-in surfaces (grass, road,
stone, sand, water, dirt) are registered on first use; applications add their own via
#register(Material). Unknown ids resolve to a neutral grey placeholder so a level that
references a not-yet-registered material still loads.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Collection<Material> all()All registered materials in registration order.static booleanstatic MaterialResolves a material by id, never null (returns a grey placeholder for unknown ids).ids()The ids of all registered materials, in registration order.static voidRegisters (or replaces) a material by its id.
-
Field Details
-
GRASS
-
ROAD
- See Also:
-
STONE
- See Also:
-
SAND
- See Also:
-
WATER
- See Also:
-
DIRT
- See Also:
-
-
Method Details
-
register
Registers (or replaces) a material by its id. -
get
-
contains
-
all
All registered materials in registration order. -
ids
-