protected override void Awake() { base.Awake(); _mainMenuCanvas = mainMenuUI.GetComponent <Canvas>(); mainMenuUI.OnPlayButtonClick += () => ChangeState(GameState.Gameplay); mainMenuUI.OnSettingsButtonClick += () => ChangeState(GameState.Settings); mainMenuUI.OnQuitButtonClick += Application.Quit; }
public void UpdateSceneOverlay(Camera screenOverlayCam) { var screenOverlayRect = MainMenuUI.GetComponent <RectTransform>(); DragManager.OverlayCamera = screenOverlayCam; DragManager.OverlayRect = screenOverlayRect; MainMenuUI.worldCamera = screenOverlayCam; MainUICamera = screenOverlayCam; }