public void SetUIState(UIOverlayState state, bool activeValue = true) { _state = state; _visible = activeValue; _flashingTime = 0f; RecordOverlay.SetActive(false); RewindOverlay.SetActive(false); PlayOverlay.SetActive(false); StopOverlay.SetActive(false); switch (state) { case UIOverlayState.Record: RecordOverlay.SetActive(_visible); break; case UIOverlayState.Rewind: RewindOverlay.SetActive(_visible); break; case UIOverlayState.Play: PlayOverlay.SetActive(_visible); break; case UIOverlayState.Stop: StopOverlay.SetActive(_visible); break; } }
void Awake() { RecordOverlay.SetActive(true); RewindOverlay.SetActive(false); PlayOverlay.SetActive(false); StopOverlay.SetActive(false); InfoFrameOverlay.SetActive(false); FailFuelText.SetActive(false); FailTimelineText.SetActive(false); SuccessText.SetActive(false); _state = UIOverlayState.Record; _visible = true; }
public void Hide() { state = UIOverlayState.Blank; image.enabled = false;; }
public void Show(UIOverlayState newState) { state = newState; image.enabled = true; }