package skylight1.sevenwonders.view;

import skylight1.opengl.OpenGLGeometry;
import skylight1.sevenwonders.PlayActivity;
import android.os.Handler;
import android.util.Log;

public class HazardCollisionHandler implements GeometryAwareCollisionObserver {

	private final Handler updateUiHandler;

	public HazardCollisionHandler(final Handler anUpdateUiHandler) {
		updateUiHandler = anUpdateUiHandler;
	}

	@Override
	public void collisionOccurred(OpenGLGeometry anOpenGLGeometry) {
		Log.i(SevenWondersGLRenderer.class.getName(), String.format("Player hit a sword!"));
		updateUiHandler.sendEmptyMessage(PlayActivity.END_GAME_MESSAGE);
	}

	@Override
	public void addGeometry(OpenGLGeometry aAnOpenGLGeometry, int aAnAnimationIndex, int aGeometryIndex) {
		// do nothing here
	}
}

@@ -115,24 +115,77 @@
 yActivity;%0D%0A
+import skylight1.sevenwonders.services.SoundTracks;%0D%0A
 import andro
@@ -634,16 +634,70 @@
 d!%22));%0D%0A
+%09%09SoundTracks.getInstance().play(SoundTracks.DEATH);%0D%0A
 %09%09update

add call for death sound