public Parser(CommandWords newCommands) { //commands moved to a stack commands = new Stack <CommandWords>(); _state = new ParserNormalState(); //commands = newCommands; Push(newCommands); //pushing the new commands NotificationCenter.Instance.addObserver("PlayerWillEnterState", PlayerWillEnterState); }
public HelpCommand(CommandWords commands) : base() { words = commands; this.name = "help"; }
//accessibility to the stack, pushes commands into stacks public void Push(CommandWords newCommands) { commands.Push(newCommands); }