Package ruscz.game.gameOfProd.Cells
Class InteractionCell
- java.lang.Object
-
- ruscz.game.gameOfProd.Cells.Cell
-
- ruscz.game.gameOfProd.Cells.InteractionCell
-
- Direct Known Subclasses:
DoorCell,ChestCell,TriggerCell
public class InteractionCell extends Cell
Cell that is interactible by Player
-
-
Field Summary
Fields Modifier and Type Field Description protected Dialogdialogprivate ImageCellimageCellprivate static java.util.logging.LoggerLOGprotected java.lang.Stringmessageprotected booleanpaintprotected java.util.Scannerscannerprivate SoundManagersoundManagerprivate javax.swing.TimertextTimerprivate javax.swing.Timertimerprivate WindowOfFreeMovewindow
-
Constructor Summary
Constructors Constructor Description InteractionCell(int x, int y, java.lang.String message, Dialog dialog, Map map, WindowOfFreeMove window, boolean paint)
-
Method Summary
Modifier and Type Method Description voidendEvent()Ends event and bounds camerabooleanequals(java.lang.Object o)DialoggetDialog()ImageCellgetImageCell()SoundManagergetSoundManager()voidpaint(java.awt.Graphics2D g)voidplayCustscene(java.lang.String name, int i)Parses line of cut-scene text into a set of commands if the sequence numbers are equalvoidreadDialogFile(java.lang.String name)Reads event file and passes in on to readNextLinevoidreadNextLine()Parses line of event text into set of commandsvoidstartEvent()Starts regular event or cut-scenevoiduseItem(Item item)Uses a selected item
-
-
-
Field Detail
-
message
protected java.lang.String message
-
dialog
protected Dialog dialog
-
scanner
protected java.util.Scanner scanner
-
imageCell
private final ImageCell imageCell
-
soundManager
private final SoundManager soundManager
-
window
private final WindowOfFreeMove window
-
paint
protected boolean paint
-
timer
private javax.swing.Timer timer
-
textTimer
private javax.swing.Timer textTimer
-
LOG
private static final java.util.logging.Logger LOG
-
-
Constructor Detail
-
InteractionCell
public InteractionCell(int x, int y, java.lang.String message, Dialog dialog, Map map, WindowOfFreeMove window, boolean paint)
-
-
Method Detail
-
startEvent
public void startEvent()
Starts regular event or cut-scene
-
readDialogFile
public void readDialogFile(java.lang.String name)
Reads event file and passes in on to readNextLine- Parameters:
name- event file name
-
readNextLine
public void readNextLine()
Parses line of event text into set of commands
-
endEvent
public void endEvent()
Ends event and bounds camera
-
playCustscene
public void playCustscene(java.lang.String name, int i)Parses line of cut-scene text into a set of commands if the sequence numbers are equal- Parameters:
name- text to parsei- sequence number
-
useItem
public void useItem(Item item)
Uses a selected item- Parameters:
item- item to be used
-
getImageCell
public ImageCell getImageCell()
-
getSoundManager
public SoundManager getSoundManager()
-
getDialog
public Dialog getDialog()
-
-