Esempio n. 1
0
    /*
     * Interface implementation for loading the game and loading the title Screen
     */
    public void StartMainGame()
    {
        GameObject loadingScreenInstance = transitionalUIDisplayer.DisplayUIElement(loadingScreen);

        AsyncOperation asyncScene = sceneLoader.LoadGameScene(mainGameScene, LoadSceneMode.Single, null);

        playerObservant.SetActive(true);
        asyncScene.allowSceneActivation = true;

        Destroy(loadingScreenInstance);

        // NEED TO FIGURE OUT WHAT I WANNA DO AOUT THE API, SINCE I PROBABLY DONT NEED THE CALLBACK NOW SINCE I NEED THE ASYNC SCENE THING.
        // Need to eventually figure out what to do with the showing loading progress maybe.
    }
    private void OnPlayerDeath(object playerDeathState)
    {
        bool isDead = (bool)playerDeathState;

        if (isDead)
        {
            Time.timeScale = 0;
            uiDisplayer.DisplayUIElement(deathScreen);
        }
    }