public SetupState() { var wordsFilePath = Path.Combine(App.PersistentDataPath, "Ch.txt"); var words = WordFileReader.GetWords(wordsFilePath); Words.AddList("Default", words); }
private void _RunState(string state) { Logger.Info($"{currentState.Value} => {state}"); if (currentState.Value == state) { return; } switch (state) { case State.SETUP: currentStateModule = new SetupState(); currentStateModule.Toggle(); break; case State.PLAY: var wordsFilePath = Path.Combine(PersistentDataPath, "Ch.txt"); var config = new PlayStateConfiguration() { Words = WordFileReader.GetWords(wordsFilePath) }; currentStateModule = new PlayState(config); currentStateModule.Toggle(); break; } currentState.Value = state; }