Exemplo n.º 1
0
    IEnumerator Engage(float delay /*, GameObject enemyToSpawn*/)
    {
        yield return(new WaitForSeconds(delay));

        sceneMover.LoadLevel("Battle scene");
        //Instantiate(enemyToSpawn);
    }
Exemplo n.º 2
0
 //this function has to have different functionalty later on
 //this function will take you to the load screen
 public void QuittingGame()
 {
     Debug.Log("Quitting game...");
     PauseMenuUI.SetActive(false);
     sceneMovement.LoadLevel("Title screen");
     Time.timeScale = 1f;
 }
Exemplo n.º 3
0
    IEnumerator EndBattle()
    {
        if (state == BattleState.WON)
        {
            statusUpdate.text = "You won!";
            PlayerStats.gold += enemyUnit.gold;
            PlayerStats.exp  += enemyUnit.exp;
            yield return(new WaitForSeconds(2f));

            sceneMover.LoadLevel("Overword");
        }

        else if (state == BattleState.LOST)
        {
            statusUpdate.text = "You died";
            yield return(new WaitForSeconds(2f));

            sceneMover.LoadLevel("Title screen");
        }
    }