Add missing documenation
Remove language from game panel Signed-off-by: Chris Cromer <chris@cromer.cl>
This commit is contained in:
parent
fe4c7f1130
commit
4f65862177
@ -127,11 +127,19 @@ public class Celda extends JComponent implements Constantes {
|
||||
textureNumbers.add(textureNumber);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the texture that is on the top of the stack
|
||||
*/
|
||||
public void removeTopTexture() {
|
||||
textures.remove(textures.size() - 1);
|
||||
textureNumbers.remove(textureNumbers.size() - 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the numbers of the textures
|
||||
*
|
||||
* @return Returns an array list containing the texture numbers
|
||||
*/
|
||||
public ArrayList<Integer> getTextureNumbers() {
|
||||
return textureNumbers;
|
||||
}
|
||||
@ -194,12 +202,33 @@ public class Celda extends JComponent implements Constantes {
|
||||
* The possible types of cell that this could be
|
||||
*/
|
||||
public enum Type {
|
||||
/**
|
||||
* The player
|
||||
*/
|
||||
PLAYER,
|
||||
/**
|
||||
* An enemy
|
||||
*/
|
||||
ENEMY,
|
||||
/**
|
||||
* An empty space
|
||||
*/
|
||||
SPACE,
|
||||
/**
|
||||
* The portal
|
||||
*/
|
||||
PORTAL,
|
||||
/**
|
||||
* An obstacle
|
||||
*/
|
||||
OBSTACLE,
|
||||
/**
|
||||
* A chest
|
||||
*/
|
||||
CHEST,
|
||||
/**
|
||||
* A key
|
||||
*/
|
||||
KEY
|
||||
}
|
||||
}
|
@ -173,6 +173,12 @@ public class Enemy extends Object implements Constantes {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* If the enemy has found the player attack him
|
||||
*
|
||||
* @param x The x position of the player
|
||||
* @param y The y position of the player
|
||||
*/
|
||||
private void attackPlayer(int x, int y) {
|
||||
if (getEscenario().getCanvas().getPlayer().getHealth() > 0) {
|
||||
logger.info("Attacked player at x: " + x + " y: " + y);
|
||||
@ -223,9 +229,21 @@ public class Enemy extends Object implements Constantes {
|
||||
* The possible directions the enemy can face
|
||||
*/
|
||||
public enum Direction {
|
||||
/**
|
||||
* The enemy is facing up
|
||||
*/
|
||||
UP,
|
||||
/**
|
||||
* The enemy is facing down
|
||||
*/
|
||||
DOWN,
|
||||
/**
|
||||
* The enemy is facing left
|
||||
*/
|
||||
LEFT,
|
||||
/**
|
||||
* The enemy is facing right
|
||||
*/
|
||||
RIGHT
|
||||
}
|
||||
}
|
||||
|
@ -41,6 +41,12 @@ public class Gem extends Object {
|
||||
PURIFIED
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the gem object
|
||||
*
|
||||
* @param escenario The scene the gem is in
|
||||
* @param celda The cell the gem is in
|
||||
*/
|
||||
public Gem(Escenario escenario, Celda celda) {
|
||||
super(escenario, celda);
|
||||
}
|
||||
|
@ -127,7 +127,13 @@ public class Portal extends Object implements Constantes {
|
||||
* The current state of the portal
|
||||
*/
|
||||
public enum State {
|
||||
/**
|
||||
* The portal is active
|
||||
*/
|
||||
ACTIVE,
|
||||
/**
|
||||
* The portal is inactive
|
||||
*/
|
||||
INACTIVE
|
||||
}
|
||||
}
|
||||
|
@ -52,12 +52,4 @@ public class Game extends JPanel implements Constantes {
|
||||
public Lienzo getCanvas() {
|
||||
return canvas;
|
||||
}
|
||||
|
||||
/**
|
||||
* The language to use in the game
|
||||
*/
|
||||
public enum Language {
|
||||
ENGLISH,
|
||||
SPANISH
|
||||
}
|
||||
}
|
||||
|
@ -213,14 +213,41 @@ public class Animation implements Cloneable, Constantes {
|
||||
* The sprite type
|
||||
*/
|
||||
public enum SpriteType {
|
||||
/**
|
||||
* The player animation
|
||||
*/
|
||||
PLAYER,
|
||||
/**
|
||||
* The enemy animation
|
||||
*/
|
||||
ENEMY,
|
||||
/**
|
||||
* The chest animation
|
||||
*/
|
||||
CHEST,
|
||||
/**
|
||||
* The gem animation
|
||||
*/
|
||||
GEM,
|
||||
/**
|
||||
* The key animation
|
||||
*/
|
||||
KEY,
|
||||
/**
|
||||
* The heart animation
|
||||
*/
|
||||
HEART,
|
||||
/**
|
||||
* The game over animation
|
||||
*/
|
||||
GAME_OVER,
|
||||
/**
|
||||
* The inactive portal animation
|
||||
*/
|
||||
INACTIVE_PORTAL,
|
||||
/**
|
||||
* The active portal animation
|
||||
*/
|
||||
ACTIVE_PORTAL
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user