// Update is called once per frame void Update() { //Debug.Log (currentLvl); if (PillarUp) { pillarscript.pillarUp(0.008f); } else //if (!PillarUp) { pillarscript.pillarUp(-0.01f); } switch (currentLvl) { case 1: lvl1script.FirstLvl(0.03f); break; case 2: //lvl1script.FirstLvl (-0.1f); lvl1script.gameObject.SetActive(false); lvl2script.SecondLvl(0.03f); break; case 3: //lvl2script.SecondLvl (-0.1f); lvl2script.gameObject.SetActive(false); lvl3script.ThirdLvl(0.03f); break; case 4: //lvl3script.ThirdLvl (-0.1f); lvl3script.gameObject.SetActive(false); lvl4script.FourthtLvl(0.03f); break; case 5: //lvl4script.FourthtLvl (-0.1f); lvl4script.gameObject.SetActive(false); break; } }