Package de.tum.cit.ase.maze.objects
Class GameElement
java.lang.Object
de.tum.cit.ase.maze.objects.GameElement
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
- Direct Known Subclasses:
Character
,Collectable
,Entry
,Exit
This class is the common superclass for all game objects
-
Field Details
-
world
protected com.badlogic.gdx.physics.box2d.World worldSaves the box2d world -
body
protected com.badlogic.gdx.physics.box2d.Body bodyRepresents the physics body -
texture
protected com.badlogic.gdx.graphics.Texture textureDefines the texture of the object
-
-
Constructor Details
-
GameElement
public GameElement()
-
-
Method Details
-
render
public abstract void render(com.badlogic.gdx.graphics.g2d.SpriteBatch spriteBatch) Renders the appearance of the game object- Parameters:
spriteBatch
-
-
update
public abstract void update(float deltaTime) Updates the Object- Parameters:
deltaTime
- Time since last frame.
-