Beispiel #1
0
 void Start()
 {
     N = 1;
     T1.SetActive(true);
     T2.SetActive(false);
     T3.SetActive(false);
     T4.SetActive(false);
 }
    // Use this for initialization
    void Start()
    {
        currentLvl = GameObject.FindGameObjectWithTag("Lvl").GetComponent <CurrentLevel>().lvl;

        if (currentLvl == 0)
        {
            T1.SetActive(true);
        }
        else if (currentLvl == 1)
        {
            T2.SetActive(true);
        }
        else if (currentLvl == 2)
        {
            T3.SetActive(true);
        }

        tiles = Tiles.GetComponent <Tiles>();
        GenerateLevel();
        tiles.LevelIsGenerated();
    }
Beispiel #3
0
    // Update is called once per frame
    void Update()
    {
        if (N > 4)
        {
            N = 1;
        }

        if (N == 1)
        {
            T1.SetActive(true);
            T2.SetActive(false);
            T3.SetActive(false);
            T4.SetActive(false);
        }
        else if (N == 2)
        {
            T1.SetActive(false);
            T2.SetActive(true);
            T3.SetActive(false);
            T4.SetActive(false);
        }
        else if (N == 3)
        {
            T1.SetActive(false);
            T2.SetActive(false);
            T3.SetActive(true);
            T4.SetActive(false);
        }
        else if (N == 4)
        {
            T1.SetActive(false);
            T2.SetActive(false);
            T3.SetActive(false);
            T4.SetActive(true);
        }
    }