package edu.benedictine.game.engine;

import edu.benedictine.game.gui.Director;

public class SceneSwitcher
{
	int timeToGo;
	String nextScene;
	double nextX, nextY;
	Director mn;
	
	public SceneSwitcher(Director main) 
	{
		this.mn = main;
		timeToGo = -1;
		nextScene = "0";
	}
	
	public void mark(String index, int time, double nX, double nY)
	{
		timeToGo = time;
		nextScene = index;
		nextX = nX;
		nextY = nY;
	}
	
	public void update()
	{
		if (timeToGo == 0)
			mn.changeScene(nextScene, mn.currentScene.currentLevel, nextX, nextY);
		timeToGo--;
	}

	public int getTimeToGo() 
	{
		return timeToGo;
	}
	
}

@@ -1,8 +1,66 @@
+//Modified by Joseph Rioux, 23 May 2014%0A//added comments%0A%0A
 package 
@@ -406,45 +406,210 @@
 %7B%0A%09%09
-timeToGo = time;%0A%09%09nextScene = index;
+//set the number of frames that will elapse before the scene is changed%0A%09%09timeToGo = time;%0A%09%09//set the next scene to load, as a string%0A%09%09nextScene = index;%0A%09%09//set the player's position in the new scene
 %0A%09%09n
@@ -663,16 +663,62 @@
 te()%0A%09%7B%0A
+%09%09//when the timer runs out, change the scene%0A
 %09%09if (ti

Update SceneSwitcher.java