Ejemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        if (TubeController.instance != null & initialized == false)
        {
            //initializeTube ();
            tb1.clearLine();
            tb2.clearLine();
            CreateTube(startPositions, tb1);
            CreateTube(targetPositions, tb2);
            initialized = true;
        }

        /*
         * if(playerReachCount < 5){
         *      for (int l = 0; l < 4; l++) {
         *                      //tb1.clearLine ();
         *                      //tb1.AddPosition (players [l].transform.position);
         *                      if (players [l].transform.position.Equals (players [l].idlePosition)) {
         *                              playerReachCount++;
         *                      }
         *              }
         *      //tb1.clearLine ();
         * }
         * if (playerReachCount == 4) {
         *      //tb1.clearLine ();
         *      playerReachCount = 5;
         * }
         */
    }
    void Start()
    {
        startPositions  = new int[] { 0, 0, -1, 0, 0, 1, -1, 1 };
        quesNumber      = 0;
        path            = unit2.text.Split('\n');
        targetPositions = ParseIntAnswers(LoadTarget().Split(','));
        tb1.clearLine();
        tb1.CreateTube(startPositions);

        tb2.clearLine();
        tb2.CreateTube(targetPositions);
    }