private void initSystem() { if (!GameObject.Find("difGameSystem")) //Create system prefab if it's missing. { system = GameObject.Instantiate(systemPrefab).GetComponent <DifGameSystem>(); //system.init(); Debug.Log("System added"); } else { system = GameObject.Find("difGameSystem").GetComponent <DifGameSystem>(); Debug.Log("System found"); } }
////--------------------------------------------------- ////Intro panel objects. //(Moved to DifGameIfo script.) //public Button introButton; //public GameObject introPanel; //public GameObject introPicture1, introPicture2; //public List<Sprite> introImages; //public Text introText; //public Text pageNumber; //public Button introNextButton; //public Button introPrevButton; //public int introPage; ////--------------------------------------------------- // Use this for initialization void Start() { //introPanel.SetActive(false); // Fetch system object if (!GameObject.Find("difGameSystem")) //Create system prefab if it's missing. { system = GameObject.Instantiate(systemPrefab).GetComponent <DifGameSystem>(); //system.init (); Debug.Log("system added"); } else { system = GameObject.Find("difGameSystem").GetComponent <DifGameSystem>(); Debug.Log("system found"); } checkButtons(); MusicPlayer.PlayMusic(MusicTrack.BubbleWarehouseCutscene); }