|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--CLevel
| Field Summary | |
int |
cell_height
|
int |
cell_width
|
int[][] |
enemy_coords
|
protected int |
gold_box
|
protected byte[][] |
level_data
|
byte |
level_height
|
byte |
level_width
|
protected int |
man_x
|
protected int |
man_y
|
boolean |
on_finishing_stage
|
int |
total_enemy
|
| Constructor Summary | |
CLevel()
Main constructor |
|
| Method Summary | |
void |
AddNewPit(int x,
int y)
Add new pit in level |
void |
DoPitTick()
Do for all pits one tick |
void |
Finishing()
If all boxes are collected then replace invisible elements to visible elements |
int |
GetBoxNumber()
Get number of gold boxes |
int |
GetManX()
Get x hero position |
int |
GetManY()
Get y hero position |
byte |
GetXY(int x,
int y)
Get element at x, y position (position as block) |
void |
LoadFromFile(java.net.URL level_name)
Load all level data from file |
boolean |
ObjectInPit(int x,
int y)
Check that object in the pit |
void |
SetXY(int x,
int y,
byte element)
Set element at x, y position |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public byte level_width
public byte level_height
public int cell_width
public int cell_height
protected byte[][] level_data
protected int man_x
protected int man_y
public int total_enemy
public int[][] enemy_coords
protected int gold_box
public boolean on_finishing_stage
| Constructor Detail |
public CLevel()
| Method Detail |
public void LoadFromFile(java.net.URL level_name)
throws java.lang.Exception
level_name - URL of level
public byte GetXY(int x,
int y)
x - X coordinate (in cells)y - Y coordinate (in cells)
public void SetXY(int x,
int y,
byte element)
x - X coordinate (in cells)y - Y coordinate (in cells)element - Cell datapublic int GetManX()
public int GetManY()
public void AddNewPit(int x,
int y)
x - x position (in cells)y - y position (in cells)
public boolean ObjectInPit(int x,
int y)
x - object x position (in cells)y - object y position (in cells)public void DoPitTick()
public int GetBoxNumber()
public void Finishing()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||