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); }
public void Start() { pausePanel = FindObjectOfType <PausePanel>(); }