예제 #1
0
 private void Update()
 {
     if (Input.GetMouseButtonDown(0))
     {
         levelChanger.FadeToNext();
     }
 }
예제 #2
0
 public void UpdateSlider(int particleNum)
 //updates slider to particleNum
 {
     slider.value = particleNum;
     if (slider.value == slider.maxValue)
     {
         levelChanger.FadeToNext();
     }
 }
예제 #3
0
    public void UpdateCount()
    {
        objCount++;
        objCountText.text = objCount.ToString() + "/8";

        if (objCount == 8)
        {
            levelChanger.FadeToNext();
        }
    }
예제 #4
0
    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();
        }
    }