Class Portal
java.lang.Object
dev.mikita.darkforest.core.sprite.ASprite
dev.mikita.darkforest.model.entity.Portal
The type Portal.
A class that represents a specific portal and methods for managing it.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionPortal
(int portalId, int locationId, int playerX, int playerY) Instantiates a new Portal. -
Method Summary
Modifier and TypeMethodDescriptionvoid
activate()
Activate.int
Gets location id.int
Gets portal id.Methods inherited from class dev.mikita.darkforest.core.sprite.ASprite
getCollisionBox, getHeight, getImage, getPositionX, getPositionY, getWidth, intersectsCollisionBox, render, setImage, setImage, setPosition, update
-
Constructor Details
-
Portal
public Portal(int portalId, int locationId, int playerX, int playerY) Instantiates a new Portal.- Parameters:
portalId
- The portal id.locationId
- The location id.playerX
- The player x.playerY
- The player y.
-
-
Method Details
-
activate
public void activate()Activate.The method that activates the portal. Changes location.
-
getPortalId
public int getPortalId()Gets portal id.- Returns:
- The portal id.
-
getLocationId
public int getLocationId()Gets location id.- Returns:
- The location id.
-