public class DamageType
extends java.lang.Object
Constructor and Description |
---|
DamageType(java.lang.String type,
Config config)
Construct a DamageType.
|
Modifier and Type | Method and Description |
---|---|
void |
addDamage(double d)
Add some damage.
|
double |
getDamage()
Get the current damage.
|
java.lang.String |
getType()
Get the type name.
|
double |
progress()
Compute damage progression for this type.
|
void |
setDamage(double d)
Set the current damage.
|
public DamageType(java.lang.String type, Config config)
type
- The name of this type.config
- The system configuration.public java.lang.String getType()
public double progress()
public double getDamage()
public void setDamage(double d)
d
- The current damage.public void addDamage(double d)
d
- The amount to add.