public void AttemptToMove(string direction) { if (SceneExits.ContainsKey(direction)) { MoveScene(SceneExits[direction], "You head off to " + direction); } else { Controller.DisplayText("There is no path to " + direction); } }
public IResponseAction TryUseItem(string item) { var actionItem = Sheet.GetItem(item); if (actionItem == null) { return(null); } var action = actionItem.GetInteraction(ActionEnum.Use); if (action?.Response == null) { return(null); } controller.DisplayText(action.ResponseDescription); return(action.Response); }
public IResponseAction TryUseItem(string item, IGameController controller) { var actionItem = Objects.FirstOrDefault(f => f.Name == item); if (actionItem == null) { return(null); } var action = actionItem.GetInteraction(ActionEnum.Use); if (action?.Response == null) { return(null); } controller.DisplayText(action.ResponseDescription); return(action.Response); }