Overhaul item and inventory and clean up bits and pieces
This commit is contained in:
@@ -20,7 +20,7 @@ public interface IGameRepo : IDisposable
|
||||
|
||||
event Action? DoubleExpTimeEnd;
|
||||
|
||||
event Action<InventoryItem>? RemoveItemFromInventoryEvent;
|
||||
event Action<IBaseInventoryItem>? RemoveItemFromInventoryEvent;
|
||||
|
||||
event Action? PlayerAttack;
|
||||
|
||||
@@ -28,9 +28,9 @@ public interface IGameRepo : IDisposable
|
||||
|
||||
event Action? PlayerAttackedEnemy;
|
||||
|
||||
event Action<EquipableItem>? EquippedItem;
|
||||
event Action<IEquipableItem>? EquippedItem;
|
||||
|
||||
event Action<EquipableItem>? UnequippedItem;
|
||||
event Action<IEquipableItem>? UnequippedItem;
|
||||
|
||||
event Action<IEnemy>? EnemyDied;
|
||||
|
||||
@@ -48,7 +48,7 @@ public interface IGameRepo : IDisposable
|
||||
|
||||
public void AnnounceMessageInInventory(string message);
|
||||
|
||||
public void RemoveItemFromInventory(InventoryItem item);
|
||||
public void RemoveItemFromInventory(IBaseInventoryItem item);
|
||||
|
||||
public void OnPlayerAttack();
|
||||
|
||||
@@ -58,9 +58,9 @@ public interface IGameRepo : IDisposable
|
||||
|
||||
public void GameEnded();
|
||||
|
||||
public void OnEquippedItem(EquipableItem item);
|
||||
public void OnEquippedItem(IEquipableItem item);
|
||||
|
||||
public void OnUnequippedItem(EquipableItem item);
|
||||
public void OnUnequippedItem(IEquipableItem item);
|
||||
|
||||
public void OnEnemyDied(IEnemy enemy);
|
||||
|
||||
@@ -75,12 +75,12 @@ public class GameRepo : IGameRepo
|
||||
public event Action<string>? AnnounceMessageInInventoryEvent;
|
||||
public event Action<int>? DoubleExpTimeStart;
|
||||
public event Action? DoubleExpTimeEnd;
|
||||
public event Action<InventoryItem>? RemoveItemFromInventoryEvent;
|
||||
public event Action<IBaseInventoryItem>? RemoveItemFromInventoryEvent;
|
||||
public event Action? PlayerAttack;
|
||||
public event Action? PlayerAttackedWall;
|
||||
public event Action? PlayerAttackedEnemy;
|
||||
public event Action<EquipableItem>? EquippedItem;
|
||||
public event Action<EquipableItem>? UnequippedItem;
|
||||
public event Action<IEquipableItem>? EquippedItem;
|
||||
public event Action<IEquipableItem>? UnequippedItem;
|
||||
public event Action<IEnemy>? EnemyDied;
|
||||
public IAutoProp<bool> IsPaused => _isPaused;
|
||||
private readonly AutoProp<bool> _isPaused;
|
||||
@@ -131,7 +131,7 @@ public class GameRepo : IGameRepo
|
||||
AnnounceMessageInInventoryEvent?.Invoke(message);
|
||||
}
|
||||
|
||||
public void RemoveItemFromInventory(InventoryItem item)
|
||||
public void RemoveItemFromInventory(IBaseInventoryItem item)
|
||||
{
|
||||
RemoveItemFromInventoryEvent?.Invoke(item);
|
||||
}
|
||||
@@ -151,9 +151,9 @@ public class GameRepo : IGameRepo
|
||||
CloseInventoryEvent?.Invoke();
|
||||
}
|
||||
|
||||
public void OnEquippedItem(EquipableItem item) => EquippedItem?.Invoke(item);
|
||||
public void OnEquippedItem(IEquipableItem item) => EquippedItem?.Invoke(item);
|
||||
|
||||
public void OnUnequippedItem(EquipableItem item) => UnequippedItem?.Invoke(item);
|
||||
public void OnUnequippedItem(IEquipableItem item) => UnequippedItem?.Invoke(item);
|
||||
|
||||
public void OnEnemyDied(IEnemy enemy) => EnemyDied?.Invoke(enemy);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user