Archived
0

javadoc(all)

This commit is contained in:
2013-10-26 13:41:53 +04:00
parent b91ca5c7c5
commit e666c5aecf
3 changed files with 33 additions and 2 deletions

View File

@@ -16,17 +16,25 @@ public class Foxy {
setState(0); setState(0);
} }
/**
* Разворачивание текстуры в другую сторону
* @param value false=вправо, true=влево
*/
public void setInverse(boolean value){ public void setInverse(boolean value){
inverse = value; inverse = value;
} }
/**
* Куда развернута текстура
* @return false=вправо, true=влево
*/
public boolean getInverse(){ public boolean getInverse(){
return inverse; return inverse;
} }
/** /**
* Состояние персонажа.<br/> * Установка состояние персонажа.<br/>
* 0 - idle - стоит на месте * 0 - idle - стоит на месте<br/>
* 1 - run - бежит * 1 - run - бежит
*/ */
public void setState(int value){ public void setState(int value){
@@ -55,6 +63,11 @@ public class Foxy {
return y; return y;
} }
/**
* Ссостояние персонажа.<br/>
* 0 - idle - стоит на месте<br/>
* 1 - run - бежит
*/
public int getState(){ public int getState(){
return state; return state;
} }

View File

@@ -59,10 +59,18 @@ public class Sprite extends Texture {
} }
} }
/**
* Ширина одного спрайта
* @return
*/
public int getWidthSprite(){ public int getWidthSprite(){
return width; return width;
} }
/**
* Высота одного спрайта
* @return
*/
public int getHeightSprite(){ public int getHeightSprite(){
return height; return height;
} }

View File

@@ -103,10 +103,20 @@ public class Texture {
prepare_image(); prepare_image();
} }
/**
* Преобразует обычные пиксельные координаты в относительные
* @param x
* @return
*/
public float floatX(int x){ public float floatX(int x){
return one_pixel_w * x; return one_pixel_w * x;
} }
/**
* Преобразует обычные пиксельные координаты в относительные
* @param y
* @return
*/
public float floatY(int y){ public float floatY(int y){
return one_pixel_h * y; return one_pixel_h * y;