Repository navigation
Enemies
Enemies are hostile NPCs the player will encounter during each level. These enemies will deal damage to the player through either melee or ranged attacks. It uses an EnemyFactory class to create each enemy type, and enemies' stats are modified through the config value.
The main class responsible for creating enemies
EnemiesConfig contains config for all enemy types currently in the game, and EnemyConfig contain base values to modify an enemy's behaviour
Component that creates the projectile
Projectile Factory for an enemy's ranged attack
Allows the enemy to perform a ranged attack by firing a projectile at the player
Allows the enemy to perform a melee attack with a given delay (See Enemy Delayed Attack)
Handles Enemy Death when HP reaches 0.
Uses a listener on CombatStatsComponent setHealth() to call scheduleForDisposal() when health is set to 0.
Handles item dropping at arbitrary health. Specific health-item drops can be customised as a list within the Enemies.json config file.
Uses a listener on CombatStatsComponent setHealth() to loop through the health-item drops, checks if any health thresholds have been crossed, creates and registers items as necessary.
Renders a health bar for a given enemy.
Uses a listener on CombatStatsComponent setHealth() to update a Pixmap / SpriteBatch illustration of a simple thin flat bar filled proportionately to the given health.
TBD
- JUnit Test DelayedAttackTaskTest.java
- JUnit Test EnemyDeathComponentTest.java
- Visual test to ensure that the enemy behaves as written in configs; archer enemy fires projectiles and takes damage when attacked by player
Entities and Components
Input Handling
Arrow Selection Wheel Arrow Selection Wheel — Sprint 3