diff --git a/lumpundform-html/war/WEB-INF/lib/gwt-servlet.jar b/lumpundform-html/war/WEB-INF/lib/gwt-servlet.jar
deleted file mode 100644
index b3c62e4..0000000
Binary files a/lumpundform-html/war/WEB-INF/lib/gwt-servlet.jar and /dev/null differ
diff --git a/lumpundform/src/com/lumpundform/escenario/EscenarioBase.java b/lumpundform/src/com/lumpundform/escenario/EscenarioBase.java
index 6e9c647..0fa377e 100644
--- a/lumpundform/src/com/lumpundform/escenario/EscenarioBase.java
+++ b/lumpundform/src/com/lumpundform/escenario/EscenarioBase.java
@@ -25,6 +25,7 @@
import com.lumpundform.actores.Personaje;
import com.lumpundform.audio.ManejadorDeMusica;
import com.lumpundform.audio.ManejadorDeSonido;
+import com.lumpundform.audio.MusicaDisponible;
import com.lumpundform.colision.Linea;
import com.lumpundform.colision.Poligono;
import com.lumpundform.eventos.Escena;
diff --git a/lumpundform/src/com/lumpundform/escenario/EscenarioHelper.java b/lumpundform/src/com/lumpundform/escenario/EscenarioHelper.java
index 76be6ae..42f4589 100644
--- a/lumpundform/src/com/lumpundform/escenario/EscenarioHelper.java
+++ b/lumpundform/src/com/lumpundform/escenario/EscenarioHelper.java
@@ -1,5 +1,8 @@
package com.lumpundform.escenario;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.scenes.scene2d.Actor;
@@ -11,6 +14,7 @@
import com.lumpundform.interfaz.InterfazHelper;
import com.lumpundform.lumpundform.CamaraJuego;
import com.lumpundform.utilerias.D;
+import com.lumpundform.utilerias.U;
/**
* Clase que ayuda con las funciones de los escenarios, como cargar el mapa, los
@@ -25,6 +29,8 @@ public class EscenarioHelper {
private InterfazHelper interfazHelper;
private EscenarioBase escenario;
private boolean dibujarColision;
+ private long timeStamp;
+ private long soundStamp;
/**
* Inicializa el escenario, el mapa, las colisiones y el {@link Heroe} para
@@ -203,5 +209,11 @@ public void siguienteCancion() {
public void sonidoAtacar() {
escenario.ms.play(SonidosDisponibles.ATAQUE);
+ soundStamp = System.currentTimeMillis();
+ U.l("dif", soundStamp - timeStamp);
+ }
+
+ public void setTimeStamp(long timeStamp) {
+ this.timeStamp = timeStamp;
}
}
\ No newline at end of file
diff --git a/lumpundform/src/com/lumpundform/input/ProcesadorEntradaJuego.java b/lumpundform/src/com/lumpundform/input/ProcesadorEntradaJuego.java
index 6013b0e..76369e1 100644
--- a/lumpundform/src/com/lumpundform/input/ProcesadorEntradaJuego.java
+++ b/lumpundform/src/com/lumpundform/input/ProcesadorEntradaJuego.java
@@ -1,5 +1,8 @@
package com.lumpundform.input;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+
import com.badlogic.gdx.Input.Keys;
import com.badlogic.gdx.InputProcessor;
import com.badlogic.gdx.input.GestureDetector.GestureListener;
@@ -78,6 +81,8 @@ public boolean keyDown(int keycode) {
Heroe heroe = escenario.getHeroe();
/* Disparar */
if (keycode == Keys.SPACE) {
+ long timeStamp = System.currentTimeMillis();
+ escenario.setTimeStamp(timeStamp);
heroe.habilidad("disparar");
escenario.sonidoAtacar();
return true;
diff --git a/lumpundform/src/com/lumpundform/utilerias/LRUCache.java b/lumpundform/src/com/lumpundform/utilerias/LRUCache.java
index ae28d67..ee8ddf9 100644
--- a/lumpundform/src/com/lumpundform/utilerias/LRUCache.java
+++ b/lumpundform/src/com/lumpundform/utilerias/LRUCache.java
@@ -1,46 +1,46 @@
-package com.lumpundform.utilerias;
-
-import java.util.Collection;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-public class LRUCache {
- public interface CacheEntryRemovedListener {
- void notifyEntryRemoved(K key, V value);
- }
-
- private Map cache;
- private CacheEntryRemovedListener entryRemovedListener;
-
- public LRUCache(final int maxEntries) {
- cache = new LinkedHashMap(maxEntries + 1, .75f, true) {
- public boolean removeEldestEntry(Map.Entry eldest) {
- if (size() > maxEntries) {
- if (entryRemovedListener != null) {
- entryRemovedListener.notifyEntryRemoved(
- eldest.getKey(), eldest.getValue());
- }
- return true;
- }
- return false;
- }
- };
- }
-
- public void add(K key, V value) {
- cache.put(key, value);
- }
-
- public V get(K key) {
- return cache.get(key);
- }
-
- public Collection retrieaveAll() {
- return cache.values();
- }
-
- public void setEntryRemovedListener(
- CacheEntryRemovedListener entryRemovedListener) {
- this.entryRemovedListener = entryRemovedListener;
- }
-}
+package com.lumpundform.utilerias;
+
+import java.util.Collection;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+public class LRUCache {
+ public interface CacheEntryRemovedListener {
+ void notifyEntryRemoved(K key, V value);
+ }
+
+ private Map cache;
+ private CacheEntryRemovedListener entryRemovedListener;
+
+ public LRUCache(final int maxEntries) {
+ cache = new LinkedHashMap(maxEntries + 1, .75f, true) {
+ public boolean removeEldestEntry(Map.Entry eldest) {
+ if (size() > maxEntries) {
+ if (entryRemovedListener != null) {
+ entryRemovedListener.notifyEntryRemoved(
+ eldest.getKey(), eldest.getValue());
+ }
+ return true;
+ }
+ return false;
+ }
+ };
+ }
+
+ public void add(K key, V value) {
+ cache.put(key, value);
+ }
+
+ public V get(K key) {
+ return cache.get(key);
+ }
+
+ public Collection retrieaveAll() {
+ return cache.values();
+ }
+
+ public void setEntryRemovedListener(
+ CacheEntryRemovedListener entryRemovedListener) {
+ this.entryRemovedListener = entryRemovedListener;
+ }
+}