private void InitializeBlittingCamera(double timeBetweenCaptures) { if (!gameObject.GetComponent <MegacoolBlittingCamera>()) { MegacoolBlittingCamera cam = gameObject.AddComponent <MegacoolBlittingCamera>(); cam.TimeBetweenCaptures = timeBetweenCaptures; } }
private void RemoveCameras() { MegacoolBlittingCamera blitCamera = gameObject.GetComponent <MegacoolBlittingCamera>(); if (blitCamera) { Destroy(blitCamera); } MegacoolRenderingCamera renderCamera = gameObject.GetComponent <MegacoolRenderingCamera>(); if (renderCamera) { Destroy(renderCamera); } }