コード例 #1
0
ファイル: MainMenuState.cs プロジェクト: Kaironw00d/Pong
 protected override void Awake()
 {
     base.Awake();
     _mainMenuCanvas = mainMenuUI.GetComponent <Canvas>();
     mainMenuUI.OnPlayButtonClick     += () => ChangeState(GameState.Gameplay);
     mainMenuUI.OnSettingsButtonClick += () => ChangeState(GameState.Settings);
     mainMenuUI.OnQuitButtonClick     += Application.Quit;
 }
コード例 #2
0
    public void UpdateSceneOverlay(Camera screenOverlayCam)
    {
        var screenOverlayRect = MainMenuUI.GetComponent <RectTransform>();

        DragManager.OverlayCamera = screenOverlayCam;
        DragManager.OverlayRect   = screenOverlayRect;

        MainMenuUI.worldCamera = screenOverlayCam;
        MainUICamera           = screenOverlayCam;
    }