Class DamageDeflect
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.DamageDeflect
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
Makes the
Player
invulnerable for the TimedCollectable.duration
this has an effect-
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
ConstructorDescriptionDamageDeflect
(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
-
DamageDeflect
public DamageDeflect(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
-
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
-
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
-