Пример #1
0
    void Start()
    {
        sharedSoundHandler = FindObjectOfType <SharedSoundHandler> ();
        if (sharedSoundHandler == null)
        {
            Debug.LogError("Could not find shared sound handler");
        }

        fadeGameHandler = FindObjectOfType <FadeGame> ();
        if (fadeGameHandler == null)
        {
            Debug.LogError("Could not find FadeGame");
        }

        GameObject[] allEnemies = GameObject.FindGameObjectsWithTag("Enemy");
        for (int i = 0; i < allEnemies.Length; ++i)
        {
            enemies.Add(allEnemies[i]);
        }

        GameObject[] allIslands = GameObject.FindGameObjectsWithTag("IslandTrigger");
        for (int i = 0; i < allIslands.Length; ++i)
        {
            islands.Add(allIslands[i]);
        }

        if (islands.Count == 0)
        {
            Debug.LogError("Could not find any island triggers");
        }
    }
Пример #2
0
 void Start()
 {
     menuMusicHandler = FindObjectOfType <SharedSoundHandler>();
     if (!menuMusicHandler)
     {
         Debug.Log("MenuMusicHandler could not be found in scene.");
     }
 }
Пример #3
0
    void Start()
    {
        menuMusicHandler = FindObjectOfType <SharedSoundHandler> ();
        if (!menuMusicHandler)
        {
            Debug.Log("MenuMusicHandler could not be found in scene.");
        }

        fadeGameHandler = FindObjectOfType <FadeGame> ();
        if (!fadeGameHandler)
        {
            Debug.Log("FadeGame could not be found in scene.");
        }

        GameInformation.SetPVP(false);
        GameInformation.SetPlayerName("unnamed");
    }