// Use this for initialization void Start() { n = GameObject.Find("GameMenager").GetComponent <SpawnCubes>().number; parent = GameObject.Find("Cube" + (n - 4)); theScript = parent.GetComponent <MoveCubes>(); theNumber = gameObject.name; strLen = theNumber.Length; if (theNumber[0].CompareTo('R') == 0) { isItRightColl = true; } else { isItRightColl = false; } for (int i = 0; i <= strLen; i++) { if (i > 14) { howManyNumbers++; } } for (int j = 13; j <= 13 + howManyNumbers; j++) { lenth += theNumber[j]; } theCube = GameObject.Find("Cube" + lenth); }
void Awake() { Instance = this; }
// Use this for initialization void Start() { MoveCubes.instance = this; StartCoroutine(MoveCoroutine(this.MoveRate)); }
void Start() { n = GameObject.Find("GameMenager").GetComponent <SpawnCubes>().number; parent = GameObject.Find("Cube" + (n - 4)); mov = parent.GetComponent <MoveCubes>(); }
// Use this for initialization void Start() { childd = gameObject.GetComponentsInChildren <Transform>(); cub = gameObject.GetComponent <MoveCubes>(); }
void Update() { numberOfParent = spawn.number; mainCube = GameObject.Find("Cube" + (numberOfParent - 4)); moveCubes = mainCube.GetComponent <MoveCubes>(); }