Class GarlicTrap
java.lang.Object
de.tum.cit.fop.maze.objects.GameObject
de.tum.cit.fop.maze.objects.traps.Trap
de.tum.cit.fop.maze.objects.traps.GarlicTrap
- All Implemented Interfaces:
Saveable<GarlicTrapMemento>
Trap that applies poison effect to damage player over time.
-
Field Summary
Fields inherited from class de.tum.cit.fop.maze.objects.GameObject
bounds, currentAnimationType, drawable, position, sizes, speed, speedMultiplier, spriteSizes, texture, velocity -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a memento capturing the current state of this object.voidloadFromMemento(GarlicTrapMemento memento) Restores the object's state from a memento.protected voidMethods inherited from class de.tum.cit.fop.maze.objects.traps.Trap
animate, checkPlayerCollisionMethods inherited from class de.tum.cit.fop.maze.objects.GameObject
changeAnimation, entitiesOverlap, getBounds, getDrawable, getSize, getSpeed, getVelocity, increaseSpeed, move, multiplySpeed, nextPosition, setAnimationTime, updateAnimation
-
Constructor Details
-
GarlicTrap
public GarlicTrap(com.badlogic.gdx.math.Vector2 startpos)
-
-
Method Details
-
onEnter
-
getMemento
Description copied from interface:SaveableCreates a memento capturing the current state of this object.- Specified by:
getMementoin interfaceSaveable<GarlicTrapMemento>- Returns:
- A memento containing the object's state
-
loadFromMemento
Description copied from interface:SaveableRestores the object's state from a memento.- Specified by:
loadFromMementoin interfaceSaveable<GarlicTrapMemento>- Parameters:
memento- The memento containing the state to restore
-