Class Portal

java.lang.Object
dev.mikita.darkforest.core.sprite.ASprite
dev.mikita.darkforest.model.entity.Portal

public class Portal extends ASprite
The type Portal.

A class that represents a specific portal and methods for managing it.

  • 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.