Enum Layer.Kind

java.lang.Object
java.lang.Enum<Layer.Kind>
com.codename1.gaming.level.Layer.Kind
All Implemented Interfaces:
Comparable<Layer.Kind>
Enclosing class:
Layer

public static enum Layer.Kind extends Enum<Layer.Kind>
What a layer holds, which decides how its content is realized.
  • Enum Constant Details

    • TILE

      public static final Layer.Kind TILE
      A grid of tiles addressed by cell, each cell holding an asset id.
    • ENTITY

      public static final Layer.Kind ENTITY
      A group of freely placed 2D entities (sprites).
    • MODEL

      public static final Layer.Kind MODEL
      A group of freely placed 3D models.
  • Method Details

    • values

      public static Layer.Kind[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Layer.Kind valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • wireName

      public String wireName()
      The lowercase JSON token for this kind ("tile" / "entity" / "model").
    • fromWire

      public static Layer.Kind fromWire(String name)
      The kind for a JSON token (case-insensitive); defaults to #ENTITY.