Package blockly_robot.robot.data.model
Class ItemData
java.lang.Object
blockly_robot.robot.data.model.ItemData
- All Implemented Interfaces:
Cloneable
Die Daten eines Gegenstands (Item).
In der JSON-Datei sind die Daten beispielsweise so repräsentiert:
{
"row": 2,
"col": 1,
"dir": 0,
"type": "robot"
}
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanbooleanFound in contextParams.jsonintDie Spaltennummer, in der der Gegenstand plaziert ist.intint0steht für Osten,1steht für Süden,2steht für Westen,3steht für Norden.booleanFound in contextParams.jsonFound in contextParams.jsonbooleanFound in contextParams.jsonbooleanFound in contextParams.jsonbooleanFound in contextParams.jsonbooleanFound in contextParams.jsonRelativer Pfad zusrc/main/resources/images.booleanGibt an, ob der Gegenstand eine Kiste darstellt.booleanFound in contextParams.jsonbooleanFound in contextParams.jsonbooleanGibt an, ob der Gegenstand einen Ausgang darstellt.booleanFound in contextParams.jsonbooleanFound in contextParams.jsonbooleanGibt an, ob der Gegenstand einen Laser darstellt.booleanFound in contextParams.jsonbooleanFound in contextParams.jsonbooleanGibt an, ob der Gegenstand ein Hindernis darstellt.booleanFound in contextParams.jsonbooleanbooleanGibt an, ob der Gegenstand einen Wurfkörper darstellt.booleanGibt an, ob der Gegenstand eine Kiste darstellt.booleanFound in contextParams.jsonbooleanGibt an, ob der Gegenstand einen Roboter darstellt.booleanFound in contextParams.jsonbooleanFound in contextParams.jsonbooleanFound in contextParams.jsonbooleanFound in contextParams.jsonbooleanFound in contextParams.jsonbooleanFound in contextParams.jsonbooleanGibt an, ob der Gegenstand eingesammelt werden kann.booleanGibt an, ob der Gegenstand eine Tafel darstellt.intintDie Nummer (ID) des Gegenstands.intintintFound in contextParams.jsonintDie Zeilennummer, in der der Gegenstand plaziert ist.intGröße in Pixel.intFound in contextParams.jsonString[]Found in contextParams.jsonHat meistens den Wertrobot.int -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
num
public int numDie Nummer (ID) des Gegenstands. -
row
public int rowDie Zeilennummer, in der der Gegenstand plaziert ist. -
col
public int colDie Spaltennummer, in der der Gegenstand plaziert ist. -
dir
public int dir0steht für Osten,1steht für Süden,2steht für Westen,3steht für Norden.- See Also:
-
type
Hat meistens den Wertrobot. Ein eindeutiger Name, der den Gegenstand identifiziert. Zum Beispiel:candle -
img
Relativer Pfad zusrc/main/resources/images. Zum Beispiel:candle/candle.png -
side
public int sideGröße in Pixel. -
offsetX
public int offsetX -
offsetY
public int offsetY -
zOrder
public int zOrder -
color
-
isContainer
public boolean isContainerGibt an, ob der Gegenstand eine Kiste darstellt. -
isExit
public boolean isExitGibt an, ob der Gegenstand einen Ausgang darstellt. -
isLaser
public boolean isLaserGibt an, ob der Gegenstand einen Laser darstellt. -
isObstacle
public boolean isObstacleGibt an, ob der Gegenstand ein Hindernis darstellt. -
isPaint
public boolean isPaint -
isProjectile
public boolean isProjectileGibt an, ob der Gegenstand einen Wurfkörper darstellt. -
isPushable
public boolean isPushableGibt an, ob der Gegenstand eine Kiste darstellt. -
isRobot
public boolean isRobotGibt an, ob der Gegenstand einen Roboter darstellt. -
isWithdrawable
public boolean isWithdrawableGibt an, ob der Gegenstand eingesammelt werden kann. -
autoWithdraw
public boolean autoWithdraw -
isWritable
public boolean isWritableGibt an, ob der Gegenstand eine Tafel darstellt. -
nbStates
public int nbStates -
forwardsLeft
public boolean forwardsLeftFound in contextParams.json -
forwardsRight
public boolean forwardsRightFound in contextParams.json -
forwardsTop
public boolean forwardsTopFound in contextParams.json -
forwardsBottom
public boolean forwardsBottomFound in contextParams.json -
isRound
public boolean isRoundFound in contextParams.json -
isQuadrille
public boolean isQuadrilleFound in contextParams.json -
isSquare
public boolean isSquareFound in contextParams.json -
isTriangle
public boolean isTriangleFound in contextParams.json -
isStriped
public boolean isStripedFound in contextParams.json -
isDotted
public boolean isDottedFound in contextParams.json -
isCross
public boolean isCrossFound in contextParams.json -
isStar
public boolean isStarFound in contextParams.json -
canBeOutside
public boolean canBeOutsideFound in contextParams.json -
fontColor
Found in contextParams.json -
fontBold
public boolean fontBoldFound in contextParams.json -
isGreen
public boolean isGreenFound in contextParams.json -
isOpaque
public boolean isOpaqueFound in contextParams.json -
states
Found in contextParams.json -
isLight
public boolean isLightFound in contextParams.json -
state
public int stateFound in contextParams.json -
isMirror
public boolean isMirrorFound in contextParams.json -
isFake
public boolean isFakeFound in contextParams.json -
isWire
public boolean isWireFound in contextParams.json -
plugType
public int plugTypeFound in contextParams.json -
containerSize
public int containerSize
-
-
Constructor Details
-
ItemData
public ItemData()
-
-
Method Details
-
getCompassDirection
-
clone
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-