private void Update() { if (Input.GetMouseButtonDown(0)) { levelChanger.FadeToNext(); } }
public void UpdateSlider(int particleNum) //updates slider to particleNum { slider.value = particleNum; if (slider.value == slider.maxValue) { levelChanger.FadeToNext(); } }
public void UpdateCount() { objCount++; objCountText.text = objCount.ToString() + "/8"; if (objCount == 8) { levelChanger.FadeToNext(); } }
public void Transition() //Changes scene and enables next script { if (sceneInt + 1 != scenes.Length) { Vector2 sceneObjPos = sceneObj.transform.position; scenes[sceneInt].EndScene(); LeanTween.moveX(sceneObj, sceneObjPos.x + 13, 1f).setOnComplete( () => { sceneInt++; scenes[sceneInt].StartScene(); } ); } else { levelChanger.FadeToNext(); } }