public override void showHUD() { setIsHUDVisible(true); hudContentRoot.SetActive(true); MouseCursorVisiblityManager.showMouseCursor(); updateHUDContent(); }
// Use this for initialization void Start() { showHUD(); setIsHUDVisible(true); // Update the content of the HUD updateHUDContent(); // Show the mouse cursor MouseCursorVisiblityManager.showMouseCursor(); // Link events to HUD buttons startButton.onClick.AddListener(delegate { launchGame(); }); howToPlayButton.onClick.AddListener(delegate { transitionToHowToPlayScreen(); }); optionsButton.onClick.AddListener(delegate { transitionToOptionsScreen(); }); }
// Update is called once per frame void Update() { // Control look controlLook(); // Control object interaction controlObjectInteraction(); // Control pausing controlPausing(); // Control game starting controlGameStarting(); if (Application.isEditor) { if (Input.GetKeyDown(KeyCode.T)) { if (Cursor.visible) { MouseCursorVisiblityManager.hideMouseCursor(); } else { MouseCursorVisiblityManager.showMouseCursor(); } } } if (Application.isEditor) { if (Input.GetKeyDown(KeyCode.G)) { SaveGameManager.setSavedHighScore(0); print("Restart game to see reset high scores"); } } }