Scriptum/Assets/NewGame.cs

60 lines
1.8 KiB
C#
Raw Normal View History

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NewGame : MonoBehaviour
{
public void ResetSettings()
{
2022-10-02 18:45:58 +02:00
// 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;
2022-11-03 20:30:40 +01:00
PlayerPrefs.SetInt("rock", rock); // Is it used anywhere? I have not found it
2022-10-02 18:45:58 +02:00
/*
string pickaxe1 = "create";
PlayerPrefs.SetString("pickaxe1", pickaxe1);
*/
2022-10-23 13:29:22 +02:00
PlayerPrefs.SetFloat("exp", 0);
PlayerPrefs.SetInt("lvl", 1);
PlayerPrefs.SetFloat("maxExp", 10);
string name = "none";
PlayerPrefs.SetString("name", name);
2022-10-02 18:45:58 +02:00
int isQuest = 1;
PlayerPrefs.SetInt("lumberjack", isQuest);
2022-10-02 18:45:58 +02:00
/*
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("maxHealth", 10);
PlayerPrefs.SetFloat("health", 10);
2022-10-02 18:45:58 +02:00
//PlayerPrefs.SetInt("continued", 0);
2022-11-03 20:30:40 +01:00
PlayerPrefs.SetInt("rock", 0); // Is it used anywhere? I have not found it
2022-10-02 18:45:58 +02:00
//PlayerPrefs.SetInt("goldOre", 0);
PlayerPrefs.SetInt("pickaxe", 0);
2022-11-03 20:30:40 +01:00
PlayerPrefs.SetInt("healthPoints", 0);
PlayerPrefs.SetInt("defensePoints", 0);
PlayerPrefs.SetInt("StrengthPoints", 0);
PlayerPrefs.SetInt("IntelligencePoints", 0);
2022-11-03 20:30:40 +01:00
OnMapAppearanceMethod.Gateway = OnMapAppearanceMethodEnum.NewGame;
}
}