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, ZOOMFields inherited from class de.tum.cit.ase.maze.objects.GameElement
body, texture, world -
Constructor Summary
ConstructorsConstructorDescriptionHealthCollectable(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:CollectableCalled when aPlayeris collects it.- Specified by:
collectin classCollectable- Parameters:
player- thePlayerthat collected it
-
render
public void render(com.badlogic.gdx.graphics.g2d.SpriteBatch spriteBatch) Description copied from class:GameElementRenders the appearance of the game object- Specified by:
renderin classGameElement
-
update
public void update(float deltaTime) Description copied from class:GameElementUpdates the Object- Overrides:
updatein classCollectable- Parameters:
deltaTime- Time since last frame.
-
dispose
public void dispose()- Specified by:
disposein interfacecom.badlogic.gdx.utils.Disposable- Overrides:
disposein classCollectable
-