Пример #1
0
 public void LoadNextLevel()
 {
     Debug.Log("loading Next level");
     PlayerAdaptiveInfo.IncreaseSpeed();
     PlayerAdaptiveInfo.resetRestarts();
     PlayerAdaptiveInfo.setCurrLevel(SceneManager.GetActiveScene().buildIndex + 1);
     SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
 }
Пример #2
0
    //public GameManager gameManager;

    public void StartGame()
    {
        Debug.Log("Name: " + username.text + "Age: " + Age.text);


        var p = new User {
            Name    = username.text,
            Surname = "NA",
            Age     = int.Parse(Age.text)
        };
        var  ds  = new DataService("tempDatabase.db");
        User tmp = ds.CreateGivenUser(p);

        PlayerStats.UserDetails = tmp;
        PlayerStats.CreateSession();

        PlayerAdaptiveInfo.adaptiveInfo.userName = username.text;
        PlayerAdaptiveInfo.setCurrLevel(SceneManager.GetActiveScene().buildIndex + 1);
        SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
    }