void Awake()
    {
        data.Load();
        setQuality(data.highQuality);

        dungeonData        = GetComponent <DungeonData> ();
        homeScreenProgress = GetComponent <HomeScreenProgress> ();

        //////////////////maar er zitten echt 8 scripts op ???????????????
        arenaManager = GetComponentInChildren <ArenaManager> ();

        startingScreen.SetActive(true);

        DebuggerPanel = Instantiate(DebuggerPanel);
        DebuggerPanel.SetActive(false);

        if (PlayerPrefs.HasKey("id"))
        {
            SetUpDungeonStartCanvas();
        }

        gameStarted     = false;
        tutorialStarted = false;
        //Makes sure this object is not deleted when another scene is loaded.
        if (Instance != null)
        {
            GameObject.Destroy(this.gameObject);
        }
        else
        {
            GameObject.DontDestroyOnLoad(this.gameObject);
            Instance = this;
        }

        cheat      = false;    //put this to false in build
        cheatindex = 0;
        cheatCode  = new string[] { "w", "o", "c", "h", "e", "n", "e", "n", "d", "e" };

        //homeScreenCanvas = GameObject.Find ("Home Screen Canvas");
        homeScreen    = GameObject.Find("HomeScreen");
        homeScreenCam = GameObject.Find("HomeScreenCam");
        mainCamera    = homeScreenCam.GetComponent <Camera> ();
        minimapPrefab = Resources.Load("Prefabs/Minimap", typeof(Camera)) as Camera;

        HighScoresPanel = Instantiate(HighScoresPanel) as GameObject;
    }
Beispiel #2
0
 void Awake()
 {
     Instance = this;
 }
 void Start()
 {
     homeScreenProgress = HomeScreenProgress.Instance;
     homeScreenProgress.progressObjects.Add(this);
 }