Class Exit

java.lang.Object
de.tum.cit.ase.maze.objects.GameElement
de.tum.cit.ase.maze.objects.still.Exit
All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable

public class Exit extends GameElement
Defines the exit of the Game. Cant be passed BUT can end the game with a victory if the player Requests an opening and all steps to win are fulfilled like having all keys.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    boolean
     

    Fields inherited from class de.tum.cit.ase.maze.objects.GameElement

    body, texture, world
  • Constructor Summary

    Constructors
    Constructor
    Description
    Exit(com.badlogic.gdx.physics.box2d.World world, com.badlogic.gdx.math.Vector2 position, GameScreen game)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Disposes the Texture;
    void
    render(com.badlogic.gdx.graphics.g2d.SpriteBatch spriteBatch)
    Renders the Exit
    boolean
    Request opening of the exit.
    void
    update(float deltaTime)
    Updates the Object

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • open

      public boolean open
  • Constructor Details

    • Exit

      public Exit(com.badlogic.gdx.physics.box2d.World world, com.badlogic.gdx.math.Vector2 position, GameScreen game)
  • Method Details

    • render

      public void render(com.badlogic.gdx.graphics.g2d.SpriteBatch spriteBatch)
      Renders the Exit
      Specified by:
      render in class GameElement
    • update

      public void update(float deltaTime)
      Description copied from class: GameElement
      Updates the Object
      Specified by:
      update in class GameElement
      Parameters:
      deltaTime - Time since last frame.
    • requestOpening

      public boolean requestOpening(Player player)
      Request opening of the exit. Opens the exit if the Player is eligible and marks Player as finished respectively.
      Parameters:
      player - Player that "requests" opening.
      Returns:
      true if opening was granted
    • dispose

      public void dispose()
      Disposes the Texture;