 	UpdateScoreDisplay();
 }
 
+void HandlePlayerDestroyed(StringHash eventType, VariantMap& eventData)
+{
+	Vector3 position = eventData["CamPosition"].GetVector3();
+	Quaternion rotation = eventData["CamRotation"].GetQuaternion();
+	cameraNode_.rotation = rotation;
+	cameraNode_.position = position;
+	
+	SetViewportCamera(cameraNode_);
+	cameraNode_.GetChild("DirectionalLight").enabled = true;
+	
+	SetSoundListener(cameraNode_);
+}
+
 void HandleCountFinished(StringHash eventType, VariantMap& eventData)
 {
+	CreatePlayer();
+	SetViewportCamera(playerNode_.GetChild("CameraNode"));
+	
+	cameraNode_.GetChild("DirectionalLight").enabled = false;
+	
+	//The following two lines come into play when restarting the game
+	healthFillSprite_.imageRect = IntRect(0, 0, 512, 64);
+	UpdateHealthTexture(1);
+	
 	scene_.updateEnabled = true;
 	gameState_ = GS_INGAME;
 	

	playerScoreText_.text = playerScore_;
}
 




void SpawnDrone()
{
	Node@ droneNode = scene_.CreateChild();

	playerScoreMessageText_.text = "";
	optionsInfoText_.text = "";
	gamePhaseCounter_ = 0.0f;
	droneSpawnCounter_ = 0.0f;
	playerScore_ = 0;
	
	SetSoundListener(cameraNode_);

	PlayBackgroundMusic("Resources/Sounds/cyber_dance.ogg");
	StartCounterToGame();
}
