Class RestrictiveCell
java.lang.Object
fr.r1r0r0.deltaengine.model.elements.cells.Cell
fr.r1r0r0.deltaengine.model.elements.cells.RestrictiveCell
- All Implemented Interfaces:
Element<java.lang.Integer>
- Direct Known Subclasses:
BlackListCell
,WhiteListCell
public abstract class RestrictiveCell extends Cell
A restrictive version of the Cell, who can accept or not given entities who want to cross it.
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Collection<java.lang.Class<? extends Entity>>
restrictiveList
Restrictive list of Entities class. -
Constructor Summary
Constructors Constructor Description RestrictiveCell(int x, int y, Sprite sprite, java.util.Collection<java.lang.Class<? extends Entity>> restrictiveList)
Default constructor. -
Method Summary
Methods inherited from class fr.r1r0r0.deltaengine.model.elements.cells.Cell
getCoordinates, getDimension, getName, getSprite, isCrossableBy, setCoordinates, setDimension, setSprite
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
restrictiveList
Restrictive list of Entities class. Could be used to parameter who can cross or not this cell.
-
-
Constructor Details
-
RestrictiveCell
public RestrictiveCell(int x, int y, Sprite sprite, java.util.Collection<java.lang.Class<? extends Entity>> restrictiveList)Default constructor. Set a case sprite and coordinates in the map, and a collection of entities' class.- Parameters:
x
- the abscissa coordinate of the cell in the map. Coordinates values are integers.y
- the ordinate coordinate of the cell in the map. Coordinates values are integers.restrictiveList
- Collection of entity classsprite
- the sprite to apply on the case
-