Class PhysicalWeaponStatsComponent
java.lang.Object
com.deco2800.game.components.Component
com.deco2800.game.components.combatitemscomponents.WeaponStatsComponent
com.deco2800.game.components.combatitemscomponents.PhysicalWeaponStatsComponent
Component used to store information and methods related to combat for melee weapons.
- 
Field Summary
Fields inherited from class com.deco2800.game.components.combatitemscomponents.WeaponStatsComponent
coolDown, damage, materials - 
Constructor Summary
ConstructorsConstructorDescriptionPhysicalWeaponStatsComponent(double damage, double coolDown, Map<Materials, Integer> materials, double weight, String description)  - 
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if two melee weapons are the samedoubleReturns the weight of the weaponvoidsetWeight(double weight) Sets the weight of the weaponsMethods inherited from class com.deco2800.game.components.combatitemscomponents.WeaponStatsComponent
getCoolDown, getDamage, getDescription, getMaterials, setCoolDown, setDamage, setDescription, setMaterialsMethods inherited from class com.deco2800.game.components.Component
create, dispose, earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update 
- 
Constructor Details
- 
PhysicalWeaponStatsComponent
public PhysicalWeaponStatsComponent(double damage, double coolDown, Map<Materials, Integer> materials, double weight, String description) - Parameters:
 damage- damage of the melee weaponcoolDown- duration before the next attack instance can be calledmaterials- materials needed to craft the weaponweight- weight of the weapon (affects player's movement speed)description- description of the weapon (used to target weapon animations more effectively)
 
 - 
 - 
Method Details
- 
getWeight
public double getWeight()Returns the weight of the weapon- Returns:
 - weight of the weapon
 
 - 
setWeight
public void setWeight(double weight) Sets the weight of the weapons- Parameters:
 weight- set the weight of the weapon
 - 
equalsOther
Checks if two melee weapons are the same- Parameters:
 other- other melee weapon- Returns:
 - true if they have the same stat, false otherwise //implemented by peter from team 02
 
 
 -