(function(window){	function Timer(delay, repeatCount)	{		this.delay				= delay;		this.repeatCount		= repeatCount;		this.currentCount		= 0;		this.intervalID			= null;		this.TIMER				= new signals.Signal();		this.TIMER_COMPLETED	= new signals.Signal();	}	Timer.prototype.start	= function()	{		var _this		= this;		this.intervalID	= setInterval(function() { _this.tick(); }, _this.delay); // I hate the scope thing :/	}	Timer.prototype.reset	= function()	{		this.stop();		this.currentCount	= 0;	}	Timer.prototype.stop	= function()	{		if(this.intervalID) clearInterval(this.intervalID);	}	Timer.prototype.tick	= function()	{		this.TIMER.dispatch();		this.currentCount++;		if(this.repeatCount && this.currentCount >= this.repeatCount)		{			this.stop();			this.TIMER_COMPLETED.dispatch();			return false;		}	}	Timer.prototype.dispose = function()	{		this.stop();		this.TIMER.removeAll();		this.TIMER_COMPLETED.removeAll();	}	window.Timer = Timer;}(window));
