コード例 #1
0
        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;
        }
コード例 #2
0
ファイル: PlayState.cs プロジェクト: vthem/LectureFlash
 public PlayState(PlayStateConfiguration config)
 {
     stateConfig = config;
 }