Пример #1
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Space))
     {
         if (index < images.Count - 1)
         {
             index++;
             currentImage.texture = images[index];
         }
         else
         {
             GD.LoadScene("Menus/levelSelect");
             GD.PI.levelLock++;
             GD.SavePlayer();
         }
     }
 }
Пример #2
0
    // Update is called once per frame
    public void Update()
    {
        if ((Input.GetKeyDown(KeyCode.Joystick1Button2) || Input.GetKeyDown(KeyCode.Alpha3)) && !ending)
        {
            endLevel(thisLevel);
            resetting = true;
        }

        if (ending)
        {
            if (timer > 0)
            {
                timer--;
            }
            else
            {
                if (!resetting)
                {
                    DB.SavePlayer();
                }
                DB.LoadScene(levelToProceed);
            }
        }
    }