public void Start()
	{
        levelFinish = GameObject.Find("LevelFinishUI");
        instructionScreen = GameObject.Find("InstructionScreen");
        persistentUI = GameObject.Find("PersistentUI");
        gameEndingUI = GameObject.Find("GameEndingUI");
        levelFinish.SetActive(false);
        instructionScreen.SetActive(false);
        persistentUI.SetActive(false);
        gameEndingUI.SetActive(false);
        for (int i = 0; i < village.Length; ++i)
        {
            if (difficulty[i] == 0)
            {
                villages[village[i]].easy.Add(i);
            }
            else if (difficulty[i] == 1)
            {
                villages[village[i]].medium.Add(i);
            }
            else
            {
                villages[village[i]].hard.Add(i);
            }
        }
        scripting = Camera.main.GetComponent<SceneChangeScripting>();
        GameObject.Find("SoundManager").GetComponent<SoundManager>().PlayBackground(4);
        InitEndlessMode();
    }
Beispiel #2
0
	void Start () {
        world = GameObject.Find("WorldManager").GetComponent<WorldManager>();
        scripting = Camera.main.GetComponent<SceneChangeScripting>();
	}