Add wall hit sound and animation
This commit is contained in:
@@ -19,6 +19,10 @@ public interface IGameRepo : IDisposable
|
||||
|
||||
event Action<InventoryItem>? RemoveItemFromInventoryEvent;
|
||||
|
||||
event Action? PlayerAttack;
|
||||
|
||||
event Action? PlayerAttackedWall;
|
||||
|
||||
void Pause();
|
||||
|
||||
void Resume();
|
||||
@@ -35,6 +39,10 @@ public interface IGameRepo : IDisposable
|
||||
|
||||
public void RemoveItemFromInventory(InventoryItem item);
|
||||
|
||||
public void OnPlayerAttack();
|
||||
|
||||
public void OnPlayerAttackedWall();
|
||||
|
||||
public void CloseInventory();
|
||||
|
||||
public void GameEnded();
|
||||
@@ -51,6 +59,8 @@ public class GameRepo : IGameRepo
|
||||
public event Action<int>? DoubleExpTimeStart;
|
||||
public event Action? DoubleExpTimeEnd;
|
||||
public event Action<InventoryItem>? RemoveItemFromInventoryEvent;
|
||||
public event Action? PlayerAttack;
|
||||
public event Action? PlayerAttackedWall;
|
||||
|
||||
public IAutoProp<bool> IsPaused => _isPaused;
|
||||
private readonly AutoProp<bool> _isPaused;
|
||||
@@ -105,6 +115,16 @@ public class GameRepo : IGameRepo
|
||||
RemoveItemFromInventoryEvent?.Invoke(item);
|
||||
}
|
||||
|
||||
public void OnPlayerAttack()
|
||||
{
|
||||
PlayerAttack?.Invoke();
|
||||
}
|
||||
|
||||
public void OnPlayerAttackedWall()
|
||||
{
|
||||
PlayerAttackedWall?.Invoke();
|
||||
}
|
||||
|
||||
public void CloseInventory()
|
||||
{
|
||||
CloseInventoryEvent?.Invoke();
|
||||
|
||||
Reference in New Issue
Block a user