Example #1
0
        private void ViewBtnClickAction(CamViews view)
        {
            if (runtimeData.CurrentStep != ScenarioStep.HitTracking)
            {
                return;
            }

            ResetViewBtns();

            // Выделить нажатую кнопку
            SetBtnHighlightActive(GetViewBtn(view), true);

            runtimeData.CurrentCamView = view;

            runtimeData.OnSetCamView?.Invoke();

            // Сообщить о смене режима
            switch (view)
            {
            case CamViews.Player:
                runtimeData.OnSetPlayerCamView?.Invoke();
                break;

            case CamViews.Rocket:
                runtimeData.OnSetRocketCamView?.Invoke();
                break;

            case CamViews.Remote:
                runtimeData.OnSetRemoteCamView?.Invoke();
                break;
            }
        }
Example #2
0
        private Button GetViewBtn(CamViews view)
        {
            switch (view)
            {
            case CamViews.Player:
                return(uiView.PlayerViewBtn);

            case CamViews.Rocket:
                return(uiView.RocketViewBtn);

            case CamViews.Remote:
                return(uiView.RemoteViewBtn);

            default:
                return(null);
            }
        }