using System.Collections;
using Microsoft.Xna.Framework.Graphics;

namespace EVE.EVECameras {
	public class EVECameraManager {
		private static Hashtable myCameras = new Hashtable();
		private static EVECamera activeCamera;

		public static EVECamera ActiveCamera { get { return activeCamera; } }

		public static void AddCamera(EVECamera newCamera, string cameraLabel) {
            if (!myCameras.ContainsKey(cameraLabel))
			myCameras.Add(cameraLabel, newCamera);
		}

		public static void SetActiveCamera(string cameraLabel) {
			if(myCameras.ContainsKey(cameraLabel))
				activeCamera = myCameras[cameraLabel] as EVECamera;
		}

		public static void UpdateViewports(Viewport newViewport) {
			foreach(EVECamera camera in myCameras.Values) {
				camera.SetViewport(newViewport);
			}
		}
	}
}