Class AreaOfEffectStatsComponent
java.lang.Object
com.deco2800.game.components.Component
com.deco2800.game.components.combatitemscomponents.WeaponStatsComponent
com.deco2800.game.components.combatitemscomponents.AreaOfEffectStatsComponent
Component used to store information and methods related to combat for aoe weapons.
-
Field Summary
Fields inherited from class com.deco2800.game.components.combatitemscomponents.WeaponStatsComponent
coolDown, damage, materials
-
Constructor Summary
ConstructorsConstructorDescriptionAreaOfEffectStatsComponent
(double damage, double areaRange, double duration, double coolDown, Map<Materials, Integer> materials, String description) -
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns the radius the weapon can deal damage todouble
Returns thr duration the aoe is activatedvoid
setAreaRange
(double areaRange) Sets the radius the weapon can deal damage tovoid
setDuration
(double duration) Sets the duration the aoe weapon can be activated for at one attack instanceMethods inherited from class com.deco2800.game.components.combatitemscomponents.WeaponStatsComponent
getCoolDown, getDamage, getDescription, getMaterials, setCoolDown, setDamage, setDescription, setMaterials
Methods inherited from class com.deco2800.game.components.Component
create, dispose, earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
AreaOfEffectStatsComponent
public AreaOfEffectStatsComponent(double damage, double areaRange, double duration, double coolDown, Map<Materials, Integer> materials, String description) - Parameters:
damage
- damage of the weaponareaRange
- radius that the weapon can deal damage toduration
- how long the aoe is activatedcoolDown
- duration before the next attack instance can be called (should be > than duration)materials
- materials needed to craft the weapon
-
-
Method Details
-
getAreaRange
public double getAreaRange()Returns the radius the weapon can deal damage to- Returns:
- radius the weapon can deal damage to
-
getDuration
public double getDuration()Returns thr duration the aoe is activated- Returns:
- how long the aoe is activated
-
setAreaRange
public void setAreaRange(double areaRange) Sets the radius the weapon can deal damage to- Parameters:
areaRange
- radius that the weapon can deal damage to
-
setDuration
public void setDuration(double duration) Sets the duration the aoe weapon can be activated for at one attack instance- Parameters:
duration
- how long the aoe is activated
-