Mystery item implementation
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Chickensoft.Collections;
|
||||
using Godot;
|
||||
using Zennysoft.Game.Abstractions;
|
||||
|
||||
namespace Zennysoft.Ma.Adapter;
|
||||
|
||||
@@ -29,6 +30,8 @@ public interface IGameRepo : IDisposable
|
||||
|
||||
event Action<EquipableItem>? UnequippedItem;
|
||||
|
||||
event Action<IHealthPack>? RestorativePickedUp;
|
||||
|
||||
void Pause();
|
||||
|
||||
void Resume();
|
||||
@@ -51,6 +54,8 @@ public interface IGameRepo : IDisposable
|
||||
|
||||
public void OnPlayerAttackedEnemy();
|
||||
|
||||
public void OnRestorativePickedUp(IHealthPack restorative);
|
||||
|
||||
public void CloseInventory();
|
||||
|
||||
public void GameEnded();
|
||||
@@ -76,7 +81,7 @@ public class GameRepo : IGameRepo
|
||||
public event Action? PlayerAttackedEnemy;
|
||||
public event Action<EquipableItem>? EquippedItem;
|
||||
public event Action<EquipableItem>? UnequippedItem;
|
||||
|
||||
public event Action<IHealthPack>? RestorativePickedUp;
|
||||
public IAutoProp<bool> IsPaused => _isPaused;
|
||||
private readonly AutoProp<bool> _isPaused;
|
||||
|
||||
@@ -146,6 +151,11 @@ public class GameRepo : IGameRepo
|
||||
PlayerAttackedEnemy?.Invoke();
|
||||
}
|
||||
|
||||
public void OnRestorativePickedUp(IHealthPack restorative)
|
||||
{
|
||||
RestorativePickedUp?.Invoke(restorative);
|
||||
}
|
||||
|
||||
public void CloseInventory()
|
||||
{
|
||||
CloseInventoryEvent?.Invoke();
|
||||
|
||||
@@ -30,7 +30,4 @@ public interface IGameEventDepot : IDisposable
|
||||
|
||||
event Action<InventoryItem>? HealingItemConsumed;
|
||||
public void OnHealingItemConsumed(InventoryItem item);
|
||||
|
||||
event Action<IHealthPack>? RestorativePickedUp;
|
||||
public void OnRestorativePickedUp(IHealthPack restorative);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user