|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--CHuman
CHuman class, abstract human implementation
Field Summary | |
int |
cell_height
|
int |
cell_width
|
protected int |
direction
|
boolean |
in_pit
|
protected boolean |
in_the_fly
|
boolean |
is_dead
|
protected boolean |
m_only_one_cell
|
protected boolean |
m_only_one_cell_leftright
|
protected boolean |
m_only_one_cell_updown
|
protected int |
m_pos_x
|
int |
m_pos_x_cell
|
protected int |
m_pos_y
|
int |
m_pos_y_cell
|
protected int |
man_type
|
protected int |
max_sprites
|
protected int |
number_of_boxes
|
int |
number_of_boxes_score
|
boolean |
onRope
|
protected int |
sprite_num
|
Constructor Summary | |
CHuman()
Constructor |
Method Summary | |
void |
CheckBounds(CLevel level)
Check current human position in level |
boolean |
DoCalculations(CLevel level)
Do some calculations for human |
int |
GetDirection()
Get direction of human |
int |
GetPosX()
Get current X position |
int |
GetPosY()
Get current Y position |
int |
GetSpriteNum()
Get current sprite number |
void |
Hit(CLevel level)
Do one hit |
protected void |
IncreaseSprite()
Increase current sprite of human |
void |
RecalculateData()
Recalculates all positioning data in class (must be called, when any change is maded) |
void |
SetPosition(int x,
int y)
Set human position (pixels) |
boolean |
StepDown(CLevel level)
Do one step down |
boolean |
StepLeft(CLevel level)
Do one step left |
boolean |
StepRight(CLevel level)
Do one step right |
boolean |
StepUp(CLevel level)
Do one step up |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected int max_sprites
protected int m_pos_x
protected int m_pos_y
public int m_pos_x_cell
public int m_pos_y_cell
protected boolean m_only_one_cell
protected boolean m_only_one_cell_updown
protected boolean m_only_one_cell_leftright
protected int direction
public boolean onRope
protected int sprite_num
public int cell_width
public int cell_height
protected int number_of_boxes
public int number_of_boxes_score
protected boolean in_the_fly
protected int man_type
public boolean is_dead
public boolean in_pit
Constructor Detail |
public CHuman()
Method Detail |
public void SetPosition(int x, int y)
x
- X Position on human (in pixels)y
- Y Position on human (in pixels)public int GetDirection()
public void RecalculateData()
public int GetSpriteNum()
public int GetPosX()
public int GetPosY()
public boolean StepRight(CLevel level)
level
- pointer to levelpublic boolean StepLeft(CLevel level)
level
- pointer to levelpublic boolean StepUp(CLevel level)
level
- pointer to levelpublic boolean StepDown(CLevel level)
level
- pointer to levelpublic void Hit(CLevel level)
level
- pointer to levelprotected void IncreaseSprite()
public void CheckBounds(CLevel level)
level
- pointer to levelpublic boolean DoCalculations(CLevel level)
level
- pointer to level
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |