|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jplay.Scene
public class Scene
Class responsible for handling a Scenario.
Constructor Summary | |
---|---|
Scene()
|
Method Summary | |
---|---|
void |
addOverlay(GameObject overlay)
Adds a overlay scene. |
void |
changeTile(int row,
int colunm,
int newID)
Changes the id tile storage in the matrix. |
void |
draw()
Draws the scene on the screen. |
TileInfo |
getTile(int row,
int colunm)
Returns the file info stored in the row and column position of matrix. |
java.util.Vector |
getTilesFromRect(java.awt.Point min,
java.awt.Point max)
Returns the Tiles below the area bounded by max and min points. |
void |
loadFromFile(java.lang.String sceneFile)
Loads a scene from a file. |
void |
removeTile(int row,
int colunm)
Removes a tile from the matrix. |
void |
saveToFile(java.lang.String fileName)
Save the current state of the scene in a new file. |
void |
setDrawStartPos(int drawStartX,
int drawStartY)
Sets the initial X and Y position will be used to draw the scene. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Scene()
Method Detail |
---|
public void loadFromFile(java.lang.String sceneFile)
sceneFile
- File path.public void addOverlay(GameObject overlay)
overlay
- Any GameObject.public void setDrawStartPos(int drawStartX, int drawStartY)
drawStartX
- drawStartY
- public void draw()
public TileInfo getTile(int row, int colunm)
row
- Row in the matrix.colunm
- Column in the matrix.
public java.util.Vector getTilesFromRect(java.awt.Point min, java.awt.Point max)
min
- Upper left corner point of the area.max
- Lower right point of the area.
public void removeTile(int row, int colunm)
row
- colunm
- public void changeTile(int row, int colunm, int newID)
row
- Row of the matrix.colunm
- Colunm of the matrix.newID
- New code which will replace the old Id represented for the row and column.public void saveToFile(java.lang.String fileName)
fileName
- Path of the file to save the scene.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |