using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace ShootingHero
{
	public class Timer
	{
		int elapsed;
		int delay;

		public int ElapsedGameTime { get { return elapsed; } }
		public int Delay { get { return delay; } set { delay = value; } }

		public bool CheckTimer
		{
			get { return ( delay <= elapsed ); }
		}

		public void Reset ()
		{
			elapsed -= delay;
		}

		public void FullReset ()
		{
			elapsed = 0;
		}

		public Timer ( int delay )
		{
			this.delay = delay;
			elapsed = 0;
		}

		public void Update ( GameTime gameTime )
		{
			elapsed += gameTime.ElapsedGameTime.Milliseconds;
		}
	}
}
