bugs menores y aniadidos 2 personajes
BIN
core/assets/blanka/alto1.png
Normal file
After Width: | Height: | Size: 115 KiB |
BIN
core/assets/blanka/alto2.png
Normal file
After Width: | Height: | Size: 116 KiB |
BIN
core/assets/blanka/alto3.png
Normal file
After Width: | Height: | Size: 116 KiB |
BIN
core/assets/blanka/bajo1.png
Normal file
After Width: | Height: | Size: 115 KiB |
BIN
core/assets/blanka/bajo2.png
Normal file
After Width: | Height: | Size: 116 KiB |
BIN
core/assets/blanka/bajo3.png
Normal file
After Width: | Height: | Size: 117 KiB |
BIN
core/assets/blanka/frente1.png
Normal file
After Width: | Height: | Size: 115 KiB |
BIN
core/assets/blanka/frente2.png
Normal file
After Width: | Height: | Size: 116 KiB |
BIN
core/assets/blanka/frente3.png
Normal file
After Width: | Height: | Size: 116 KiB |
BIN
core/assets/blanka/stand1.png
Normal file
After Width: | Height: | Size: 115 KiB |
BIN
core/assets/blanka/stand2.png
Normal file
After Width: | Height: | Size: 114 KiB |
BIN
core/assets/blanka/stand3.png
Normal file
After Width: | Height: | Size: 114 KiB |
BIN
core/assets/p4.png
Normal file
After Width: | Height: | Size: 38 MiB |
BIN
core/assets/p5.png
Normal file
After Width: | Height: | Size: 36 MiB |
BIN
core/assets/sagat/alto1.png
Normal file
After Width: | Height: | Size: 114 KiB |
BIN
core/assets/sagat/alto2.png
Normal file
After Width: | Height: | Size: 114 KiB |
BIN
core/assets/sagat/bajo1.png
Normal file
After Width: | Height: | Size: 114 KiB |
BIN
core/assets/sagat/bajo2.png
Normal file
After Width: | Height: | Size: 114 KiB |
BIN
core/assets/sagat/frente1.png
Normal file
After Width: | Height: | Size: 114 KiB |
BIN
core/assets/sagat/frente2.png
Normal file
After Width: | Height: | Size: 114 KiB |
BIN
core/assets/sagat/frente3.png
Normal file
After Width: | Height: | Size: 115 KiB |
BIN
core/assets/sagat/stand1.png
Normal file
After Width: | Height: | Size: 114 KiB |
BIN
core/assets/sagat/stand2.png
Normal file
After Width: | Height: | Size: 114 KiB |
BIN
core/assets/sagat/stand3.png
Normal file
After Width: | Height: | Size: 114 KiB |
BIN
core/assets/sagat/stand4.png
Normal file
After Width: | Height: | Size: 114 KiB |
BIN
core/assets/sagat/stand5.png
Normal file
After Width: | Height: | Size: 114 KiB |
BIN
core/assets/sagat/stand6.png
Normal file
After Width: | Height: | Size: 114 KiB |
1
core/bin/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/main/
|
1
core/bin/main/.gitignore
vendored
@ -1 +0,0 @@
|
|||||||
/com/
|
|
9
core/bin/main/menus/.gitignore
vendored
@ -1,9 +0,0 @@
|
|||||||
/Menu.class
|
|
||||||
/MenuInicio.class
|
|
||||||
/MenuOpcions.class
|
|
||||||
/Battle.class
|
|
||||||
/MenuSeleccion.class
|
|
||||||
/Caratula.class
|
|
||||||
/MenuSeleccion2p.class
|
|
||||||
/Battle2.class
|
|
||||||
/Fin.class
|
|
7
core/bin/main/utilidades/.gitignore
vendored
@ -1,7 +0,0 @@
|
|||||||
/Gifs.class
|
|
||||||
/Personaje.class
|
|
||||||
/Barra.class
|
|
||||||
/Bot.class
|
|
||||||
/Personaje2.class
|
|
||||||
/Araque.class
|
|
||||||
/Ataque.class
|
|
@ -1,7 +1,5 @@
|
|||||||
package menus;
|
package menus;
|
||||||
|
|
||||||
import java.time.LocalTime;
|
|
||||||
|
|
||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.Input;
|
import com.badlogic.gdx.Input;
|
||||||
import com.badlogic.gdx.graphics.Texture;
|
import com.badlogic.gdx.graphics.Texture;
|
||||||
@ -18,10 +16,10 @@ public class Battle extends Menu{
|
|||||||
float contador;
|
float contador;
|
||||||
boolean cambio;
|
boolean cambio;
|
||||||
boolean finalRound;
|
boolean finalRound;
|
||||||
LocalTime tiempo;
|
long tiempo;
|
||||||
LocalTime aux;
|
long aux;
|
||||||
public Battle(String np1, String np2) {
|
public Battle(String np1, String np2) {
|
||||||
tiempo=LocalTime.now();
|
tiempo=System.currentTimeMillis();
|
||||||
this.finalRound=false;
|
this.finalRound=false;
|
||||||
this.cambio=true;
|
this.cambio=true;
|
||||||
this.p2=new Bot(np2, true);
|
this.p2=new Bot(np2, true);
|
||||||
@ -84,10 +82,10 @@ public class Battle extends Menu{
|
|||||||
if(p1.muerto()) {
|
if(p1.muerto()) {
|
||||||
font.draw(batch, "Has perdido", Gdx.graphics.getWidth()/4,Gdx.graphics.getHeight()/2.6f);
|
font.draw(batch, "Has perdido", Gdx.graphics.getWidth()/4,Gdx.graphics.getHeight()/2.6f);
|
||||||
}else if(p2.muerto()){
|
}else if(p2.muerto()){
|
||||||
String puntos = ""+(aux.getSecond()+this.tiempo.getSecond());
|
String puntos = ""+(aux-this.tiempo)/1000;
|
||||||
font.draw(batch, "Has ganado en "+puntos+"s", Gdx.graphics.getWidth()/4,Gdx.graphics.getHeight()/2.6f);
|
font.draw(batch, "Has ganado en "+puntos+"s", Gdx.graphics.getWidth()/4,Gdx.graphics.getHeight()/2.6f);
|
||||||
}else {
|
}else {
|
||||||
aux=LocalTime.now();
|
aux=System.currentTimeMillis();
|
||||||
}
|
}
|
||||||
return darSeleccionado();
|
return darSeleccionado();
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
package menus;
|
package menus;
|
||||||
|
|
||||||
import java.time.LocalTime;
|
|
||||||
|
|
||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.Input;
|
import com.badlogic.gdx.Input;
|
||||||
import com.badlogic.gdx.graphics.Texture;
|
import com.badlogic.gdx.graphics.Texture;
|
||||||
@ -14,10 +12,10 @@ public class Battle2 extends Menu{
|
|||||||
Personaje p1;
|
Personaje p1;
|
||||||
Personaje2 p2;
|
Personaje2 p2;
|
||||||
Texture suelo;
|
Texture suelo;
|
||||||
LocalTime tiempo;
|
long tiempo;
|
||||||
LocalTime aux;
|
long aux;
|
||||||
public Battle2(String np1, String np2) {
|
public Battle2(String np1, String np2) {
|
||||||
this.tiempo=LocalTime.now();
|
this.tiempo=System.currentTimeMillis();
|
||||||
this.p2=new Personaje2(np2, true);
|
this.p2=new Personaje2(np2, true);
|
||||||
this.p1=new Personaje(np1, false);
|
this.p1=new Personaje(np1, false);
|
||||||
this.p1.setEnemigo(p2.getCaja());
|
this.p1.setEnemigo(p2.getCaja());
|
||||||
@ -55,13 +53,13 @@ public class Battle2 extends Menu{
|
|||||||
this.p1.draw(batch, delta);
|
this.p1.draw(batch, delta);
|
||||||
this.p2.draw(batch, delta);
|
this.p2.draw(batch, delta);
|
||||||
if(p1.muerto()) {
|
if(p1.muerto()) {
|
||||||
String puntos = ""+(aux.getSecond()+this.tiempo.getSecond());
|
String puntos = ""+(aux-this.tiempo)/1000;
|
||||||
font.draw(batch, "Ha ganado el jugador 2 en "+puntos+"s", Gdx.graphics.getWidth()/4,Gdx.graphics.getHeight()/2.6f);
|
font.draw(batch, "Ha ganado el jugador 2 en "+puntos+"s", Gdx.graphics.getWidth()/7,Gdx.graphics.getHeight()/2.6f);
|
||||||
}else if(p2.muerto()){
|
}else if(p2.muerto()){
|
||||||
String puntos = ""+(aux.getSecond()+this.tiempo.getSecond());
|
String puntos = ""+(aux-this.tiempo)/1000;
|
||||||
font.draw(batch, "Ha ganado el jugador 1 en "+puntos+"s", Gdx.graphics.getWidth()/4,Gdx.graphics.getHeight()/2.6f);
|
font.draw(batch, "Ha ganado el jugador 1 en "+puntos+"s", Gdx.graphics.getWidth()/7,Gdx.graphics.getHeight()/2.6f);
|
||||||
}else {
|
}else {
|
||||||
aux=LocalTime.now();
|
aux=System.currentTimeMillis();
|
||||||
}
|
}
|
||||||
|
|
||||||
return darSeleccionado();
|
return darSeleccionado();
|
||||||
|
@ -13,7 +13,7 @@ public class Fin extends Menu{
|
|||||||
// TODO Auto-generated catch block
|
// TODO Auto-generated catch block
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
if(contador>10) {
|
if(contador>7) {
|
||||||
Menu.menus.remove(Menu.BATTLE);
|
Menu.menus.remove(Menu.BATTLE);
|
||||||
this.contador=0;
|
this.contador=0;
|
||||||
return Menu.INICIAL;
|
return Menu.INICIAL;
|
||||||
|
@ -17,12 +17,14 @@ public class MenuSeleccion extends Menu{
|
|||||||
public MenuSeleccion() {
|
public MenuSeleccion() {
|
||||||
super();
|
super();
|
||||||
this.shapeDrawer=new ShapeRenderer();
|
this.shapeDrawer=new ShapeRenderer();
|
||||||
this.n_opciones=3;
|
this.n_opciones=5;
|
||||||
this.local=Menu.SELEC;
|
this.local=Menu.SELEC;
|
||||||
this.caratulas=new ArrayList<Caratula>();
|
this.caratulas=new ArrayList<Caratula>();
|
||||||
this.caratulas.add(new Caratula("p1.png", "ryu", 984, 88, 128, 110));
|
this.caratulas.add(new Caratula("p1.png", "ryu", 984, 88, 128, 110));
|
||||||
this.caratulas.add(new Caratula("p2.png", "ken", 228, 565, 128, 110));
|
this.caratulas.add(new Caratula("p2.png", "ken", 228, 565, 128, 110));
|
||||||
this.caratulas.add(new Caratula("p3.png", "cam", 243,0,128, 110));
|
this.caratulas.add(new Caratula("p3.png", "cam", 243,0,128, 110));
|
||||||
|
this.caratulas.add(new Caratula("p4.png", "sagat", 227,312,128, 110));
|
||||||
|
this.caratulas.add(new Caratula("p5.png", "blanka", 99,2963,100, 110));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -43,7 +45,7 @@ public class MenuSeleccion extends Menu{
|
|||||||
batch.end();
|
batch.end();
|
||||||
shapeDrawer.begin(ShapeType.Filled);
|
shapeDrawer.begin(ShapeType.Filled);
|
||||||
shapeDrawer.setColor(Color.GRAY);
|
shapeDrawer.setColor(Color.GRAY);
|
||||||
shapeDrawer.rect(10+(i-3)*280, 280, 190, 180);
|
shapeDrawer.rect(10+(i-3)*280, 210, 190, 180);
|
||||||
shapeDrawer.end();
|
shapeDrawer.end();
|
||||||
batch.begin();
|
batch.begin();
|
||||||
}
|
}
|
||||||
@ -66,6 +68,16 @@ public class MenuSeleccion extends Menu{
|
|||||||
this.position--;
|
this.position--;
|
||||||
this.pres=true;
|
this.pres=true;
|
||||||
}
|
}
|
||||||
|
}else if (Gdx.input.isKeyPressed(Input.Keys.DOWN)) {
|
||||||
|
if(!this.pres) {
|
||||||
|
this.position=3;
|
||||||
|
this.pres=true;
|
||||||
|
}
|
||||||
|
}else if (Gdx.input.isKeyPressed(Input.Keys.UP)) {
|
||||||
|
if(!this.pres) {
|
||||||
|
this.position=0;
|
||||||
|
this.pres=true;
|
||||||
|
}
|
||||||
}else if (Gdx.input.isKeyPressed(Input.Keys.ENTER)){
|
}else if (Gdx.input.isKeyPressed(Input.Keys.ENTER)){
|
||||||
if(!this.pres) {
|
if(!this.pres) {
|
||||||
this.pres=true;
|
this.pres=true;
|
||||||
|
@ -20,7 +20,11 @@ public class MenuSeleccion2p extends MenuSeleccion{
|
|||||||
batch.end();
|
batch.end();
|
||||||
shapeDrawer.begin(ShapeType.Filled);
|
shapeDrawer.begin(ShapeType.Filled);
|
||||||
shapeDrawer.setColor(Color.GRAY);
|
shapeDrawer.setColor(Color.GRAY);
|
||||||
|
if(p1<3) {
|
||||||
shapeDrawer.rect(10+p1*280, 430, 190, 180);
|
shapeDrawer.rect(10+p1*280, 430, 190, 180);
|
||||||
|
}else {
|
||||||
|
shapeDrawer.rect(10+(p1-3)*280, 210, 190, 180);
|
||||||
|
}
|
||||||
shapeDrawer.end();
|
shapeDrawer.end();
|
||||||
batch.begin();
|
batch.begin();
|
||||||
}
|
}
|
||||||
@ -40,7 +44,19 @@ public class MenuSeleccion2p extends MenuSeleccion{
|
|||||||
}
|
}
|
||||||
this.caratulas.get(i).draw(batch, 10+i*200, 300);
|
this.caratulas.get(i).draw(batch, 10+i*200, 300);
|
||||||
}else {
|
}else {
|
||||||
this.caratulas.get(i).draw(batch, 10+(i-2)*200, 150);
|
if(i==this.position) {
|
||||||
|
batch.end();
|
||||||
|
shapeDrawer.begin(ShapeType.Filled);
|
||||||
|
if(p1!=-1) {
|
||||||
|
shapeDrawer.setColor(Color.BLACK);
|
||||||
|
}else {
|
||||||
|
shapeDrawer.setColor(Color.GRAY);
|
||||||
|
}
|
||||||
|
shapeDrawer.rect(10+(i-3)*280, 210, 190, 180);
|
||||||
|
shapeDrawer.end();
|
||||||
|
batch.begin();
|
||||||
|
}
|
||||||
|
this.caratulas.get(i).draw(batch, 10+(i-3)*200, 150);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -59,6 +75,16 @@ public class MenuSeleccion2p extends MenuSeleccion{
|
|||||||
this.position--;
|
this.position--;
|
||||||
this.pres=true;
|
this.pres=true;
|
||||||
}
|
}
|
||||||
|
}else if (Gdx.input.isKeyPressed(Input.Keys.DOWN)) {
|
||||||
|
if(!this.pres) {
|
||||||
|
this.position=3;
|
||||||
|
this.pres=true;
|
||||||
|
}
|
||||||
|
}else if (Gdx.input.isKeyPressed(Input.Keys.UP)) {
|
||||||
|
if(!this.pres) {
|
||||||
|
this.position=0;
|
||||||
|
this.pres=true;
|
||||||
|
}
|
||||||
}else if (Gdx.input.isKeyPressed(Input.Keys.ENTER)){
|
}else if (Gdx.input.isKeyPressed(Input.Keys.ENTER)){
|
||||||
if(!this.pres) {
|
if(!this.pres) {
|
||||||
this.pres=true;
|
this.pres=true;
|
||||||
|
@ -75,6 +75,19 @@ public class Personaje {
|
|||||||
this.cam(position);
|
this.cam(position);
|
||||||
this.coeficienteDanio=1.2f;
|
this.coeficienteDanio=1.2f;
|
||||||
this.coeficienteDef=0.8f;
|
this.coeficienteDef=0.8f;
|
||||||
|
break;
|
||||||
|
case "sagat":
|
||||||
|
this.caracter=4;
|
||||||
|
this.sagat(position);
|
||||||
|
this.coeficienteDanio=0.9f;
|
||||||
|
this.coeficienteDef=1.1f;
|
||||||
|
break;
|
||||||
|
case "blanka":
|
||||||
|
this.caracter=5;
|
||||||
|
this.blanka(position);
|
||||||
|
this.coeficienteDanio=1.5f;
|
||||||
|
this.coeficienteDef=1.2f;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -147,6 +160,20 @@ public class Personaje {
|
|||||||
contadorCombo=0;
|
contadorCombo=0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 4:
|
||||||
|
if(estado==Personaje.ALTO) {
|
||||||
|
if(contadorCombo<2) {
|
||||||
|
contadorCombo++;
|
||||||
|
}
|
||||||
|
}else if(estado==Personaje.BAJO) {
|
||||||
|
if(contadorCombo>=2) {
|
||||||
|
contadorCombo=0;
|
||||||
|
this.tempCombo=5;
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
contadorCombo=0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -231,9 +258,9 @@ public class Personaje {
|
|||||||
shapeDrawer.begin(ShapeType.Filled);
|
shapeDrawer.begin(ShapeType.Filled);
|
||||||
shapeDrawer.setColor(1f,0f,0f,0.3f);
|
shapeDrawer.setColor(1f,0f,0f,0.3f);
|
||||||
if(this.position) {
|
if(this.position) {
|
||||||
shapeDrawer.circle((y*1.1f)+200, x+80, 80);
|
shapeDrawer.circle((y*1.35f)+190, x+80, 80);
|
||||||
}else {
|
}else {
|
||||||
shapeDrawer.circle((y*1.1f)+70, x+80, 80);
|
shapeDrawer.circle(70+(1.35f*y), x+80, 80);
|
||||||
}
|
}
|
||||||
shapeDrawer.end();
|
shapeDrawer.end();
|
||||||
Gdx.gl.glDisable(GL20.GL_BLEND);
|
Gdx.gl.glDisable(GL20.GL_BLEND);
|
||||||
@ -245,9 +272,9 @@ public class Personaje {
|
|||||||
shapeDrawer.begin(ShapeType.Filled);
|
shapeDrawer.begin(ShapeType.Filled);
|
||||||
shapeDrawer.setColor(0f,0f,1f,0.3f);
|
shapeDrawer.setColor(0f,0f,1f,0.3f);
|
||||||
if(this.position) {
|
if(this.position) {
|
||||||
shapeDrawer.circle((y*1.1f)+200, x+80, 80);
|
shapeDrawer.circle((y*1.35f)+190, x+80, 80);
|
||||||
}else {
|
}else {
|
||||||
shapeDrawer.circle((y*1.1f)+70, x+80, 80);
|
shapeDrawer.circle(70+(1.35f*y), x+80, 80);
|
||||||
}
|
}
|
||||||
shapeDrawer.end();
|
shapeDrawer.end();
|
||||||
Gdx.gl.glDisable(GL20.GL_BLEND);
|
Gdx.gl.glDisable(GL20.GL_BLEND);
|
||||||
@ -265,21 +292,35 @@ public class Personaje {
|
|||||||
this.standby=new Gifs("ryu/stand", 6, position);
|
this.standby=new Gifs("ryu/stand", 6, position);
|
||||||
this.medio=new Gifs("ryu/frente", 3, position);
|
this.medio=new Gifs("ryu/frente", 3, position);
|
||||||
this.alto=new Gifs("ryu/arriba", 3, position);
|
this.alto=new Gifs("ryu/arriba", 3, position);
|
||||||
this.bajo=new Gifs("ryu/sentado",3,position);
|
this.bajo=new Gifs("ryu/sentado", 3, position);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ken(boolean position) {
|
private void ken(boolean position) {
|
||||||
this.standby=new Gifs("ken/stand", 6, position);
|
this.standby=new Gifs("ken/stand", 6, position);
|
||||||
this.medio=new Gifs("ken/frente", 3, position);
|
this.medio=new Gifs("ken/frente", 3, position);
|
||||||
this.alto=new Gifs("ken/arriba", 3, position);
|
this.alto=new Gifs("ken/arriba", 3, position);
|
||||||
this.bajo=new Gifs("ken/sentado",3,position);
|
this.bajo=new Gifs("ken/sentado", 3, position);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cam(boolean position) {
|
private void cam(boolean position) {
|
||||||
this.standby=new Gifs("cam/stand", 8, position);
|
this.standby=new Gifs("cam/stand", 8, position);
|
||||||
this.medio=new Gifs("cam/fente", 6, position);
|
this.medio=new Gifs("cam/fente", 6, position);
|
||||||
this.alto=new Gifs("cam/arriba", 4, position);
|
this.alto=new Gifs("cam/arriba", 4, position);
|
||||||
this.bajo=new Gifs("cam/sentado",3,position);
|
this.bajo=new Gifs("cam/sentado", 3, position);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sagat(boolean position) {
|
||||||
|
this.standby=new Gifs("sagat/stand", 6, position);
|
||||||
|
this.medio=new Gifs("sagat/frente",3, position);
|
||||||
|
this.alto=new Gifs("sagat/alto", 2, position);
|
||||||
|
this.bajo=new Gifs("sagat/bajo", 2, position);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void blanka(boolean position){
|
||||||
|
this.standby=new Gifs("blanka/stand", 3, position);
|
||||||
|
this.medio=new Gifs("blanka/frente",3, position);
|
||||||
|
this.alto=new Gifs("blanka/alto", 3, position);
|
||||||
|
this.bajo=new Gifs("blanka/bajo", 3, position);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Rectangle getCaja() {
|
public Rectangle getCaja() {
|
||||||
|
1
desktop/bin/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/main/
|
14
desktop/bin/main/.gitignore
vendored
@ -1,14 +0,0 @@
|
|||||||
/iconos.png
|
|
||||||
/p1.png
|
|
||||||
/p2.png
|
|
||||||
/sueloChina.png
|
|
||||||
/p3.png
|
|
||||||
/ryu/
|
|
||||||
/cam/
|
|
||||||
/ken/
|
|
||||||
/sueloBuda.png
|
|
||||||
/suelos/
|
|
||||||
/125760.png
|
|
||||||
/CentieSans.fnt
|
|
||||||
/CentieSans.ttf_0.png
|
|
||||||
/badlogic.jpg
|
|