Package ruscz.game.gameOfProd.Cells
Class DoorCell
- java.lang.Object
-
- ruscz.game.gameOfProd.Cells.Cell
-
- ruscz.game.gameOfProd.Cells.InteractionCell
-
- ruscz.game.gameOfProd.Cells.DoorCell
-
public class DoorCell extends InteractionCell
Special type of Interaction cell that can act as a Block or as Empty
-
-
Field Summary
Fields Modifier and Type Field Description private booleandirectionVertprivate booleanisLockedprivate booleanisOpenprivate java.lang.Stringsoundprivate floatvolume-
Fields inherited from class ruscz.game.gameOfProd.Cells.InteractionCell
dialog, message, paint, scanner
-
-
Constructor Summary
Constructors Constructor Description DoorCell(int x, int y, boolean directionVert, java.lang.String message, Dialog dialog, Map map, WindowOfFreeMove window)DoorCell(int x, int y, boolean directionVert, Map map, WindowOfFreeMove window)
-
Method Summary
Modifier and Type Method Description java.lang.StringgetSound()floatgetVolume()booleanisLocked()booleanisOpen()voidpaint(java.awt.Graphics2D g)voidsetLocked(boolean locked)voidsetOpen(boolean open)private voidsetSound()Sets sound that is played on interactionvoiduseItem(Item item)Uses a selected item-
Methods inherited from class ruscz.game.gameOfProd.Cells.InteractionCell
endEvent, equals, getDialog, getImageCell, getSoundManager, playCustscene, readDialogFile, readNextLine, startEvent
-
-
-
-
Constructor Detail
-
DoorCell
public DoorCell(int x, int y, boolean directionVert, java.lang.String message, Dialog dialog, Map map, WindowOfFreeMove window)
-
DoorCell
public DoorCell(int x, int y, boolean directionVert, Map map, WindowOfFreeMove window)
-
-
Method Detail
-
paint
public void paint(java.awt.Graphics2D g)
- Overrides:
paintin classInteractionCell
-
useItem
public void useItem(Item item)
Description copied from class:InteractionCellUses a selected item- Overrides:
useItemin classInteractionCell- Parameters:
item- item to be used
-
setSound
private void setSound()
Sets sound that is played on interaction
-
isOpen
public boolean isOpen()
-
setOpen
public void setOpen(boolean open)
-
isLocked
public boolean isLocked()
-
setLocked
public void setLocked(boolean locked)
-
getSound
public java.lang.String getSound()
-
getVolume
public float getVolume()
-
-