public IEnumerator ManualStart() { GameObject loaderScriptTemp = GameObject.FindWithTag("MainLoader"); GameObject LoaderMainTemp = GameObject.FindWithTag("MainLoader"); if (LoaderMainTemp != null) { bPartXMLReader = LoaderMainTemp.GetComponent <BPartXMLReaderScript> (); //Debug.Log ("GOT Bpart XML"); //startupDone = true; } if (LoaderMainTemp == null && loaderScriptTemp != null) { Debug.Log("Cannot find 'MainLoader'object"); } //bPartXMLReader = gameObject.GetComponent<BPartXMLReaderScript>(); //bodyPartObject = gameObject.GetComponent<>(); // GameObject EnemyScriptTemp = GameObject.FindWithTag ("EnemyController"); // if (LoaderMainTemp != null) { // EnemyScriptTemp.GetComponent<EnemyScript> ().signalThatBodyPartIsDone(); // } else if (LoaderMainTemp != null) { // Debug.Log ("could not find enemy script"); // } yield return(null); }
void Start() { // print ("loading script started"); DontDestroyOnLoad(gameObject); //Allows Loader to carry over into new scene //LoadXML (); //Loads XML File. Code below. //StartCoroutine(AssignData()); //Starts assigning XML data to data List. Code below XMLCardLoader = gameObject.GetComponent <XMLCardLoaderScript> (); if (XMLCardLoader == null) { Debug.Log("Cannot find 'XMLCardLoaderTemp'object"); } XMLWeaponHitLoader = gameObject.GetComponent <XMLWeaponHitLoaderScript> (); if (XMLWeaponHitLoader == null) { Debug.Log("Cannot find 'XMLWeaponHitLoader'object"); } XMLBPartLoader = gameObject.GetComponent <BPartXMLReaderScript> (); if (XMLBPartLoader == null) { Debug.Log("Cannot find 'XMLBPartLoader'object"); } StartCoroutine(Waiter()); }