void Start() { UpdateNickNameText(); GameObject.Find("Cancel") .GetComponent <ClickActionScript>() .ClickMethod = obj => { SceneLoader.LoadMainMenuScene(); }; GameObject.Find("Done") .GetComponent <ClickActionScript>() .ClickMethod = obj => { string newNickname = GameObject.Find("TextNewNickname").GetComponent <Text>().text; DataPersistance.SavePlayerNickName(newNickname); UpdateNickNameText(); }; }
public GameEngine() { if (!DataPersistance.GameStateExists()) { //only for debug - starting game scene List <string> nicknames = new List <string>(); nicknames.Add("ewa"); nicknames.Add("katarzyna"); var GameState = GameStateGenerator.GenerateGameState("DEBUG_ID", 2, nicknames, "ewa"); //AddDebugOptions(); StartGame(); DataPersistance.SavePlayerNickName("ewa"); GameState.SaveGameState(); } AddDebugOptions(); }