Class EndTrigger

All Implemented Interfaces:
org.fuchss.configuration.Configurable, Collidable

@SetterInfo(res="conf/endtrigger") public final class EndTrigger extends InanimateTrigger implements org.fuchss.configuration.Configurable
This class represents an EndPortal.
  • Method Details

    • logicLoop

      public void logicLoop()
      Description copied from class: GameElement

      Template method that will be called periodically after being added to a IScene.

      Should be overwritten in sub classes for implementing custom logic, physics emulation, time-based actions, ...

      Overrides:
      logicLoop in class GameElement
    • internalRender

      public void internalRender(GameGrid f)
      Description copied from class: GameElement

      Template method that will be called periodically after being added to a IScene. Must be as performant as possible to keep the FPS low, since it will be called in every render-loop.

      Should be overwritten in sub classes for custom visualization using the GameGrid.

      Overrides:
      internalRender in class InanimateTrigger
      Parameters:
      f - the GameGrid that represents the games field and supplies primitive drawing operations.
    • perform

      public void perform()
      Description copied from class: InanimateTrigger
      Perform trigger-action.
      Overrides:
      perform in class InanimateTrigger
    • create

      public EndTrigger 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.
    • getPrototype

      public static Inanimate getPrototype()
      Get the prototype of the EndTrigger.
      Returns:
      the prototype
    • destroy

      public void destroy()
      Description copied from class: GameElement

      Method that, upon call, signals that this GameElement is supposed to be deleted in the next logicLoop of the IScene.

      Note: The underlying GameElement might go through several collisions and be rendered multiple times before it is actually deleted.

      Overrides:
      destroy in class GameElement
    • getZHint

      public Integer getZHint()
      Description copied from class: GameElement
      Get a hint (for Team.Range.normalize(int) for positioning this GameElement via GameElement.getZ().
      Overrides:
      getZHint in class GameElement
      Returns:
      null if no hint, otherwise the expected position