36 lines
982 B
C#
36 lines
982 B
C#
public struct Menu
|
|
{
|
|
public static void BuildMenu(Character character)
|
|
{
|
|
int index = 1;
|
|
foreach (string action in character.CharacterEnabledActions)
|
|
{
|
|
if (action == "Health Potion")
|
|
{
|
|
Console.WriteLine($"{index}. {action} ({GameState.Instance.heroPotionsAvailable})");
|
|
}
|
|
else
|
|
{
|
|
Console.WriteLine($"{index}. {action}");
|
|
}
|
|
index++;
|
|
}
|
|
}
|
|
|
|
public static void BuildItemsMenu(Character character)
|
|
{
|
|
int index = 1;
|
|
if (character.equipedItems.Any())
|
|
{
|
|
Console.WriteLine($"{index}. Unequip {character.equipedItems[0].Description}");
|
|
index++;
|
|
}
|
|
foreach (Item item in GameState.Instance.heroInventory)
|
|
{
|
|
Console.WriteLine($"{index}. {item.Description}");
|
|
index++;
|
|
}
|
|
Console.WriteLine($"{index}. Go back");
|
|
}
|
|
}
|