Interface Enemies

All Known Implementing Classes:
Bouncer, Enemy, Junkie, Tourist

public interface Enemies
Interface defining enemy behavior patterns like fleeing, patrolling, and chasing.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Updates enemy animation based on movement direction.
    void
    chase(float deltaTime, com.badlogic.gdx.math.Vector2 playerPosition, GameField gameField)
    Makes the enemy chase the player.
    void
    Makes the enemy flee in a random direction.
    void
    patrol(float delta)
    Makes the enemy patrol around its area.
  • Method Details

    • flee

      void flee()
      Makes the enemy flee in a random direction.
    • patrol

      void patrol(float delta)
      Makes the enemy patrol around its area.
      Parameters:
      delta - Time since last update
    • chase

      void chase(float deltaTime, com.badlogic.gdx.math.Vector2 playerPosition, GameField gameField)
      Makes the enemy chase the player.
      Parameters:
      deltaTime - Time since last update
      playerPosition - Player's position
      gameField - Game field for navigation
    • AnimationDirection

      void AnimationDirection()
      Updates enemy animation based on movement direction.