private void ActionCreatorForLocation(LocationDict loc) { Console.WriteLine($"{loc.LocName} ({loc.Id})"); Console.WriteLine($"Доступные действия:"); if (loc.NPCInLocation != null) { for (int i = 0; i < loc.NPCInLocation.Count; i++) { NPCDict npc = loc.NPCInLocation[i]; Console.WriteLine($"{_actionDict.Count + 1}. Поговорить с {npc.NPCName}"); Action action = new Action(() => NPCDialog(npc)); _actionDict[(_actionDict.Count + 1).ToString()] = action; } } ActionCreatorForLookLocation(); for (int i = 0; i < loc.LocationsIdForPlayerMove.Count; i++) { LocationDict newLoc = DictionaryManager.Instance.LocationsDict[loc.LocationsIdForPlayerMove[i]]; Console.WriteLine($"{_actionDict.Count + 1}. Перейти в локацию {newLoc.LocName} ({newLoc.Id})"); Action action = new Action(() => MoveToLocation(newLoc)); _actionDict[(_actionDict.Count + 1).ToString()] = action; } AddShowInventoryAction(); }
private void MoveToLocation(LocationDict loc) { Player.MoveToLocation(loc); ActionCreator(GameStatus.Location); }
public void MoveToLocation(LocationDict loc) { Location = loc; }