Skip to content

Commit

Permalink
Agregar nuevo spritesheet de samus y arreglar fade de botones
Browse files Browse the repository at this point in the history
  • Loading branch information
Luraguse committed Mar 18, 2013
1 parent 8320851 commit c67df6b
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 4 deletions.
91 changes: 91 additions & 0 deletions lumpundform-android/assets/data/hitbox_samus.xml
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<animacion nombre="saltar">
<hitbox tipo="variable">
<cuadro id="0">
<x>31</x>
<y>5</y>
<alto>108</alto>
<ancho>35</ancho>
</cuadro>
<cuadro id="1">
<x>31</x>
<y>0</y>
<alto>113</alto>
<ancho>35</ancho>
</cuadro>
<cuadro id="2">
<x>31</x>
<y>18</y>
<alto>95</alto>
<ancho>35</ancho>
</cuadro>
<cuadro id="3">
<x>31</x>
<y>20</y>
<alto>93</alto>
<ancho>35</ancho>
</cuadro>
<cuadro id="4">
<x>31</x>
<y>13</y>
<alto>100</alto>
<ancho>35</ancho>
</cuadro>
<cuadro id="5">
<x>31</x>
<y>0</y>
<alto>113</alto>
<ancho>35</ancho>
</cuadro>
<cuadro id="6">
<x>31</x>
<y>113</y>
<alto>100</alto>
<ancho>35</ancho>
</cuadro>
<cuadro id="7">
<x>31</x>
<y>5</y>
<alto>108</alto>
<ancho>35</ancho>
</cuadro>
<cuadro id="8">
<x>31</x>
<y>5</y>
<alto>108</alto>
<ancho>35</ancho>
</cuadro>
</hitbox>
</animacion>
<animacion nombre="correr">
<hitbox tipo="estatico">
<x>33</x>
<y>8</y>
<alto>105</alto>
<ancho>30</ancho>
</hitbox>
</animacion>
<animacion nombre="correr_con_arma">
<hitbox tipo="estatico">
<x>33</x>
<y>8</y>
<alto>105</alto>
<ancho>30</ancho>
</hitbox>
</animacion>
<animacion nombre="de_pie">
<hitbox tipo="estatico">
<x>35</x>
<y>5</y>
<alto>108</alto>
<ancho>30</ancho>
</hitbox>
</animacion>
<animacion nombre="colision">
<hitbox tipo="estatico">
<x>8</x>
<y>5</y>
<alto>78</alto>
<ancho>78</ancho>
</hitbox>
</animacion>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions lumpundform/src/com/lumpundform/interfaz/BotonBase.java
Expand Up @@ -60,7 +60,7 @@ private void fadeIn() {
alfa = alfa + (Gdx.graphics.getDeltaTime() * velocidadFade);
else if (alfa > 0.0f && alfa < 1.0f)
alfa = alfa + (Gdx.graphics.getDeltaTime() * velocidadFade);
else if (alfa >= 1.0f) {
if (alfa >= 1.0f) {
alfa = 1.0f;
fadeIn = false;
fadeOut = false;
Expand All @@ -73,7 +73,7 @@ private void fadeOut() {
alfa = alfa - (Gdx.graphics.getDeltaTime() * velocidadFade);
else if (alfa < 1.0f && alfa > 0.0f)
alfa = alfa - (Gdx.graphics.getDeltaTime() * velocidadFade);
else if (alfa <= 0.0f) {
if (alfa <= 0.0f) {
alfa = 0.0f;
fadeIn = false;
fadeOut = false;
Expand Down
2 changes: 1 addition & 1 deletion lumpundform/src/com/lumpundform/interfaz/BotonMenu.java
Expand Up @@ -23,10 +23,10 @@ public void draw(SpriteBatch batch, float parentAlpha) {

CharSequence msg = "Menú";
TextBounds tb = bmf.getBounds(msg);
fade();
float xMenu = getX() + (anchoBoton() / 2) - (tb.width / 2);
float yMenu = getY() + (UI.altoBoton / 2) + (tb.height / 2);

bmf.draw(batch, msg, xMenu, yMenu);
fade();
}
}
Expand Up @@ -29,10 +29,10 @@ public void draw(SpriteBatch batch, float parentAlpha) {
super.draw(batch, parentAlpha);

bmf.setScale(0.5f);
fade();
float xCant = getX() + UI.anchoPocion + UI.margenChico;
float yCant = getY() + bmf.getCapHeight();
bmf.draw(batch, getCantidad() + "", xCant, yCant);
fade();
}

public String getTipo() {
Expand Down

0 comments on commit c67df6b

Please sign in to comment.