Class BaseEnemyConfig
java.lang.Object
com.csse3200.game.entities.configs.BaseEntityConfig
com.csse3200.game.entities.configs.BaseEnemyConfig
Defines all enemy configs to be loaded by the Enemy Factory.
 Variables:
      idCounter - counter for the unique id of the enemy
      speed - factor of how fast the enemy moves
      fullHealth - the full health of the enemy
      health - the current health of the enemy
      id - unique identifier for the enemy
      drops - the items that the enemy drops when it dies
      views - the different images of enemy over different states
      state - the current state of the enemy (full health, half health, low health)
      baseAttack - the base damage of an enemy's attack
 Functions
      takeDamage - process the damge taken by the enemy
      attack - process an attack
      die - process of death (remove from game and drop resources)
- 
Field SummaryFieldsFields inherited from class com.csse3200.game.entities.configs.BaseEntityConfigbaseAttack, health
- 
Constructor SummaryConstructorsConstructorDescriptionBaseEnemyConfig(int speed, int health, ArrayList<Currency> drops, ArrayList<Melee> closeRangeAbilities, ArrayList<Weapon> longRangeAbilities, int baseAttack) Creates a new enemy config with the given values.BaseEnemyConfig(ArrayList<Currency> drops, ArrayList<Melee> closeRangeAbilities, ArrayList<Weapon> longRangeAbilities) Creates a new enemy config with default values.
- 
Method SummaryModifier and TypeMethodDescriptionintGenerate a unique id based on the previous enemy idreturn the close range (Melee) attacks of the enemygetDrops()return the currency the enemy will drop when it diesintgetId()return the unique id of the enemyreturn the long range (Projectile) attacks of the enemytoString()
- 
Field Details- 
speedpublic final int speed
- 
fullHeathpublic final int fullHeath
 
- 
- 
Constructor Details- 
BaseEnemyConfigpublic BaseEnemyConfig(ArrayList<Currency> drops, ArrayList<Melee> closeRangeAbilities, ArrayList<Weapon> longRangeAbilities) Creates a new enemy config with default values.
- 
BaseEnemyConfigpublic BaseEnemyConfig(int speed, int health, ArrayList<Currency> drops, ArrayList<Melee> closeRangeAbilities, ArrayList<Weapon> longRangeAbilities, int baseAttack) Creates a new enemy config with the given values.- Parameters:
- speed- the speed of the enemy
- health- the full of the enemy
- drops- the drops of the enemy
- baseAttack- the base damage to the target
 
 
- 
- 
Method Details- 
generateIdpublic int generateId()Generate a unique id based on the previous enemy id
- 
getIdpublic int getId()return the unique id of the enemy
- 
getDropsreturn the currency the enemy will drop when it dies
- 
getCloseRangeAbilitiesreturn the close range (Melee) attacks of the enemy
- 
getLongRangeAbilitiesreturn the long range (Projectile) attacks of the enemy
- 
toString
 
-