public class Hearing extends Sensor
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_OUTPUT_AMOUNT
Default output amount.
|
static java.lang.String |
DEFAULT_PHRASE
Default phrase.
|
Constructor and Description |
---|
Hearing(OdorWorldEntity parent,
java.lang.String phrase,
double outputAmount)
Construct the hearing sensor.
|
Modifier and Type | Method and Description |
---|---|
double |
getOutputAmount() |
java.lang.String |
getPhrase() |
java.lang.String |
getTypeDescription()
Short description of the sensor type.
|
double |
getValue() |
boolean |
isActivated() |
void |
setOutputAmount(double amount) |
void |
setPhrase(java.lang.String phrase) |
void |
update()
Update the sensor.
|
public static final java.lang.String DEFAULT_PHRASE
public static final double DEFAULT_OUTPUT_AMOUNT
public Hearing(OdorWorldEntity parent, java.lang.String phrase, double outputAmount)
parent
- parent entityphrase
- the phrase associated with this sensoroutputAmount
- the amount to output when this sensor is activatedpublic void update()
Sensor
public java.lang.String getPhrase()
public void setPhrase(java.lang.String phrase)
phrase
- the phrase to setpublic boolean isActivated()
public double getOutputAmount()
public void setOutputAmount(double amount)
amount
- the amount to setpublic double getValue()
public java.lang.String getTypeDescription()
Sensor
getTypeDescription
in class Sensor