예제 #1
0
 public override void showHUD()
 {
     setIsHUDVisible(true);
     hudContentRoot.SetActive(true);
     MouseCursorVisiblityManager.showMouseCursor();
     updateHUDContent();
 }
예제 #2
0
    // 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(); });
    }
예제 #3
0
    // 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");
            }
        }
    }