// Use this for initialization
 void Start()
 {
     cubo    = new Cubos();
     pos     = GameObject.Find("Positions").GetComponent <LetterControl> ().posiciones;
     randPos = Random.Range(0, 30);
     letters = GameObject.Find("TextMng").GetComponent <LineRead> ().letters;
 }
Exemple #2
0
    private void OnMouseDown()
    {
        if (prefCriados)
        {
            Cubos.Destroy(movimentarClone);
            Cubos.Destroy(rotacionarClone);
            Cubos.Destroy(escalarClone);


            prefCriados = !prefCriados;
        }
        else
        {
            Vector3 posPai = transform.position;
            Vector3 pos    = posPai + new Vector3(0, 1.5f, 0);

            movimentarClone = Instantiate(movimentar, pos, Quaternion.identity, transform.parent);
            pos             = posPai + new Vector3(1.5f, 0, 0);
            rotacionarClone = Instantiate(rotacionar, pos, Quaternion.identity, transform.parent);
            pos             = posPai + new Vector3(0, 0, 1.5f);
            escalarClone    = Instantiate(escalar, pos, Quaternion.identity, transform.parent);



            prefCriados = !prefCriados;
        }
    }
    //float delay = 1;
    // Use this for initialization
    void Start()
    {
        cubo = new Cubos();

        pos    = GameObject.Find("Positions").GetComponent <LetterControl> ().posiciones;
        letter = GameObject.Find("TextMng").GetComponent <LineRead> ().letters;
        siz    = GameObject.Find("TextMng").GetComponent <LineRead> ().totalC;
        while (index < siz)
        {
            cubo.Create(new Vector2(index - 2, 3), letter[index]);
            index++;
        }
        cubosGenerados = GameObject.FindGameObjectsWithTag("Letter");
    }
    //float delay = 1;
    // Use this for initialization

    void Start()
    {
        plyr           = GameObject.FindGameObjectWithTag("Player");
        spawn          = GameObject.FindGameObjectsWithTag("Spawn");
        platforms      = GameObject.FindGameObjectsWithTag("Platform");
        fall           = GameObject.FindGameObjectsWithTag("Fall");
        mplat          = GameObject.FindGameObjectsWithTag("Moving");
        buttons        = GameObject.FindGameObjectsWithTag("Button");
        cubo           = new Cubos();
        cubosGenerados = new List <GameObject> ();
        cubosEjemplo   = new List <GameObject> ();
        letter         = GameObject.Find("TextMng").GetComponent <LineRead> ().letters;
        timer          = GameObject.FindGameObjectWithTag("Timer");

        Invoke("Create", 0);
        Invoke("PopUp", 1);
        StartCoroutine(Activate());
    }