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, elapsedTIme
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
ConstructorDescriptionSpeedBoost
(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 void
Applies the effect to the player.void
render
(com.badlogic.gdx.graphics.g2d.SpriteBatch spriteBatch) Renders the appearance of the game objectvoid
Restores 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, update
Methods 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:TimedCollectable
Applies the effect to the player. The effect is restored byTimedCollectable.restore(Player)
- Specified by:
apply
in classTimedCollectable
- Parameters:
player
- thePlayer
to apply the effect to.
-
restore
Description copied from class:TimedCollectable
Restores the changes made byTimedCollectable.apply(de.tum.cit.ase.maze.objects.dynamic.Player)
- Specified by:
restore
in classTimedCollectable
-
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
-