Class FreezeTrap
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.FreezeTrap
- All Implemented Interfaces:
Saveable<FreezeTrapMemento>
Trap that applies freeze effect to slow player movement.
-
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(FreezeTrapMemento 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
-
FreezeTrap
public FreezeTrap(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<FreezeTrapMemento>- 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<FreezeTrapMemento>- Parameters:
memento- The memento containing the state to restore
-