Package model
Class TeleporterTroop
java.lang.Object
model.Troop
model.TeleporterTroop
public class TeleporterTroop extends Troop
TeleporterTroop is a special troop that can place teleporters on the map.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description TeleporterTroop() -
Method Summary
Modifier and Type Method Description EnterRegioncreateTeleporterEnter()createTeleporterEnter creates a new EnterRegion one tile ahead of the current position.ExitRegioncreateTeleporterExit()createTeleporterExit creates a new ExitRegion one tile ahead of the current position.voidsetCurrentRegion(Region r)Methods inherited from class model.Troop
getCurrentRegion, getHealth, getName, getPosition, getPrice, getSpeed, getTroopImage, inGoal, isFlying, move, setHealth, setInGoal, setPosition, setTroopImage, subtractHealth
-
Constructor Details
-
TeleporterTroop
public TeleporterTroop()
-
-
Method Details
-
setCurrentRegion
- Overrides:
setCurrentRegionin classTroop
-
createTeleporterEnter
createTeleporterEnter creates a new EnterRegion one tile ahead of the current position.- Returns:
- the newly created teleporter enter.
-
createTeleporterExit
createTeleporterExit creates a new ExitRegion one tile ahead of the current position.- Returns:
- the newly created teleporter enter.
-