Example #1
0
    // 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);
    }
Example #2
0
 void Awake()
 {
     Instance = this;
 }
Example #3
0
    // Use this for initialization
    void Start()
    {
        MoveCubes.instance = this;

        StartCoroutine(MoveCoroutine(this.MoveRate));
    }
Example #4
0
 void Start()
 {
     n      = GameObject.Find("GameMenager").GetComponent <SpawnCubes>().number;
     parent = GameObject.Find("Cube" + (n - 4));
     mov    = parent.GetComponent <MoveCubes>();
 }
Example #5
0
 // Use this for initialization
 void Start()
 {
     childd = gameObject.GetComponentsInChildren <Transform>();
     cub    = gameObject.GetComponent <MoveCubes>();
 }
Example #6
0
 void Update()
 {
     numberOfParent = spawn.number;
     mainCube       = GameObject.Find("Cube" + (numberOfParent - 4));
     moveCubes      = mainCube.GetComponent <MoveCubes>();
 }