Class EnemyEntity<S extends Observable<S>>

Direct Known Subclasses:
GummyGuard

public abstract class EnemyEntity<S extends Observable<S>> extends Entity<S>
Base class for enemies, has a speed property so app knows how often to ping the enemy.
Author:
Abdul
  • Field Details

  • Constructor Details

    • EnemyEntity

      public EnemyEntity(Maze.Point entityPos, Entity.Direction facingDir, int speed)
      Default constructor, sets the position, direction, and speed of the enemy.
      Parameters:
      entityPos - Point to set the position field to.
      facingDir - Direction to set the direction field to.
      speed - How often the monster gets pinged.
  • Method Details

    • getSpeed

      public final int getSpeed()
      Returns:
      The speed of the enemy.