Example #1
0
 public virtual void Save()
 {
     for (int i = 0; i < inputFields.Length; i++)
     {
         dataLogger.Save(fileName, inputFields[i].text, i > 0);
     }
 }
Example #2
0
    public void NextScene()
    {
        if (ids.Count == 0)
        {
            currentScene = 3;
        }
        else
        {
            int index = Random.Range(0, ids.Count);

            currentScene = ids[index];

            ids.RemoveAt(index);
        }

        switch (currentScene)
        {
        case 0:
            SceneManager.LoadSceneAsync("GameScene");

            assetMode = AssetMode.SPRITE;

            break;

        case 1:
            SceneManager.LoadSceneAsync("GameScene");

            assetMode = AssetMode.BLACK_WHITE;

            break;

        case 2:
            SceneManager.LoadSceneAsync("GameScene");

            assetMode = AssetMode.PRIMITIVE;

            break;

        case 3:
            logger.Save();

            PlayerPrefs.SetInt("id", PlayerPrefs.GetInt("id", -1) + 1);

            SceneManager.LoadScene("MenuScene");

            Destroy(gameObject);

            break;
        }
    }