public void HandleInputControlls(Context context, string UserInput)
        {
            Dictionary <string, IGameState> validCommands = GameCommands.CinematicCommands;

            if (validCommands.ContainsKey(UserInput))
            {
                context.SetGameState(validCommands[UserInput]);
            }
        }
Beispiel #2
0
        public void HandleInputControlls(Context context, string UserInput)
        {
            Dictionary <string, IGameState> validCommands = GameCommands.PlayingCommands;

            if (validCommands.ContainsKey(UserInput))
            {
                context.SetGameState(validCommands[UserInput]);
            }
            else
            {
                Console.WriteLine("You can't do that right now");
            }
        }
        public void HandleInputControlls(Context context, string UserInput)
        {
            Dictionary <string, IGameState> validCommands = GameCommands.allCommands;

            if (validCommands.ContainsKey(UserInput))
            {
                context.SetGameState(validCommands[UserInput]);
            }
            else
            {
                Console.WriteLine("Invalid input command");
            }
        }
 public GameConsole()
 {
     gameContext.SetGameState(GameCommands.allCommands["STOP"]);
 }