Esempio n. 1
0
    void Awake()
    {
        Checkpoint checkpoint = Persistor.Load();

        if (checkpoint != null)
        {
            checkPointPresent = true;
        }
        if (checkPointPresent)
        {
            GetComponent <Button>().interactable = true;
        }
    }
Esempio n. 2
0
    public void LoadCheckpointScene()
    {
        Checkpoint checkpoint = Persistor.Load();

        if (checkpoint != null)
        {
            SceneManager.LoadScene(checkpoint.sceneName);
        }
        else
        {
            Debug.Log("Checkpoint file not found.");
        }
    }