inicio personajes y partida
This commit is contained in:
40
core/src/menus/Battle.java
Normal file
40
core/src/menus/Battle.java
Normal file
@@ -0,0 +1,40 @@
|
||||
package menus;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.Input;
|
||||
import com.badlogic.gdx.graphics.Texture;
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
||||
|
||||
import utilidades.Personaje;
|
||||
|
||||
public class Battle extends Menu{
|
||||
|
||||
Personaje p1;
|
||||
Personaje p2;
|
||||
Texture suelo;
|
||||
public Battle() {
|
||||
this.p2=new Personaje("ken", true);
|
||||
this.p1=new Personaje("ryu", false);
|
||||
suelo = new Texture("sueloChina.png");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int draw(SpriteBatch batch, float delta) {
|
||||
batch.draw(suelo,0,0);
|
||||
if (Gdx.input.isKeyPressed(Input.Keys.E)) {
|
||||
p1.cambiarEstado(p1.MEDIO);
|
||||
}else {
|
||||
p1.cambiarEstado(p1.STAND);
|
||||
}
|
||||
this.p1.draw(batch, delta, 150, 10);
|
||||
this.p2.draw(batch, delta, 250, 10);
|
||||
return Menu.BATTLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
int darSeleccionado() {
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user