Class PropMapObjectLoader

All Implemented Interfaces:

public class PropMapObjectLoader
extends MapObjectLoader
  • Constructor Details

  • Method Details

    • registerCustomPropType

      public static <T extends Prop> void registerCustomPropType​(java.lang.Class<T> propType)

      Registers a custom Prop implementation that can be automatically provided by this MapObjectLoader.

      This should only be used if the particular implementation doesn't require any additional map object properties to be initialized.

      Make sure that the implementation has the following present:
      1. An AnimationInfo annotation with one or more sprite prefixes defined
      2. Either an empty constructor or a constructor that takes in the sprite prefix from the loader.

      The latter is particularly useful for classes that can have different sprite sheets, i.e. share the same logic but might have a different appearance.

      Type Parameters:
      T - The type of the custom creature implementation.
      propType - The class of the custom Prop implementation.
    • load

      public java.util.Collection<IEntity> load​(Environment environment, IMapObject mapObject)
    • createNewProp

      protected Prop createNewProp​(IMapObject mapObject, java.lang.String spriteSheet)