49 lines
1.4 KiB
C#
49 lines
1.4 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class NewGame : MonoBehaviour
|
|
{
|
|
public void ResetSettings()
|
|
{
|
|
// when new game is started, clear all rememberred vars (for now, added for this one with dynamic names)
|
|
PlayerPrefs.DeleteAll();
|
|
|
|
// !!! TODO do local save in other way !!!
|
|
// !!! comment on changed elements
|
|
|
|
int rock = 1;
|
|
PlayerPrefs.SetInt("rock", rock); // Is it use anywhere? I have not found
|
|
/*
|
|
string pickaxe1 = "create";
|
|
PlayerPrefs.SetString("pickaxe1", pickaxe1);
|
|
*/
|
|
PlayerPrefs.SetInt("exp", 0);
|
|
string name = "none";
|
|
PlayerPrefs.SetString("name", name);
|
|
|
|
//int isQuest = 1;
|
|
//PlayerPrefs.SetInt("lumberjack", isQuest);
|
|
|
|
/*
|
|
int isKilled = 0;
|
|
PlayerPrefs.SetInt("bat0", isKilled);
|
|
PlayerPrefs.SetInt("bat1", isKilled);
|
|
PlayerPrefs.SetInt("skeleton0", isKilled);
|
|
PlayerPrefs.SetInt("slime0", isKilled);
|
|
PlayerPrefs.SetInt("slime1", isKilled);
|
|
*/
|
|
|
|
float health = 10.0f;
|
|
PlayerPrefs.SetFloat("health", health);
|
|
|
|
//PlayerPrefs.SetInt("continued", 0);
|
|
|
|
PlayerPrefs.SetInt("rock", 0); // Is it use anywhere? I have not found
|
|
|
|
//PlayerPrefs.SetInt("goldOre", 0);
|
|
|
|
PlayerPrefs.SetInt("pickaxe", 0);
|
|
}
|
|
}
|