public class TileSensor extends Sensor
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_ACTIVATION
Default Activation Amount.
|
static int |
DEFAULT_HEIGHT
Default height.
|
static int |
DEFAULT_WIDTH
Default width.
|
static int |
DEFAULT_X
Default X coordinate of the upper left corner.
|
static int |
DEFAULT_Y
Default Y coordinate of the upper left corner.
|
Constructor and Description |
---|
TileSensor(OdorWorldEntity parent,
int x,
int y,
int width,
int height)
Construct a tile sensor.
|
Modifier and Type | Method and Description |
---|---|
double |
getActivationAmount() |
int |
getHeight() |
java.lang.String |
getTypeDescription()
Short description of the sensor type.
|
double |
getValue() |
int |
getWidth() |
int |
getX() |
int |
getY() |
void |
setActivationAmount(double amount) |
void |
setHeight(int height) |
void |
setValue(double value) |
void |
setWidth(int width) |
void |
setX(int x) |
void |
setY(int y) |
void |
update()
Update the sensor.
|
public static final double DEFAULT_ACTIVATION
public static final int DEFAULT_X
public static final int DEFAULT_Y
public static final int DEFAULT_WIDTH
public static final int DEFAULT_HEIGHT
public TileSensor(OdorWorldEntity parent, int x, int y, int width, int height)
parent
- parent entityx
- upper lefty
- upper rightwidth
- width in pixelsheight
- heightpublic double getValue()
public void setValue(double value)
value
- the value to setpublic double getActivationAmount()
public int getX()
public void setX(int x)
x
- the x to setpublic int getY()
public void setY(int y)
y
- the y to setpublic int getWidth()
public void setWidth(int width)
width
- the width to setpublic int getHeight()
public void setHeight(int height)
height
- the height to setpublic void setActivationAmount(double amount)
amount
- the activation amount to setpublic java.lang.String getTypeDescription()
Sensor
getTypeDescription
in class Sensor