Added first steps to load mechanic, v1.3.0

This commit is contained in:
Nicola Sovic
2022-06-09 18:14:39 +02:00
parent ae5378090c
commit 14f62410f5
7 changed files with 2175 additions and 644 deletions

View File

@@ -50,6 +50,7 @@ namespace Assets.Scripts.Menu
PlayerPrefs.SetInt("race", GameObject.Find("dropRace").GetComponent<Dropdown>().value);
PlayerPrefs.SetString("playername", GameObject.Find("inName").GetComponent<InputField>().text);
PlayerPrefs.SetInt("difficulty", GameObject.Find("dropDifficulty").GetComponent<Dropdown>().value);
PlayerPrefs.SetInt("isLoad", 0);
sceneHandler.openGameScene();
}
@@ -174,5 +175,11 @@ namespace Assets.Scripts.Menu
GameObject.Find("txtSecondary_Creation").GetComponent<Text>().text = "Mana: " + playerstats[3];
}
public void loadGame(SceneHandler sceneHandler)
{
PlayerPrefs.SetInt("isLoad", 1);
sceneHandler.openGameScene();
}
}
}