public void Add(string id, BaseCamera camera) { cameras.Add(id, camera); if (activeCamera == null) { activeCamera = camera; activeCameraIndex = cameras.IndexOfKey(id); } }
public void Clear() { cameras.Clear(); activeCamera = null; activeCameraIndex = -1; }
public void SetActiveCamera(string id) { activeCameraIndex = cameras.IndexOfKey(id); activeCamera = cameras[id]; }
public void SetActiveCamera(int cameraIndex) { activeCameraIndex = cameraIndex; activeCamera = cameras[cameras.Keys[cameraIndex]]; }