Ejemplo n.º 1
0
 void Start()
 {
     if (level == 3)
     {
         level = 0; curPhoto++; startCkecking = false;
     }
     momiko.SetActive(false);
     trifat.Clear();
     right         = false;
     startCkecking = false;
     for (int i = 0; i < PhotoKamla[curPhoto].transform.GetChild(level).transform.childCount; i++)
     {
         trifat.Add(PhotoKamla[curPhoto].transform.GetChild(level).transform.GetChild(i).gameObject);
     }
     foreach (GameObject Tr in trifat)
     {
         Tr.SetActive(true);
     }
 }
Ejemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        if (!finish)
        {
            timer_to_finish += Time.deltaTime;
        }

        if (!startCkecking)
        {
            Timer -= Time.deltaTime;
        }
        if (Timer <= 0)
        {
            Timer         = 3;
            startCkecking = true;
            RotateIt();
        }
        if (startCkecking)
        {
            checkIt();
        }
        if (right)
        {
            TimerToChange -= Time.deltaTime;
            momiko.SetActive(true);
        }
        if (TimerToChange <= 0)
        {
            level++;

            foreach (GameObject Tr in trifat)
            {
                Tr.SetActive(false);
            }
            Start();
            TimerToChange = 3;
            right         = false;
        }
    }