public void ChangeState(CameraState newState) { if (currentState != null) { currentState.FinaliseState(); currentState = null; } Trace.WriteLine(string.Format("CameraState: Changing to state {0}", newState != null ? newState.GetType().ToString() : "NULL")); currentState = newState; if (currentState != null) currentState.InitialiseState(this); }
public void CameraDisconnected() { currentState = null; driverInstance = null; overlayManager = null; }