Class HealthCollectable
java.lang.Object
de.tum.cit.ase.maze.objects.GameElement
de.tum.cit.ase.maze.objects.still.collectable.Collectable
de.tum.cit.ase.maze.objects.still.collectable.HealthCollectable
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
Collectable
that restores the health of the player by HEALTH_TO_RESTORE
-
Field Summary
Fields inherited from class de.tum.cit.ase.maze.objects.still.collectable.Collectable
active, frameHeight, frameWidth, light, rayHandler, removable, textureAtlas, textureRegion, ZOOM
Fields inherited from class de.tum.cit.ase.maze.objects.GameElement
body, texture, world
-
Constructor Summary
ConstructorDescriptionHealthCollectable
(com.badlogic.gdx.math.Vector2 position, com.badlogic.gdx.physics.box2d.World world, box2dLight.RayHandler rayHandler, com.badlogic.gdx.graphics.g2d.TextureAtlas textureAtlas) -
Method Summary
Methods inherited from class de.tum.cit.ase.maze.objects.still.collectable.Collectable
createBoy, isActive, isRemovable, remove
-
Constructor Details
-
HealthCollectable
public HealthCollectable(com.badlogic.gdx.math.Vector2 position, com.badlogic.gdx.physics.box2d.World world, box2dLight.RayHandler rayHandler, com.badlogic.gdx.graphics.g2d.TextureAtlas textureAtlas)
-
-
Method Details
-
collect
Description copied from class:Collectable
Called when aPlayer
is collects it.- Specified by:
collect
in classCollectable
- Parameters:
player
- thePlayer
that collected it
-
render
public void render(com.badlogic.gdx.graphics.g2d.SpriteBatch spriteBatch) Description copied from class:GameElement
Renders the appearance of the game object- Specified by:
render
in classGameElement
-
update
public void update(float deltaTime) Description copied from class:GameElement
Updates the Object- Overrides:
update
in classCollectable
- Parameters:
deltaTime
- Time since last frame.
-
dispose
public void dispose()- Specified by:
dispose
in interfacecom.badlogic.gdx.utils.Disposable
- Overrides:
dispose
in classCollectable
-