Esempio n. 1
0
    void Awake()
    {
        worldData = GameObject.Find("WorldData").GetComponent <WorldData>();
        for (int i = 0; i < worldData.players.Length; i++)
        {
            pc[i] = worldData.players[i].GetComponent <PlayerControl>();
        }

        audio = GameObject.Find("Audios").GetComponent <AudioPlaying>();
    }
Esempio n. 2
0
 void Awake()
 {
     if (instance != null && instance != this)
     {
         Destroy(this.gameObject);
         return;
     }
     else
     {
         instance = this;
     }
     DontDestroyOnLoad(this.gameObject);
 }