Class DynamicInanimate

All Implemented Interfaces:
Collidable

public abstract class DynamicInanimate extends Inanimate
This class is the parent class of all dynamically loaded Inanimate.
  • Constructor Details

    • DynamicInanimate

      protected DynamicInanimate()
      Prototype Constructor.
    • DynamicInanimate

      protected DynamicInanimate(Vec pos, Vec size, RGBAColor color)
      Create an inanimate.
      Parameters:
      pos - the position
      size - the size
      color - the color
  • Method Details

    • getPrototypes

      public static Set<? extends GameElement> getPrototypes()
      Load all dynamic inanimate-prototypes.
      Returns:
      a set of dynamic inanimate-prototypes
      See Also:
    • create

      public abstract DynamicInanimate create(Vec startPos, String... options)
      Description copied from class: GameElement

      Stub Factory method that every GameElement must implement in order to being able to be instantiated dynamically by the level creation.

      A startPos must be supplied to position the new GameElement right.

      Also, an array of modifiers that the extending GameElement can define and use is supplied. These are used make level creation able to determine the GameElements behavior. Note: the modifiers are not checked in syntax, so it must be thoroughly checked.

      Overrides:
      create in class Inanimate
      Parameters:
      startPos - the initial position of the new GameElement.
      options - optional parameters that may determine additional behavior of the GameElement.
      Returns:
      the newly created GameElement.