Fix labels
This commit is contained in:
@@ -75,7 +75,7 @@ public partial class Game : Node3D, IGame
|
||||
var currentFloor = Floors.ElementAt(_currentFloor);
|
||||
currentFloor.CallDeferred(MethodName.QueueFree, []);
|
||||
|
||||
if (GameRepo.EquippedWeapon.Info != null && ((WeaponInfo)GameRepo.EquippedWeapon.Info).WeaponTags.Contains(WeaponTag.BreaksOnChange))
|
||||
if (GameRepo.EquippedWeapon.WeaponInfo != null && GameRepo.EquippedWeapon.WeaponInfo.WeaponTags.Contains(WeaponTag.BreaksOnChange))
|
||||
{
|
||||
GameRepo.InventoryItems.Value.Remove(GameRepo.EquippedWeapon);
|
||||
GameRepo.OnWeaponEquipped(new Weapon());
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace GameJamDungeon
|
||||
{
|
||||
public readonly record struct StartGame();
|
||||
|
||||
public readonly record struct SetInventoryMode(List<InventoryItem> Inventory);
|
||||
public readonly record struct SetInventoryMode(List<IInventoryItem> Inventory);
|
||||
|
||||
public readonly record struct HideInventory();
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ public interface IGameRepo : IDisposable
|
||||
{
|
||||
event Action? Ended;
|
||||
|
||||
AutoProp<List<InventoryItem>> InventoryItems { get; }
|
||||
AutoProp<List<IInventoryItem>> InventoryItems { get; }
|
||||
|
||||
IAutoProp<bool> IsInventoryScreenOpened { get; }
|
||||
|
||||
@@ -48,10 +48,10 @@ public class GameRepo : IGameRepo
|
||||
{
|
||||
public event Action? Ended;
|
||||
|
||||
private readonly AutoProp<List<InventoryItem>> _inventoryItems;
|
||||
private readonly AutoProp<List<IInventoryItem>> _inventoryItems;
|
||||
private readonly AutoProp<bool> _isInventoryScreenOpened;
|
||||
|
||||
public AutoProp<List<InventoryItem>> InventoryItems => _inventoryItems;
|
||||
public AutoProp<List<IInventoryItem>> InventoryItems => _inventoryItems;
|
||||
|
||||
public IAutoProp<bool> IsInventoryScreenOpened => _isInventoryScreenOpened;
|
||||
|
||||
@@ -84,7 +84,7 @@ public class GameRepo : IGameRepo
|
||||
|
||||
public GameRepo()
|
||||
{
|
||||
_inventoryItems = new AutoProp<List<InventoryItem>>([]);
|
||||
_inventoryItems = new AutoProp<List<IInventoryItem>>([]);
|
||||
_isInventoryScreenOpened = new AutoProp<bool>(false);
|
||||
_isPaused = new AutoProp<bool>(false);
|
||||
_playerGlobalPosition = new AutoProp<Vector3>(Vector3.Zero);
|
||||
|
||||
Reference in New Issue
Block a user