Skip to content

Commit

Permalink
Changed "money" to "coins".
Browse files Browse the repository at this point in the history
  • Loading branch information
Kotáb Petr committed Jan 8, 2023
1 parent 22f73ca commit f94d973
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion TestGame/Components/Inventory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ internal class Inventory
{
public List<Item> Slots = new();
public int Selected = -1;
public int Money;
public int Coins;

public Item SelectedItem => Selected == -1 ? null : Slots[Selected];

Expand Down
6 changes: 3 additions & 3 deletions TestGame/Scenes/LevelScene.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ internal class LevelScene : Scene

private Vector2 windowSize;
private InventoryUI inventoryUI;
private MoneyCounter moneyCounter;
private CoinsCounter moneyCounter;

private readonly ShopScene shopScene = new();

Expand Down Expand Up @@ -131,15 +131,15 @@ private void CreateInventoryUI()

private void CreateMoneyCounter()
{
moneyCounter = new MoneyCounter(Inventory)
moneyCounter = new CoinsCounter(Inventory)
{
Apperance = new Apperance(),
Font = Game.FontManager[new FontDescriptor()
{
Name = "calibri",
FontHeight = 32,
}],
Text = "Money: 0000"
Text = "Coins: 0000"
};

moneyCounter.Apperance.Position = new Vector2()
Expand Down
6 changes: 3 additions & 3 deletions TestGame/UI/MoneyCounter.cs → TestGame/UI/CoinsCounter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@

namespace TestGame.UI
{
internal class MoneyCounter : Label
internal class CoinsCounter : Label
{
private readonly Inventory inventory;

public MoneyCounter(Inventory inventory)
public CoinsCounter(Inventory inventory)
{
this.inventory = inventory;
}

public override void Update()
{
Text = $"Money: {inventory.Money}";
Text = $"Coins: {inventory.Coins}";
}
}
}

0 comments on commit f94d973

Please sign in to comment.