public void PageActive(bool state, int pageID) { if (cameraObject == null) { return; } if (state) { cameraObject.SetFlicker(flickerChance, flickerRange); } else { cameraObject.SetFlicker(0, 0); } }
/// <summary> /// Notify this page that it's now active or inactive. If it's /// becoming inactive, release its render texture. /// </summary> /// <param name="state"></param> /// <param name="pageID"></param> public void PageActive(bool state, int pageID) { if (state == false && renderTex != null) { UnityEngine.Object.Destroy(renderTex); renderTex = null; } if (cameraObject == null) { return; } if (state) { cameraObject.SetFlicker(flickerChance, flickerRange); } else { cameraObject.SetFlicker(0, 0); } }
public void Active(bool state) { if (state) { cameraObject.PointCamera(camera, ComputeFOV()); } if (pageHandlerS.activate != null) { pageHandlerS.activate(state, pageNumber); } if (backgroundHandlerS.activate != null && backgroundHandlerS.activate != pageHandlerS.activate) { backgroundHandlerS.activate(state, pageNumber); } if (cameraFlickerChance > 0) { cameraObject.SetFlicker(cameraFlickerChance, cameraFlickerRange); } else { cameraObject.SetFlicker(0, 0); } }