void Start() { // Linq statement that selects all the children of this gameobject *Oops LINQ doesnt work in flash which im going to build to //childrenArray = GetComponentsInChildren<Transform>().Except(new [] { transform }).Select(t=>t).ToArray(); // Make an array of Transforms of this gameobjects children, which are all the chip spawners childrenArray = new GameObject[transform.childCount]; // add each child to the array for (var i = 0; i < transform.childCount; i++) { childrenArray[i] = transform.GetChild(i).gameObject; } // Get the text mesh of this gameobject so we can update the score textEffect = GetComponent <Text_Typewriter>(); // Give unity a bit of time to setup (usually a good idea) Invoke("Setup", 3f); }
void Start() { textEffect = GetComponent <Text_Typewriter>(); Invoke("Setup", 0.1f); }
void Start() { textEffect = GetComponent <Text_Typewriter>(); Invoke("ShowText", 3f); }