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; }
public PlayState(PlayStateConfiguration config) { stateConfig = config; }