Class CEnemy
java.lang.Object
|
+--CHuman
|
+--CEnemy
- public class CEnemy
- extends CHuman
CEnemy class, enemy implementation
- Version:
- 1.0
- Author:
- Created and maintained by Roman Podobedov
Fields inherited from class CHuman |
cell_height,
cell_width,
direction,
in_pit,
in_the_fly,
is_dead,
m_only_one_cell,
m_only_one_cell_leftright,
m_only_one_cell_updown,
m_pos_x,
m_pos_x_cell,
m_pos_y,
m_pos_y_cell,
man_type,
max_sprites,
number_of_boxes,
number_of_boxes_score,
onRope,
sprite_num |
Constructor Summary |
CEnemy()
Enemy constructor |
Method Summary |
void |
AutomaticalStep(CLevel level,
int man_pos_x,
int man_pos_y)
Do one automatical step (Enemy Artificial Intelligence) |
boolean |
canDown(CLevel level)
Check that DOWN move is allowed |
boolean |
canLeft(CLevel level)
Check that LEFT move is allowed |
boolean |
canRight(CLevel level)
Check that RIGHT move is allowed |
boolean |
canUp(CLevel level)
Check that UP move is allowed |
Methods inherited from class CHuman |
CheckBounds,
DoCalculations,
GetDirection,
GetPosX,
GetPosY,
GetSpriteNum,
Hit,
IncreaseSprite,
RecalculateData,
SetPosition,
StepDown,
StepLeft,
StepRight,
StepUp |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
step_direction
protected int step_direction
prev_step_direction
protected int prev_step_direction
first_step
protected boolean first_step
total_in_pits
public int total_in_pits
in_pit_delay
public int in_pit_delay
CEnemy
public CEnemy()
- Enemy constructor
AutomaticalStep
public void AutomaticalStep(CLevel level,
int man_pos_x,
int man_pos_y)
- Do one automatical step (Enemy Artificial Intelligence)
canUp
public boolean canUp(CLevel level)
- Check that UP move is allowed
canDown
public boolean canDown(CLevel level)
- Check that DOWN move is allowed
canLeft
public boolean canLeft(CLevel level)
- Check that LEFT move is allowed
canRight
public boolean canRight(CLevel level)
- Check that RIGHT move is allowed