void CreatePageControllers() { this.pageGameplayController = new PageGameplayController( new UIPageModel(PageType.Window), this.pageGameplayView ); this.popupGameoverController = new PopupGameoverController( new UIPageModel(PageType.Popup), this.popupGameoverView ); this.pageLoadingController = new PageLoadingController( new PageLoadingModel(PageType.Window), this.pageLoadingView ); }
void Awake() { if (FindObjectsOfType <MainMenuController>().Length > 1) { Debug.LogError("Multiple MainMenuManager managers found in scene", this); Destroy(this); } this.pageMainMenuController = new PageMainMenuController( new UIPageModel(PageType.Window), this.pageMainMenuView ); this.pageLoadingController = new PageLoadingController( new PageLoadingModel(PageType.Window), this.pageLoadingView ); SFXHelpers.AddButtonBehaviours(this.pageMainMenuView.gameObject, null, this.btnClickSfx, null, null); SFXHelpers.AddButtonBehaviours(this.pageLoadingView.gameObject, null, this.btnClickSfx, null, null); }