Class SpeedBoost
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.TimedCollectable
de.tum.cit.ase.maze.objects.still.collectable.SpeedBoost
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
Boosts the speed of the player by
speedBoost-
Field Summary
Fields inherited from class de.tum.cit.ase.maze.objects.still.collectable.TimedCollectable
duration, elapsedTImeFields 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
ConstructorsConstructorDescriptionSpeedBoost(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
Modifier and TypeMethodDescriptionprotected voidApplies the effect to the player.voidrender(com.badlogic.gdx.graphics.g2d.SpriteBatch spriteBatch) Renders the appearance of the game objectvoidRestores the changes made byTimedCollectable.apply(de.tum.cit.ase.maze.objects.dynamic.Player)Methods inherited from class de.tum.cit.ase.maze.objects.still.collectable.TimedCollectable
collect, dispose, equals, getDurationAndElapsed, hashCode, remove, toString, updateMethods inherited from class de.tum.cit.ase.maze.objects.still.collectable.Collectable
createBoy, isActive, isRemovable
-
Constructor Details
-
SpeedBoost
public SpeedBoost(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
-
apply
Description copied from class:TimedCollectableApplies the effect to the player. The effect is restored byTimedCollectable.restore(Player)- Specified by:
applyin classTimedCollectable- Parameters:
player- thePlayerto apply the effect to.
-
restore
Description copied from class:TimedCollectableRestores the changes made byTimedCollectable.apply(de.tum.cit.ase.maze.objects.dynamic.Player)- Specified by:
restorein classTimedCollectable
-
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
-