Пример #1
0
        public PausePanelController(PauseModel pauseModel)
        {
            _view = Object.FindObjectOfType <PausePanel>();

            _resumeButton = _view.ResumeButton;
            _exitButton   = _view.ExitButton;
            _tweenTime    = _view.TweenTime;

            _elementTweens = new ISidePanelElementTween[]
            {
                new SidePanelTween(_view.RectTransform, _tweenTime),
            };

            _pauseModel      = pauseModel;
            ReadyToPause    += _pauseModel.Pause;
            OnPanelSwitched += _pauseModel.PausePanelSwitched;
            _resumeButton.onClick.AddListener(Resume);
            _exitButton.onClick.AddListener(Exit);
        }
Пример #2
0
 public void Start()
 {
     pausePanel = FindObjectOfType <PausePanel>();
 }