Ejemplo n.º 1
0
        public TitleController(TitleView view, TitleModel model, SceneTransitionService sceneTransitionService, AudioService audioService)
            : base(view)
        {
            _view = view;
            _view.Initialize();

            _model                  = model;
            _audioService           = audioService;
            _sceneTransitionService = sceneTransitionService;

            _view.OnStartClicked
            .Subscribe(_ => OnStartClicked())
            .AddTo(Disposer);

            _view.OnSettingsClicked
            .Subscribe(_ => _model.OpenSettings.Execute())
            .AddTo(Disposer);

            _view.OnCreditsClicked
            .Subscribe(_ => _model.OpenCredits.Execute())
            .AddTo(Disposer);

            _view.OnTutorialClicked
            .Subscribe(_ => _model.OpenTutorial.Execute())
            .AddTo(Disposer);
        }
Ejemplo n.º 2
0
 public void Initialize()
 {
     View.StarButtonSubmit += () => OnStartSubmit();
     View.LoadButtonSubmit += () => OnLoadSubmit();
     View.Initialize();
 }
Ejemplo n.º 3
0
 public void SetupTitle(List <string> items, Action <int> onSelect)
 {
     titleView.gameObject.SetActive(true);
     scoreView.gameObject.SetActive(false);
     titleView.Initialize(items, onSelect);
 }