Esempio n. 1
0
    private void KillEnemy()
    {
        if (SceneManager.GetActiveScene().buildIndex != 1)
        {
            LevelManager levelManager = GameObject.Find("Level Manager").GetComponent <LevelManager>();
            levelManager.AddEnemyDeath();
        }
        else
        {
            TutorialManager tutorial = GameObject.Find("TutorialManager").GetComponent <TutorialManager>();
            tutorial.SpawnPortal();
        }

        Destroy(gameObject);
    }